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: Runtime Error

Solution code:
n,k = map(int,input().split())
lr = []
for _ in range(k):
  lr.append(list(map(int,input().split())))
#print(lr)
imos = [0 for _ in range(n)]
imos[0] = 1
imos[1] = -1
now = 0
mod = 998244353
for i in range(n):
    now += imos[i]
    now %= mod
    #print(now)
    for j in range(k):
        try:
            imos[i+lr[j][0]] += now
            imos[i+lr[j][0]] %= mod
        except:
            pass
        try:
            imos[i+lr[j][1]+1] -= now
            imos[i+lr[j][1]+1] %= mod
        except:
            pass
    #print(imos)
print(now)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input_n = input()
n = str(input_n)

listN = list(n)
#listN = n.split(' ')

if listN[len(listN) - 1] = "s":
    listN.append("e")
    listN.append("s")
else:
    listN.append("s")

for i in range(len(listN) - 1):
    print(listN[i], end = "")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
input_n = input()
n = str(input_n)

listN = list(n)
#listN = n.split(' ')

if listN[len(listN)] = "s":
    listN.append("e")
    listN.append("s")
else:
    listN.append("s")

for i in range(len(listN)):
    print(listN[i], end = "")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = gets.chomp.split('')
if s[-1] == "s"
  s << "es"
else
  s << "s"
end
puts s.join

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s = input("input")
if input endswith(s)
   word = input+es
else
   word = input +s

Submission status: Runtime Error

Solution code:
N=int(input()) #縦2列
XY=[map(int, input().split()) for _ in range(N)]
X,Y=[list(i) for i in zip(*XY)]
ans="No"

for j in range(0,N-2):
    if X[j]==Y[j] and X[j+1]==Y[j+1] and X[j+2]==Y[j+2]:
        ans="Yes"
        break

print(ans)

Submission status: Runtime Error

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


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

if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
 


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

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
chr = input("")
num = len(s)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = int(input())
count = 0
for i in range(a):
    a,b = map(int,input().split())
    
    if (a==b):
        count += 1
        break
    else : 
        count = 0

if (count >= 3):
        
    print("Yes")
else :
    print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
if re.findall('[a-z]+$', S) = 's'
	print( S + 'es')
	else print( S + 's')

Submission status: Runtime Error

Solution code:
import math

from fractions import Fraction as frac

MOD = 1e9 + 7

def gcd(a, b):

    if b == 0:

        return a

    return gcd(b, a % b)

def lcm(a, b):

    return a * b // gcd(a, b)

def solve(case_no):

    s = str(input())

    if s[len(s) - 1] == 's':

    	print(s + "es")    else:

    	print(s + 's')

t = 1

# t = int(input())

for i in range(1, t + 1):

    solve(i)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
const double PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (int)(n); i++ )
using namespace std;
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main(){
  string s;
  cin >> s;
  int n = s.size();
  if(s.at(n-1) == 's'){
    s += 'e';
    s += 's';
  } 
  else s += 's';
  cout << s << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()
 
if a(-1:) = 's':
  print(a end='es')
else:
  print(a end='s')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input()

if a(:1) = 's':
  print(a end='es')
else:
  print(a end='s')

Submission status: Runtime Error

Solution code:
s= input()
if s.endwith('s'):
  print(s+'es')
else:
  print(s+'s')

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input(""))
d = 0
for a in range(N):
  for b in range(N):
    for c in range(N):
      if a*b+c == N:
        d += 1
print(d)

Submission status: Runtime Error

Solution code:
s = input()
if s.endwith('s'):
	print(s + 'es')
else:
	print(s + 's')

Submission status: Runtime Error

Solution code:
def createPlural(s):
    if s[-1] == "s":
        return s[:-1] + "es"
    else:
        return s + "s"

s = input()
s_plural = cratePlural
print(s_plural)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input(""))
d = 0
for a in range(N):
  for b in range(N):
    for c in range(N):
      if a*b+c == N:
        d += 1

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
st = input()
if st[-1]=="s":
  st.append("es")
else:
  st.append("s")

Submission status: Runtime Error

Solution code:
'''
Name: Devansh
Username: singhdevansh
Github: https://github.com/Devansh3712
'''

import os
import sys
import math
from itertools import *
from io import BytesIO, IOBase
from collections import *

#<fast I/O>
BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
#</fast I/O>

#<template>
mod=(10**9)+7
pi=3.14159265358979323846264338327950

def i1():	#int(input())
	return int(sys.stdin.readline())

def sf():	#input()
	return sys.stdin.readline()

def mi():	#map(int(input()))
	return map(int,sys.stdin.readline().split())

