/
実行時間制限: 2 sec / メモリ制限: 1024 MiB
配点 : 100 点
問題文
英小文字からなる文字列 S が与えられます。
以下のようにして決まる文字列 T を出力してください。
- S の末尾の文字が
eである場合、T は S の末尾にrを付け加えた文字列である。 - S の末尾の文字が
eでない場合、T は S の末尾にerを付け加えた文字列である。
制約
- S は英小文字からなる文字列
- S の長さは 1 以上 10 以下
入力
入力は以下の形式で標準入力から与えられる。
S
出力
答えを出力せよ。
入力例 1
live
出力例 1
liver
live の末尾の文字は e なので、live の末尾に r を付け加えた文字列 liver が出力するべき文字列 T です。
入力例 2
femur
出力例 2
femurer
femur の末尾の文字は e ではないので、femur の末尾に er を付け加えた文字列 femurer が出力するべき文字列 T です。
入力例 3
chimpanzee
出力例 3
chimpanzeer
chimpanzee の末尾の文字は e なので、chimpanzee の末尾に r を付け加えた文字列 chimpanzeer が出力するべき文字列 T です。
Score : 100 points
Problem Statement
You are given a string S consisting of lowercase English letters.
Output the string T determined as follows.
- If the last character of S is
e, T is the string obtained by appendingrto the end of S. - If the last character of S is not
e, T is the string obtained by appendingerto the end of S.
Constraints
- S is a string consisting of lowercase English letters.
- The length of S is between 1 and 10, inclusive.
Input
The input is given from Standard Input in the following format:
S
Output
Output the answer.
Sample Input 1
live
Sample Output 1
liver
The last character of live is e, so the string liver, obtained by appending r to the end of live, is the string T to be outputted.
Sample Input 2
femur
Sample Output 2
femurer
The last character of femur is not e, so the string femurer, obtained by appending er to the end of femur, is the string T to be outputted.
Sample Input 3
chimpanzee
Sample Output 3
chimpanzeer
The last character of chimpanzee is e, so the string chimpanzeer, obtained by appending r to the end of chimpanzee, is the string T to be outputted.