Problem:


Score : 100 points

Problem Statement

In the Kingdom of AtCoder, 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.

Constraints

S is a string of length 1 between 1000, inclusive.

S contains only lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

Print the plural form of the given Taknese word.

Sample Input 1

apple

Sample Output 1

apples

apple ends with e, so its plural form is apples.

Sample Input 2

bus

Sample Output 2

buses

bus ends with s, so its plural form is buses.

Sample Input 3

box

Sample Output 3

boxs



Sample input:
apple


Sample output:
apples

Submission status: Accepted

Solution code:
S = input()

if S[-1]=="s":
  print(S+"es")
else:
  print(S+"s")

Submission status: Accepted

Solution code:
s=  raw_input()
print s + ('e' if s[-1] == 's' else '' )+'s'

Submission status: Accepted

Solution code:
s = input().rstrip()

if s[-1] == 's':
    s += 'es'
else:
    s += 's'
print(s)

Submission status: Accepted

Solution code:
s=input()
if s[-1]=="s":
    s+="e"
s+="s"
print(s)

Submission status: Accepted

Solution code:
s = input()
N = len(s)
if(s[N-1] == "s"):
  print(s + "es")
else:
  print(s+ "s")

Submission status: Accepted

Solution code:
s = input()
if s[len(s)-1] == "s":
    print(s + "es")
else:
    print(s + "s")

Submission status: Accepted

Solution code:
s = input()
print(s+"s" if s[-1]!="s" else s+"es")

Submission status: Accepted

Solution code:
n = input()
if n[-1] == 's':
    print(n+'es')
else:
    print(n+'s')

Submission status: Accepted

Solution code:
S = input()
if list(S)[-1] == 's':
    S += 'es'
else:
    S += 's'

print(S)

Submission status: Accepted

Solution code:
s = input()

print(s + "es" if s[-1] == "s" else s + "s")

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from fractions import Fraction
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations, accumulate
from operator import add, mul, sub, itemgetter, attrgetter


import sys
# sys.setrecursionlimit(10**6)
# readline = sys.stdin.buffer.readline
readline = sys.stdin.readline

INF = 1 << 60


def read_int():
    return int(readline())


def read_int_n():
    return list(map(int, readline().split()))


def read_float():
    return float(readline())


