Back
Close

Plural Form

Statement

 Goal

In the Kingdom of CodinGame, people use a language called Taknese, which uses lowercase English letters.

In Taknese, the plural form of a noun is spelled based on the following rules:

If a noun's singular form does not end with 's', append 's' to the end of the singular form.
If a noun's singular form ends with 's', append 'es' to the end of the singular form.
You are given the singular form S of a Taknese noun. Output its plural form.
Input
A String S
Output
Output plural form of S
Constraints
1 <= len(s) <= 100
Example
Input
apple
Output
apples

Game modes
Fastest, Shortest, Reverse

Test cases
Test 1 Test
Input
apple
Output
apples

Validator 1 Validator
Input
banana
Output
bananas

Test 2 Test
Input
bus
Output
buses

Validator 2 Validator
Input
box
Output
boxs

Test 3 Test
Input
codinGame
Output
codinGames

Validator 3 Validator
Input
Coder
Output
Coders

Test 4 Test
Input
Coding
Output
Codings

Validator 4 Validator
Input
s
Output
ses

Solution language

Solution

Stub generator input