追加后缀 / Appender
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
You are given a string consisting of lowercase English letters.
Output the string determined as follows.
- If the last character of is
e, is the string obtained by appendingrto the end of . - If the last character of is not
e, is the string obtained by appendingerto the end of .
Constraints
- is a string consisting of lowercase English letters.
- The length of is between and , inclusive.
Input
The input is given from Standard Input in the following format:
Output
Output the answer.
live
liver
The last character of live is e, so the string liver, obtained by appending r to the end of live, is the string to be outputted.
femur
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 to be outputted.
chimpanzee
chimpanzeer
The last character of chimpanzee is e, so the string chimpanzeer, obtained by appending r to the end of chimpanzee, is the string to be outputted.
- Source: AtCoder ABC 476 A