def read_float_n():
    return list(map(float, readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()


def ep(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.perf_counter()
        ret = f(*args, **kwargs)
        e = time.perf_counter()

        ep(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S):
    return S + ('es' if S[-1] == 's' else 's')


def main():
    S = read_str()
    print(slv(S))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
input = sys.stdin.readline
INF = float("inf")


# 処理内容
def main():
    S = input()[:-1]

    if S[-1:] == "s":
        print(S + "es")
    else:
        print(S + "s")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    examA()

def examA():
    S = SI()
    if S[-1]=="s":
        ans = S+"es"
    else:
        ans = S+"s"
    print(ans)
    return

def examB():
    ans = 0
    print(ans)
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,alphabet_convert,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 1<<31
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    main()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

Submission status: Accepted

Solution code:
s = input()

if s[-1]=="s":
  s+="es"
else:
  s+="s"
print(s)

Submission status: Accepted

Solution code:
S = input()
ans = S + 'es' if S[-1] == 's' else S + 's'
print(ans)

Submission status: Accepted

Solution code:
#import 
s=input()
#=int(input())
#=map(int,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]

if s[-1] == 's':
    print(s + 'es')
else:
    print(s + 's')

Submission status: Accepted

Solution code:
d = input()
if(d[-1]=='s'):
    d = d + 'es'
else:
    d = d + 's'
print(d)

Submission status: Accepted

Solution code:
import math
import collections
from sys import exit
from itertools import product

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

s = input()

if s[-1] == 's':
    print(s+"es")
else:
    print(s+"s")

Submission status: Accepted

Solution code:
#ABC179-a
s = input()
if s[-1]=='s':
    print(s+'es')
else:
    print(s+'s')

Submission status: Accepted

Solution code:
def main():
    s = input()
    if s[-1] == "s":
        print(s+"es")
    else:
        print(s+"s")

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:

s=input()

if s[-1] == "s":
    print(s+"es")
else:
    print(s+"s")

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline

S = input().rstrip()

if S[len(S) - 1] == "s":
    print(S + "es")
else:
    print(S + "s")

Submission status: Accepted

Solution code:
s=input()
print(s, end='')
if s[-1] == 's':
    print("es")
else:
    print("s")

Submission status: Accepted

Solution code:

def resolve():
    s = input()
    print((s + 'es') if s[-1] == 's' else (s + 's'))

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
import sys, math
import io, os
#data = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
from bisect import bisect_left as bl, bisect_right as br, insort
from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
# from itertools import permutations,combinations
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var): sys.stdout.write(' '.join(map(str, var)) + '\n')
def out(var): sys.stdout.write(str(var) + '\n')
from decimal import Decimal
# from fractions import Fraction
# sys.setrecursionlimit(100000)
mod = int(1e9) + 7
INF=float('inf')


s=data()
if s[-1]=='s':
    out(s+'es')
else:
    out(s+'s')

Submission status: Accepted

Solution code:
s=input()
print(s+['s','es'][s[-1]=='s'])

Submission status: Accepted

Solution code:
s = input()
if s[-1]!="s": print(s+"s")
else: print(s+"es")

Submission status: Accepted

Solution code:
import sys
import re
import random
import math
import copy
from heapq import heappush, heappop, heapify
from functools import cmp_to_key
from bisect import bisect_left, bisect_right
from collections import defaultdict, deque, Counter
# sys.setrecursionlimit(1000000)

# input aliases
input = sys.stdin.readline
getS = lambda: input().strip()
getN = lambda: int(input())
getList = lambda: list(map(int, input().split()))
getZList = lambda: [int(x) - 1 for x in input().split()]

INF = float("inf")
MOD = 10**9 + 7
divide = lambda x: pow(x, MOD-2, MOD)


def solve():
    s = getS()
    if s[-1] == "s":
        print(s + "es")
    else:
        print(s + "s")

def main():
    n = getN()
    for _ in range(n):
        solve()

    return
if __name__ == "__main__":
    # main()
    solve()

Submission status: Accepted

Solution code:
s = input()
if s[-1]=="s":
    s+="es"
else:
    s+="s"
print(s)

Submission status: Accepted

Solution code:
a = input()

if a[-1] == "s":
    print(a + "es")
else:
    print(a + "s")

Submission status: Accepted

Solution code:
S = str(input())
if S[-1] != 's':
    S += 's'
else:
    S += 'es'
print(S)

Submission status: Accepted

Solution code:
s = input()
print((s + "s", s + "es")[s.endswith("s")])

Submission status: Accepted

Solution code:
S=input()
if S[-1]=="s" :
  print(S+"es")
else :
  print(S+"s")

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	A
# CreatedDate:  2020-09-19 20:49:13 +0900
# LastModified: 2020-09-19 21:00:48 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


def main():
    S = input()
    if S[-1] == 's':
        print(S+'es')
    else:
        print(S+'s')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
s = input()
if s[-1] != 's':
    s += 's'
else:
    s += 'es'
print(s)

Submission status: Accepted

Solution code:
s=input()
if s[-1]=="s":
    ans=s+"es"
else:
    ans=s+"s"
print(ans)

Submission status: Accepted

Solution code:
LI = lambda: list(map(int, input().split()))

S = input()


def main():
    if S[-1] == "s":
        ans = S + "es"
    else:
        ans = S + "s"
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    s = input()
    print(s + "s" if s[-1] != "s" else s + "es")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    S = input()
    if S[-1] == 's':
        print(S+'es')
    else:
        print(S+'s')

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


def read():
    S = input().strip()
    return S,


def solve(S):
    if S[-1] == "s":
        return S + "es"
    return S + "s"


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline

s=input().rstrip()

if s[-1]=='s':
    ans=s+'es'

else:
    ans=s+'s'

print(ans)

Submission status: Accepted

Solution code:
import sys

S = str(input())

if S[-1] == 's':
    print(S + 'es')
else:
    print(S + 's')

Submission status: Accepted

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
# from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
import copy
import time
# import numpy as np
starttime = time.time()
# import numpy as np
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

try:
    # sys.setrecursionlimit(int(pow(10,5)))
    sys.stdin = open("input.txt", "r")
    # sys.stdout = open("../output.txt", "w")
except:
    pass




s=input()
if s[-1]=="s":
    print(s+"es")
else:
    print(s+"s")






endtime = time.time()
# print(f"Runtime of the program is {endtime - starttime}")

Submission status: Accepted

Solution code:
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    s = input()
    if s[-1] == 's':
        s+='es'
    else:
        s+='s'
    print(s)






main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(S: str):
    return S + 's' if S[-1] != 's' else S + 'es'


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  # type: str
    print(solve(S))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

Submission status: Accepted

Solution code:
import sys
import math
sys.setrecursionlimit(500000)
INF = float('inf')

def main():
    s = input()
    if s[-1] != 's':
        return s + 's'
    else:
        return s + 'es'

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
def main():
    s = input()

    if s[-1] == "s":
        ans = s + "es"
    else:
        ans = s + "s"

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  #空白なし
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし


S = LS2()
if S[-1] == 's':
    S += ['e','s']
else:
    S += ['s']

print(''.join(S))

Submission status: Accepted

Solution code:
x = input()
if x[-1] == 's':
    print(x+'es')
else:
    print(x+'s')

Submission status: Accepted

Solution code:
def main():
    s = input()
    if s[-1] == "s":
        print(s+"es")
    else:
        print(s+"s")

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
s = input()

if s[-1] == 's':
    ans = s+'es'
else:
    ans = s+'s'

print(ans)

Submission status: Accepted

Solution code:
#A
S=input()
if S[-1]=="s":
    print(S+"es")
else:
    print(S+"s")

Submission status: Accepted

Solution code:
#!/usr/bin/python3
#coding: utf-8

S = input()
if S.endswith("s"):
    S += "es"
else:
    S += "s"
print(S)

Submission status: Accepted

Solution code:
# coding=utf-8
from math import floor, ceil, sqrt, factorial, log, gcd
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from heapq import heappop, heappush, heappushpop, heapify
import copy
import sys
INF = float('inf')
mod = 10**9+7
sys.setrecursionlimit(10 ** 6)


def lcm(a, b): return a * b / gcd(a, b)

# 1 2 3
# a, b, c = LI()


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))