def arr():	#list(map(int,input().split()))
	return list(map(int,sys.stdin.readline().split()))

def pf(ans): #print(x)
	return sys.stdout.write(str(ans)+"\n")

def gcd(a,b):
	if a==0:
		return b
	elif b==0:
		return a
	if a>b:
		return gcd(a%b,b)
	else:
		return gcd(a,b%a)

def lcm(a,b):
	return (a*b)//gcd(a,b)
#</template>

#<solve>
def solve():
	s=input()
	if s[-1]='s':
		print(s+'es')
	else:
		print(s+'s')
solve()
#</solve>

#<solution>
# tc=i1()
# for t in range (tc):
# 	solve()
#<solution>

Submission status: Runtime Error

Solution code:
import inflect
s = input()

p = inflect.engine()
print(p.plural(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
using namespace std;
#define ll long long 
#define f(i,a,b,c) for(ll i=a;i<b;i+=c)
#define r(i,a,b,c) for(ll i=a;i>=b;i-=c)
#define mod 1000000007

int main(){
    ios_base::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    string s; cin >> s;
    if(s[s.length()-1]=='s') cout << s << "es";
    else cout << s << 's';
    return 0;
}

Submission status: Runtime Error

Solution code:
N = input()

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

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

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
const int NMAX = 2e5 + 10;
const int MOD = 1e9 + 7;
int main(int argc, char const *argv[])
{
	char text[1004];
	scanf("%s",text);
	int len = strlen(text);
	if(text[len - 1] == 's')
	{
		for(register int i = 0;i < len;i++)
			putchar(text[i]);
		puts("es");
	}else{
		for(register int i = 0;i < len;i++)
			putchar(text[i]);
		puts("s");
	}
	return 0;
}

Submission status: Runtime Error

Solution code:
from pattern.en import pluralize, singularize
s=input()
print(pluralize(s))

Submission status: Runtime Error

Solution code:
'''
Name: Devansh
Username: singhdevansh
Github: https://github.com/Devansh3712
'''

import os
import sys
import math
from itertools import *
from io import BytesIO, IOBase
from collections import *

#<fast I/O>
BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")

sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
#</fast I/O>

#<template>
mod=(10**9)+7
pi=3.14159265358979323846264338327950

def i1():	#int(input())
	return int(sys.stdin.readline())

def sf():	#input()
	return sys.stdin.readline()

def mi():	#map(int(input()))
	return map(int,sys.stdin.readline().split())

def arr():	#list(map(int,input().split()))
	return list(map(int,sys.stdin.readline().split()))

def pf(ans): #print(x)
	return sys.stdout.write(str(ans)+"\n")

def gcd(a,b):
	if a==0:
		return b
	elif b==0:
		return a
	if a>b:
		return gcd(a%b,b)
	else:
		return gcd(a,b%a)

def lcm(a,b):
	return (a*b)//gcd(a,b)
#</template>

#<testcases>
#sys.stdin=open('input.txt','r')
#sys.stdout=open('output.txt','w')
#</testcases>

#<solve>
def solve():
	s=input()
	if s[-1]=s:
		print(s+'es')
	else:
		print(s+'s')
solve()
#</solve>

#<solution>
# tc=i1()
# for t in range (tc):
# 	solve()
#<solution>

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input()

if n[-1]!='s':

	print(n+'s')elif n[-1]=='s':

	print(n+'es')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
function MainA(input){
    const last = input.split('').pop();
    console.log(last==="s" ? input + "es" : input + "s")
}
MainA(require("fs").readFileSync("/dev/stdin", "utf8").trim());

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
use std::cmp;
use std::fmt::Debug;
use std::str::FromStr;
#[allow(dead_code)]
fn read_as_vec<T>() -> Vec<T>
where
    T: FromStr,
    <T as FromStr>::Err: Debug,
{
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim()
        .split_whitespace()
        .map(|c| T::from_str(c).unwrap())
        .collect()
}

#[allow(dead_code)]
fn read_as_string() -> String {
    let mut s = String::new();
    std::io::stdin().read_line(&mut s).unwrap();
    s.trim().to_string()
}

fn main() {
    let s = read_as_string();

    print!("{}", s);
    if s.chars().last().unwrap() == 's' {
        println!("es");
    } else {
        println!("s");
    }
}

Submission status: Runtime Error

Solution code:
s=str(input())
t=len(s)
if s[t]=='s':
  print(s+'es')
else:
  print(s+'s')

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

Solution code:
/*
    Converted from Scratch by scratch2cpp (https://github.com/yos1up/scratch2cpp).
*/
#include <iostream>
#include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <math.h>
#define debug cerr << "--" << __LINE__ << "--" << "\n"
typedef long long ll;
using namespace std;

class Var{ // NOTE: immutable
public:
    mutable string sval;
    mutable long double dval;
    enum NumericState {UNKNOWN = -1, STRINGY = 0, NUMERIC = 1};
    mutable NumericState numericState;
    mutable bool svalValid, dvalValid; // TODO: initialize at here?

    Var(){
        *this = Var("");
    }
    Var(string s){
        sval = s;
        svalValid = true; dvalValid = false;
        numericState = UNKNOWN;
    }
    Var(long double d){
        dval = d;
        svalValid = false; dvalValid = true;
        numericState = NUMERIC;
    }
    Var(const Var &v){
        sval = string(v.sval); dval = v.dval;
        svalValid = v.svalValid; dvalValid = v.dvalValid;
        numericState = v.numericState;
    }
    void fillDval() const{
        if (dvalValid) return;
        long double d;
        bool numeric = isNumericString(sval, &d);
        if (numeric){
            numericState = NUMERIC;
            dval = d;
        }else{
            numericState = STRINGY;
            dval = 0.0;
        }        
        dvalValid = true;
    }
    static bool isNumericString(const string &s, long double *ptr) {
        char* ep;
        // cause side-effect: errno can be ERANGE after calling strtod
        *ptr = strtold(s.c_str(), &ep);
        // Scratch 3.0 recognize the string cause underflows or overflows as Numeric
        return NULL != ep && '\0' == ep[0] && s[0] != '\0';
    }
    bool isNumeric() const{
        fillDval();
        return numericState == NUMERIC;
    }    
    void fillSval() const{
        if (svalValid) return;
        sval = (floorl(dval) == dval) ? to_string((ll)dval) : to_string(dval);
        svalValid = true;
    }       
    long double asNumber() const{
        fillDval();
        return dval;
    } 
    string asString() const{
        fillSval();
        return sval;
    }
    Var operator+(const Var &y) const{
        return Var(this->asNumber() + y.asNumber());
    }
    Var operator+=(const Var &y){
        *this = *this + y;
        return *this;
    }
    Var operator-(const Var &y) const{
        return Var(this->asNumber() - y.asNumber());
    }
    Var operator*(const Var &y) const{
        return Var(this->asNumber() * y.asNumber());
    }
    Var operator/(const Var &y) const{
        return Var(this->asNumber() / y.asNumber());
    }
    Var operator%(const Var &y) const{
        return Var(fmodl(this->asNumber(), y.asNumber()));
    }
    bool operator<(const Var &y) const{
        if (this->isNumeric() && y.isNumeric()){
            return this->asNumber() < y.asNumber();
        } // compare as number if both can be interpreted as numeric
        return this->asString() < y.asString();
    }
    bool operator>(const Var &y) const{
        return y < *this;
    }
    bool operator==(const Var &y) const{
        if (this->isNumeric() && y.isNumeric()){
            return this->asNumber() == y.asNumber();
        } // compare as numeric if both are numeric
        return this->asString() == y.asString();
    }
    friend ostream& operator << (ostream& os, const Var& p);
    friend istream& operator >> (istream& is, const Var& p);
};
ostream& operator << (ostream& os, const Var& p){
    os << p.asString();
    return os;
}
istream& operator >> (istream& is, Var& p){
    string s; is >> s; p = Var(s);
    return is;
}


Var letterOf(Var index, Var sourceString){
    /* index: 1-origined */
    string str = sourceString.asString();
    int idx = (int)(index.asNumber() - 1);
    // seem to be dirty but Scratch seems to do like this.
    // ex. letterOf(0.01, "world") == "w", letterOf(1.99, "world") == "w", letterOf(5.99, "world") == "d"
    if (0 <= idx && idx < str.size()) return Var(str.substr(idx, 1));
    return Var();
}

class VarList{
public:
    vector<Var> data;
    VarList(const vector<Var> &x) { data = x; }
    void push_back(const Var &x){ data.push_back(x); }
    void pop_back(){ data.pop_back(); }
    void clear(){ data.clear(); }
    int size(){ return (int) data.size(); }
    Var getLineOfList(const Var &index) const{
        /* index: 1-origined */
        int idx = (int)index.asNumber() - 1;
        // (unlike 'letterOf', index==0.9 does not work.)
        if (0 <= idx && idx < data.size()) return data[idx];
        return Var();
    }
    void setLineOfListTo(const Var &index, const Var &v){
        /* index: 1-origined */
        int idx = (int)index.asNumber() - 1;
        if (0 <= idx && idx < data.size()) data[idx] = v;
    }
    void deleteLineOfList(const Var &index){
        /* index: 1-origined */
        string kwd = index.asString();
        if (kwd == "all"){
            data.clear();
        }else if (kwd == "last"){
            data.pop_back();
        }else{
            int idx = (int)index.asNumber() - 1;
            if (0 <= idx && idx < data.size()) data.erase(data.begin() + idx);
        }
    }
    void insertAtIndexOfList(const Var &item, const Var &index){
        /* index: 1-origined */
        int idx = (int)index.asNumber() - 1;
        if (0 <= idx && idx <= data.size()) data.insert(data.begin() + idx, item);   
    }
    void insertAtRandomOfList(const Var &item){
        int idx = rand() % (data.size() + 1);
        data.insert(data.begin() + idx, item);
    }
    string asString() const{
        /* concatenate elements of list with space */
        // TODO: concatenated without spaces only if all elements are single characters.
        // (Is it an official bug? (or feature?))
        string ret;
        for(int i=0;i<data.size();i++){
            if (i > 0) ret += ' ';
            ret += data[i].asString();
        }
        return ret;        
    }
    int itemNumOfList(const Var &item) const{
        auto itr = find(data.begin(), data.end(), item);
        if (itr == data.end()) return 0;
        return 1 + (int)(itr - data.begin());
        /* index: 1-origined */
    }
    friend ostream& operator << (ostream& os, const VarList& p);
};
ostream& operator << (ostream& os, const VarList& p){
    os << p.asString();
    return os;
}

long double randUniform(const long double x, const long double y){
    if (x > y) return randUniform(y, x);
    if (floor(x) == x && floor(y) == y){
        ll xi = (ll)round(x), yi = (ll)round(y);
        return xi + rand() % (yi - xi + 1);
    }else{
        return x + (y - x) * (0.0 + rand()) / RAND_MAX;
    }
}

Var buf_answer; // for "answer"

// ============================= Scripts =============================

// variable declaration
Var var_a("bus");

// list declaration

// prototype declaration of functions
int main();

// contents of functions
int main(){
    cin >> buf_answer;
    var_a = buf_answer;
    if ((letterOf(Var(var_a.asString().size()), var_a) == Var("s"))){
        cout << Var(var_a.asString() + Var("es").asString()) << endl;
    } else {
        cout << Var(var_a.asString() + Var("s").asString()) << endl;
    }
    return 0;
}

Submission status: Runtime Error

Solution code:
import random


def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)


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

s=input()
if s[len(s)-1]!='s':
    s+='s'
else:
    s+='es'
print(s)
import random


def gcd(a, b):
    if a == 0:
        return b
    return gcd(b % a, a)


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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
/* #define int long long */
/* #define double long double */
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define repa(i, s, n) for(int i = s; i < (int)n; i++)
#define MOD 1000000007
using namespace std;
using ll = long long;
typedef vector<int> vi;
typedef pair<int, int> P;
#define rrep(i,a,b) for(int i=a;i>=b;i--)
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

signed main(){
    string s;
    cin >> s;

    if(s[s.size()-1] == 's') cout << s << "es" << endl;
    else cout << s << 's' << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, re
import math
import numpy as np
from decimal import Decimal
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul	# 
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd	# 最大公約数
from heapq import heappush, heappop

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.maxsize = 10 ** 15
sys.setrecursionlimit(10 ** 9 + 7)
INF = float('inf')
MOD = 10 ** 9 + 7

# -*- coding: utf-8 -*-

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

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#include <iomanip>
#include <queue>
#include <climits>
#include <set>

int main(){
    std::string S;
    std::cin >> S;
    if(S[S.length()-1]=='s'){
        std::cout << S << "es" << std::endl;
    }else{
        std::cout << S << 's' << std::endl;
    }
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=raw_input() 
if a[-1] =="s": 
  print a+"es"
elss:
  print a+"s"

Submission status: Runtime Error

Solution code:
#include<bits/stdc++.h>
#define fr(i,c,b) for(int i=c;i<b;i++)
#define frl(i,c,b) for(ll i=c;i<b;i++)
#define si(x) int x; scanf("%d", &x)
#define sll(x) ll x; scanf("%lld", &x)
#define pi(x) printf("%d", x)
#define pll(x) printf("%lld", x)
#define nl printf("\n")
#define watch(x) cout << (#x) << " is " << (x) << endl
#define MAX 100001
#define M 1000000007
#define pb push_back

typedef long long int ll;

using namespace std;

int main()
{
    string s; cin>>s;
    int n=s.length();
    if(s[n-1]=='s')
    {
        s+="es";
    }
    else{
        s+="s";
    }
    cout<<s;
}

Submission status: Runtime Error

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