# a = I()


def I(): return int(sys.stdin.buffer.readline())

# abc def
# a, b = LS()


def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()

# a = S()


def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')

# 2
# 1
# 2
# [1, 2]


def IR(n): return [I() for i in range(n)]

# 2
# 1 2 3
# 4 5 6
# [[1,2,3], [4,5,6]]


def LIR(n): return [LI() for i in range(n)]

# 2
# abc
# def
# [abc, def]


def SR(n): return [S() for i in range(n)]

# 2
# abc def
# ghi jkl
# [[abc,def], [ghi,jkl]]


def LSR(n): return [LS() for i in range(n)]

# 2
# abcd
# efgh
# [[a,b,c,d], [e,f,g,h]]


def SRL(n): return [list(S()) for i in range(n)]


s = S()
if s[-1] == "s":
    print(s + "es")
else:
    print(s + "s")

Submission status: Accepted

Solution code:
S = input()
ans = S + 'es' if S[-1] == 's' else S + 's'
print(ans)

Submission status: Accepted

Solution code:
# coding: utf-8
#import numpy as np
import re
import math
from collections import defaultdict,deque,Counter
from fractions import Fraction
import bisect
import itertools
from itertools import accumulate
from copy import deepcopy

import heapq
import random
import time
import os
import sys
from functools import lru_cache,reduce
readline=sys.stdin.readline
sys.setrecursionlimit(100000)
alp="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Set():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(bool)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        if not self.find(x):
            heapq.heappush(self.heap,x)
            self.dic[x]=True
            self.size+=1

    def remove(self,x):
        if self.find(x):
            self.dic[x]=False
            self.size-=1

    def find(self,x):
        return self.dic[x]
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==False:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class multiset():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(int)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        heapq.heappush(self.heap,x)
        self.dic[x]+=1
        self.size+=1

    def remove(self,x):
        if self.dic[x]>0:
            self.dic[x]-=1
            self.size-=1
    
    def count(self,x):
        return self.dic[x]

    def find(self,x):
        return self.dic[x]>0
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==0:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class Point():
    def __init__(self,y,x):
        self.x=x
        self.y=y
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):print("yes" if b else "no")
def Yn(b):print("Yes" if b else "No")
def YN(b):print("YES" if b else "NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(b,t,f):return t if b else f
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def inputintlist(row=1): 
    if row==1:
        ret=list(map(int,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=int(input())
    return ret
def inputfloatlist(row=1): 
    if row==1:
        ret=list(map(float,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=float(input())
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    from queue import PriorityQueue
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])#[cost,x]
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)#x→yが複数ある場合のためにmin()する
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def getmd(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def zipsort(*args):
    ziplist=sorted(zip(*args))
    for a in range(len(args)):
        for b in range(len(ziplist)):
            args[a][b]=ziplist[b][a]
def zipreverse(*args):
    ziplist=list(zip(*args))
    rev=[]
    for a in range(len(ziplist)-1,-1,-1):
        rev.append(ziplist[a])
    for a in range(len(args)):
        for b in range(len(rev)):
            args[a][b]=rev[b][a]

def to10(A):
    ret=0
    for a in range(len(A)-1,-1,-1):
        ret+=X[a]*2**(N-1-a)
    return ret
######################################################################################################
s=input()
if s[-1]=="s":
    s+="es"
else:
    s+="s"
print(s)

Submission status: Accepted

Solution code:
a = input()
print(a+"s" if a[-1] != "s" else a+"es")

Submission status: Accepted

Solution code:
a = input()

if a[-1] == 's':
  a += 'es'
else:
  a += 's'

print(a)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

S=input().strip()
if S[len(S)-1] == 's':
    print(S+'es')
else:
    print(S+'s')

Submission status: Accepted

Solution code:
import math
from math import gcd,pi,sqrt
INF = float("inf")
MOD = 10**9 + 7

import sys
sys.setrecursionlimit(10**6)
import itertools
import bisect
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    s = input()
    if s[-1] == "s":
        print(s+"es")
    else:
        print(s+"s")






if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

S = input()
if S[-1]=='s':
    print(S+'es')
else:
    print(S+'s')

Submission status: Accepted

Solution code:
S = input()

if S.endswith('s'):
    S += 'es'
else:
    S += 's'

print(S)

Submission status: Accepted

Solution code:
S = input().strip()
if S[-1]=='s':
    print(S+"es")
else:
    print(S+"s")

Submission status: Accepted

Solution code:
s=input()

if s[-1]=="s":
  s+="e"
  
print(s+"s")

Submission status: Accepted

Solution code:
S = input()

if S[-1]=="s":
    print(S+"es")
else:
    print(S+"s")

Submission status: Accepted

Solution code:
def main():
    s = input()
    if s[-1] == 's':
        print(s + "es")
    else:
        print(s + "s")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = input()
if n[-1] == 's':
    n+='es'
else:
    n+='s'
print(n)

Submission status: Accepted

Solution code:
s = input()

if s[-1] == 's':
    s += 'es'
else:
    s += 's'
print(s)

Submission status: Accepted

Solution code:
S = input()
if S[len(S) -1] == "s":
    print(S + "es")
else:
    print(S + "s")

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
import threading
import sys
import time


def get_int(): return int(stdin.readline().strip())


def get_tuple(): return map(int, stdin.readline().split())


def get_list(): return list(map(int, stdin.readline().split()))

st = input()
if st[-1]=='s':
    print(st+'es')
else:
    print(st+'s')

Submission status: Accepted

Solution code:
s = input()
if s[-1]=='s':
    s = s+'es'
else:
    s = s+'s'
    
print(s)

Submission status: Accepted

Solution code:
def main():

    S = input()
    if S[-1] == 's': return S + 'es'
    return S + 's'

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
s = input()

bl = s[-1] == "s"

print(s + "es" if bl else s + "s")

Submission status: Accepted

Solution code:
def resolve():
    S = input()
    print(S+"s" if S[-1] != "s" else S+"es")
resolve()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inl = lambda: [int(x) for x in sys.stdin.readline().split()]
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))


def solve():
    s = ins()
    if s[-1] == "s":
        return s + "es"
    else:
        return s + "s"


print(solve())

Submission status: Accepted

Solution code:
s = input()
if s[-1] == 's':
    s += "es"
else:
    s += "s"
print(s)

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue, copy, array

# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
# from decimal import Decimal
# from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
INF = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    s = iss()
    print(s + 'es' if s[-1] == 's' else s + 's')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=input()
if S[-1]=='s':print(S+'es')
else: print(S+'s')

Submission status: Accepted

Solution code:
S = input()
if not S.endswith('s'):
    S += 's'
else:
    S += 'es'
print(S)

Submission status: Accepted

Solution code:
# coding: utf-8

def main():
    s = input()
    if s[-1] == 's':
        print(s + 'es')
    else:
        print(s + 's')

main()

Submission status: Accepted

Solution code:
s = input()
if s[-1]!='s':
    print(s+'s')
else:
    print(s+'es')

Submission status: Accepted

Solution code:
# region header
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
import copy
# @lru_cache(maxsize=None)
# sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
# endregion
# region input function


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


# endregion

s = input()[:-1]
if s[-1] == "s":
    print(s + "es")
else:
    print(s + "s")