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:
list = []
x = 0
y = 0
n = int(input())
for i in range(n):
    a,b = map(int,input().split())
    list.append(a)
    list.append(b)
for _ in range(n):
    if list[x] == list[x+1]:
        n = n - 1
        if not list[x+1] == list[-1]:
            if list[x+2] == list[x+3]:
                n = n - 1
                if not list[x+3] == list[-1]:
                    if list[x+4] == list[x+5]:
                         n = n - 1
                         y = 1
    x = x + 2
if y == 0:
    print('No')
else:
    print('Yes')

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:
N = int(input())

count = 0

for i in range(N):
    k, t = map(int, input().split())
    if count == 3:
      print ( "yes" )
     
      break
      
    if not k == t:
        count *= 0
    if k == t:
       count += 1 
if not count == 3:
        print ("no")

Submission status: Runtime Error

Solution code:
import sys,math
try:sys.stdin,sys.stdout=open('input.txt','r'),open('out.txt','w')
except:pass
from sys import stdin,stdout;mod=int(1e9 + 7);from statistics import mode
from collections import *;from math import ceil,floor,inf,factorial,gcd,log2,sqrt,log
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
# print('{:.3f}'.format(1),round(1.123456789,4))
# sys.setrecursionlimit(500000)
def lcm(a,b): return (a*b)//gcd(a,b)
def setbits(n):return bin(n).count('1')
def resetbits(n):return bin(n).count('0')
def modinv(n,p):return pow(n,p-2,p)
def ncr(n,r):
    num,den=1,1;r=min(n,n-r)
    for i in range(r):num*=(n-i);den*=(i+1)
    return num//den
def ncr_p(n, r, p):
    num,den=1,1;r=min(r,n-r)
    for i in range(r):num = (num * (n - i)) % p ;den = (den * (i + 1)) % p
    return (num * modinv(den,p)) % p
def isPrime(num) :
    if num<=1:return False
    if num==2 or n==3:return True
    if (num % 2 == 0 or num % 3 == 0) :return False
    m = int(num**0.5)+1
    for i in range(5,m,6):
        if (num % i == 0 or num % (i + 2) == 0) :return False
    return True
def bin_search(s, low, high, val):
    while low <= high:
        mid = low + (high - low) // 2;
        if s[mid] == val:return mid
        elif s[mid] < val:low = mid + 1
        else:high = mid - 1
    return -1
def sumofdigit(num):
    count=0;
    while num : count+=num % 10;num //= 10;
    return count;
def inputmatrix():
    r,c=iia();mat=[0]*r;
    for i in range(r):mat[i]=iia();
    return r,c,mat;
def prefix_sum(n,s):
    for i in range(1,n):s[i]+=s[i-1]
    return s;
def binomial(n, k):
    if 0 <= k <= n:
        ntok = 1;ktok = 1
        for t in range(1, min(k, n - k) + 1):ntok *= n;ktok *= t;n -= 1
        return ntok // ktok
    else:return 0
def divisors(n):
    res = [];
    for i in range(1,ceil(sqrt(n))+1):
        if n%i == 0:
            if i==n//i:res.append(i)
            else:res.append(i);res.append(n//i)
    return res;
# code here
# print('start')
n,x,m= iia()
X=x
ans = x % m
temp = n%m
mull = n//m
# print(ans)
if mull==0:
    for i in range(1,n):
        prod = (x*x)%m
        ans+=prod
        x=prod
    print(ans)
else:
    rem = n % m
    for i in range(1,m):
        prod = (x*x)%m
        ans+=prod
        x=prod
    if mull > 0 and temp!=0 and x!=0:
        ans*=mull
    X=x
    for i in range(rem):
        prod = (X*X) % m
        ans += prod
        X = prod
    print(ans)
'''
6 2 1001
1000 2 16

'''

Submission status: Runtime Error

Solution code:
list = []
x = 0
y = 0
n = int(input())
for i in range(n):
    a,b = map(int,input().split())
    list.append(a)
    list.append(b)
for _ in range(n):
    if not list[x-1] == list[-1]:
        if list[x] == list[x+1]:
            if not list[x+1] == list[-1]:
                if list[x+2] == list[x+3]:
                    if not list[x+3] == list[-1]:
                        if list[x+4] == list[x+5]:
                            y = 1
    x = x + 2
if y == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
N,X,M = map(int,input().split())
S = X
n = X
while i < N-1:
    n = (n**2)%M
    S = S + n
    i = i+1
print(S)

Submission status: Runtime Error

Solution code:
n,x,m = map(int,input().split())
def jouken(a,waru):
    return a**2%waru
ni = 0
num =0
for i in range(n-1):
    ni = x
    if i ==0:
        num+=x
    x = jouken(ni,m)
    num+=x
print(num)

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0

for a in range(1, N):
  tmp = (N-1) // a
  if a <= (N) // 2:
    count += tmp
  else:
    count += 1          

print(count)

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:
import sys
import numpy as np
from math import ceil as C, floor as F, sqrt, gcd as G
from collections import defaultdict as D, Counter as CNT
from functools import reduce as R
import heapq as HQ

class Heap:
  def __init__(self, data, reverse=False):
    self.reverse = -1 if reverse else 1
    self.data = [self.reverse * d for d in data]
    HQ.heapify(self.data)
  def push(self, x): return HQ.heappush(self.data, self.reverse * x)
  def pop(self): return self.reverse * HQ.heappop(self.data) 

ALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alp = 'abcdefghijklmnopqrstuvwxyz'
def _X(): return sys.stdin.readline().rstrip().split(' ')
def _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]
def S(): return _S(_X())
def Ss(): return list(S())
def _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)
def I(): return _I(S())
def _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]
def Is(): return _Is(I())

n, k = I()
# steps = set()
steps = [0] * (n+1)
mod = 998244353

for _ in range(k):
    l, r = I()
    for i in range(l, r+1):
        steps[i] = 1
    # steps.update([i for i in range(l, r+1)])

ans = 0
# heap = Heap([1])
# seen = set([1])
# cache = D(int)
# cache[1] = 1
cache = np.array([0] * (n+1))
cache[1] = 1

# def go(i):
for i in range(1, n):
    if cache[i] == 0:
        continue
    now = np.array([0] * i + steps[:-i])
    cache = cache + (cache[i] * now)
    # for step in steps:
        # print(heap.data, seen, cache)
        # t = i + step
        # if t <= n:
            # cache[t] += cache[i]
            # cache[t] %= mod

    
print(cache[n] % mod)

Submission status: Runtime Error

Solution code:
import bisect
N, K = map(int, input().split())

LR = [list(map(int, input().split())) for i in range(K)]
S = set()
for i in LR:
    for j in range(i[0], i[1]+1):
        S.add(j)
L = sorted(list(S))

dp = [0 for i in range(N)]
dp[0] = 1
for i in range(1, N):
    x = bisect.bisect(L, i)
    t = L[:x]
    for j in t:
        dp[i] += dp[i-j]
    dp[i] = dp[i] % 998244353

print(dp[-1] % 998244353)

Submission status: Runtime Error

Solution code:
import math

N = int(input())
cnt = 0
if N == 2:
    cnt = 1
elif N == 3:
    cnt = 3
elif N > 3:
    cnt = 3
    for i in range(1,N-1):
        A = N-i
        rA = math.sqrt(A)
        intA = math.floor(rA)
        if rA == intA:
            cnt -= 1
        if intA == 1:
            cnt += 1
        else:
            for j in range(1,intA+1):
                if A%j == 0:
                    cnt += 2

print(cnt)

Submission status: Runtime Error

Solution code:
list = []
x = 0
y = 0
n = int(input())
for i in range(n):
    a,b = map(int,input().split())
    list.append(a)
    list.append(b)
for _ in range(n):
    if list[x] == list[x+1]:
        if not list[x+1] == list[-1]:
            if list[x+2] == list[x+3]:
                if not list[x+3] == list[-1]:
                    if list[x+4] == list[x+5]:
                        y = 1
    if not x+7 > len(list):
        x = x + 2
if y == 0:
    print('No')
else:
    print('Yes')

Submission status: Runtime Error

Solution code:
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 math

N = int(input())

if N == 2:
    cnt = 1
elif N == 3:
    cnt = 3
elif N > 3:
    cnt = 3
    for i in range(1,N-1):
        A = N-i
        rA = math.sqrt(A)
        intA = math.floor(rA)
        if rA == intA:
            cnt -= 1
        if intA == 1:
            cnt += 1
        else:
            for j in range(1,intA+1):
                if A%j == 0:
                    cnt += 2

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,X,M = map(int, input().split())


A = [-1]*(M+100)
A[0] = X
i = 0
tmpans = 0
flag = False
check = [-1]*(M+1)
slice = -1
while i< N-1:
    newa = A[i]**2%M
    i+= 1
    if check[newa] != -1:
        flag = True
        slice = check[newa]
        break
    A[i] = newa
    check[newa] = i

if not flag:
    print(sum(A[:i+1]))

else:
    print(sum(A[:slice])+ sum(A[slice:i])*((N-slice)//(i-slice))+sum(A[slice:slice + (N-slice)%(i-slice)]))

Submission status: Runtime Error

Solution code:
import sys
N = int(input().strip())

if(N == 0):
  sys.exit()



a = []
c =0
f = 0
for i in range(N):
    array = list(map(int, input().strip().split()))
    a.append(array)
#print(a[4][1])
for i in range(N):
	if(f == 0 or f == i-1):
		if(a[i][0] == a[i][1]):
			f=i
			c+=1
		else:
			f=0
			c=0
if(c >= 3):
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

Solution code:
import math

N = int(input())

if N == 2:
    cnt = 1
elif N == 3:
    cnt = 3
    
elif N > 3:
    for i in range(1,N-1):
        A = N-i
        rA = math.sqrt(A)
        intA = math.floor(rA)
        if rA == intA:
            cnt -= 1
        if intA == 1:
            cnt += 1
        else:
            for j in range(1,intA+1):
                if A%j == 0:
                    cnt += 2

print(cnt)

Submission status: Runtime Error

Solution code:
import sys
S=""
S=sys.argv[1]
len(S)<=1000
if S[-1] == 's':
   S=S+'es'
else:
	S=S+'s'
print(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:
word = input()
if word[-1] == 's':
  return ''.join(word, 'es')
else:
  return ''.join(word, 's')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
m = 2
z = 0

for i in range(n-2):
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                arr.append([i, cnt])

        if temp!=1:
            arr.append([temp, 1])

        if arr==[]:
            arr.append([m, 1])

        return arr

    x = 0
    y = 1

    r = factorization(m)
    l = len(r)

    for i in range(l):
        y = y * (r[x][1]+1)
        x+=1


    m+=1
    z = z + y

print(z+1)

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:
n = int(input())
m = 2
z = 0

for i in range(n-2):
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                arr.append([i, cnt])

        if temp!=1:
            arr.append([temp, 1])

        if arr==[]:
            arr.append([m, 1])

        return arr

    x = 0
    y = 1

    r = factorization(m)
    l = len(r)

    for i in range(l):
        y = y * (r[x][1]+1)
        x+=1


    m+=1
    z = z + y

print(z+1)

Submission status: Runtime Error

Solution code:
n,x,m = map(int,input().split())

def f(x,m):
    return x%m

ans = 0

for i in range(n):
    ans += x
    x = f(x**2,m)

print(ans)

Submission status: Runtime Error

Solution code:

N = int(input())
cnt = 0 
for a in range(1,N//2+1):
    for b in range(a,N):
        if N - a * b > 0:
            if a == b:
                cnt += 1
            else:
                cnt += 2
print(cnt)

Submission status: Runtime Error

Solution code:
l=list(S.split(''))
if l[-1]=='s':
  l.append('es')
else:
  l.append('s')
a=''.join(l)
print(a)

Submission status: Runtime Error

Solution code:
s = input()
if l[-1] == 's':
    s += 'es'
else:
    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:
import sys

N, K = list(map(int, input().split()))
MOD = 998244353

sys.setrecursionlimit(N * 3)

L = []
R = []
for _ in range(K):
    l, r = list(map(int, input().split()))
    L.append(l)
    R.append(r)

memo = [None] * (N + 1)

def f(x):
    if x < 0:
        return 0
    if memo[x] is None:
        memo[x] = _f(x)
    # print(x, memo[x])
    return memo[x]


def _f(x):
    if x < 1:
        return 0
    if x == 1:
        return 1
    ans = 0
    for k in range(K):
        for i in range(L[k], R[k] + 1):
            ans += f(x - i)
            ans %= MOD
    return ans % MOD

print(f(N) % MOD)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
while(S.isalpha()):
  if S.lower()==S:
    l=list(S.split(''))
    if l[-1]=='s':
      l.append('es')
    else:
      l.append('s')
    a=''.join(l)
    print(a)

Submission status: Runtime Error

Solution code:
N=int(input())
a=1
count=0
while a<N:
  b=1
  #print(a,b)
  for i in range(N//a+1):
    c=N-a*b
    if c>0:
      count+=1
      #print(a,b,c)
    b+=1
  a+=1
print(count)

Submission status: Runtime Error

Solution code:
s = input()

if s[-1] != "s":
  s.append("s")
  
else:
  s.append("es")
  
print(s)

Submission status: Runtime Error

Solution code:
from sys import stdin
input=stdin.readline
n=int(input().rstrip())
count=0
for i in range(1,n):
    
    for t in range(1,n):
        if n-i*t>0:
            count +=1
        else:
            break
print(count)

Submission status: Runtime Error

Solution code:
import numpy as np
num=input().split(' ')
count=0
plot=np.zeros([int(num[0]),int(num[0])])
t=[]
for a in range(int(num[1])):
  tmp=input().split(' ')
  t.append([int(tmp[0])+a for a in range(int(tmp[1])-int(tmp[0])+1)])
for a in range(int(num[0])):
  if a==0:
    plot[0,0]=1
  else:
    for posit in np.where(plot[a-1]>0)[0]:
      for b in t:
        for c in b:
          if posit+c<int(num[0]):
	          plot[a,posit+c]+=plot[a-1,posit]
xx=int(np.sum(plot[:,-1]))
print(xx%998244353)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>

using namespace std;

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

count = 0
for i in range(n - 1):
    c = i + 1
    a_b = n - c
    for j in range(a_b):
        a = j + 1
        if a_b % a == 0:
            count += 1

print(count)

Submission status: Runtime Error

Solution code:
s = input()
n = len(s)

for i in range(n):
    if s[-1] == 's':
        print(s+es)
else:
    print(s+s)

Submission status: Runtime Error

Solution code:
 x= str(input())
a=list(x)
l=len(a)
if a[l-1]=='s':
    print(x+'es')
else:
    print(x+'s')

Submission status: Runtime Error

Solution code:
s = input()

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

Submission status: Runtime Error

Solution code:
import os,sys
c=0

n=input()
for i in range(int(n)):
    m=input()
    one=m[0]
    two=m[2]
    if(one==two):
        c+=1
    
if(c>=3):
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def N():
    return int(input())
def L():
    return list(map(int,input().split()))
def NL(n):
    return [list(map(int,input().split())) for i in range(n)]
mod = pow(10,9)+7
#import numpy
#import sympy
import math
def divisors(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1)):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    
    return num
n = N()
cnt = 0
for i in range(1,n):
    ab = n-i
    cnt += divisors(ab)
print(cnt)

Submission status: Runtime Error

Solution code:
n,k = map(int,input().split())
st = set([])
for i in range(k):
  x,y = map(int,input().split())
  for z in range(x,y+1):
    st.add(z)
ans = [1]
for i in range(1,n):
  s = 0
  for x in st:
    if i >= x:
      s = s + ans[i-x]
  ans.append(s % 998244353)   
  
print(ans[-1])

Submission status: Runtime Error

Solution code:
a = input().split()
if a.endswith('e') :
 print(a+'s')
elif  a.endswith('s'):
 print(a+'es')
else:
 print(a)

Submission status: Runtime Error

Solution code:
def main():
    N, X, M = map(int, input().split())
    NN = N
    li = []
    while X not in li and N != 0:
        li = li + [X]
        X = X ** 2 % M
        N -= 1
    
    if N == 0:
        print(sum(x for x in li))

    elif N != 0 and X in li:
        l = len(li)
        s = li.index(X)
        T = l - s
        q = (NN - s) // T
        r = (NN - s) % T
        print(sum(li[i] for i in range(s)) + sum(li[i] for i in range(s, len(li))) * q + sum(li[i] for i in range(s, s + r)))


main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = map(int, input().split())
if a.endswith('e'):
 print(a+'s')
elif  a.endswith('s'):
 print(a+'es')
else:
 print(a)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,x,m=map(int,raw_input().split()) 
v=[x] 
t={x:1} 
ok=1
while True: 
    y=(x*x)%m 
    if y==0: 
        print sum(v);ok=0;break
    if y in t: 
        break 
    else: 
        t[y]=1 
        v.append(y) 
        x=y 
g=n%(len(v)) 
ans=0
for i in range(len(v)): 
    if i>g: 
        ans+=((n/len(v))*(v[i]) )
        
    else: 
        ans+=((n/len(v)+1)*v[i]) 
       
if ok:
    print ans

Submission status: Runtime Error

Solution code:
n = int(input())
c=0
for i in range(1,n):
  a = 0
  while a<n-i:
    a+=i
    c+=1
 
print(c)

Submission status: Runtime Error

Solution code:
N = int(input())
A=[list(map(int, input().split())) for i in range(N)]
num = 0
zoro = 0
while num < N:
  if A[num][0] ==A[num][1]:
    num +=1
    zoro +=1 
  else:
    num +=1
    if zoro >2:
      zoro = zoro
    else:
      zoro = 0
if zoro >2 :
  print("Yes")
else:
  print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())  
num_list = []
for i in range(n):
    num_list.append(list(map(int,input().split())))

ans = []
for i in range(n):
  a = num_list[i]
  a1= a[0]
  a2 = a[1]
  if a1 == a2:
    ans.append(1)
    if i > 1 and ans[i-2] == 1 and ans[i-1] == 1 and ans[i] == 1:
      print('Yes')
      break
  else:
    ans.append(0)
if len(ans) == n:
  print('No')

Submission status: Runtime Error

Solution code:
n = int(input())
p = [list(map(int,input().split())) for i in range(n)]


a = p[0]
b = 0
ans  = 0
tf = 1

for j in range(n):
  if sum(p[j]) // 2 *2 ==sum(p[j]):
    ans += 1
  else:
    ans = 0
  if ans ==3:
    tf = 0
    print("Yes")
    break
    
if tf == 1:
  print("No")

Submission status: Runtime Error

Solution code:
n=int(input())
counter=0
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(n-i*k,n+1):
            if((i*j+k)==n):
                counter=counter+1
print(counter)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())

count = 0
for i in range(1,N):
    count += len(sympy.divisors(N-i))
print(count)

Submission status: Runtime Error

Solution code:
nk=input().split()
n=int(nk[0])
k=int(nk[1])
a=[]
for i in range(k):
    lr=input().split()
    l=int(lr[0])
    r=int(lr[1])
    for i in range(l,r+1):
        a.append(i) 
a=list(set(a))
dp=[0]*n
dp[0]=1
for i in range(1,n):
    for j in a:
        if i>=j:
            dp[i]+=dp[i-j]
print(dp[-1]%998244353)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
st = input()

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

Submission status: Runtime Error

Solution code:
n[1000]=input()
while(n.isalpha()):
  if n.lower()==n:
    l=list(n.split(''))
    if l[-1]=='s':
      l.append('es')
    else:
      l.append('s')
    s=''.join(l)
    print(s)
  else:
    print('Print the plural form of the given Taknese word.')

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
nk=input().split()
n=int(nk[0])
k=int(nk[1])
a=[]
for i in range(k):
    lr=input().split()
    l=int(lr[0])
    r=int(lr[1])
    for i in range(l,r+1):
        a.append(i) 
a=list(set(a))
dp=[0]*n
dp[0]=1
for i in range(1,n):
    for j in a:
        if i>=j:
            dp[i]+=dp[i-j]
print(dp[-1])

Submission status: Runtime Error

Solution code:
N = int(input())
z = 0
for a in range(N):
    for b in range(N):
        c = N - (a+1)*(b+1)
        if c > 0:
            z = z+1
        else:
            pass
print(z)

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0
for C in range(1,N):
  for A in range(1,N-C+1):
    B = (N-C)/A
    if B.is_integer():
      count += 1
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count=0

for num in range(n):
    d1,d2 = map(int,input().split())
    if d1 == d2:
        count += 1
else:
    if count>0:
        print("Yes")
    else:
        print("No")

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
d = 0
for a in range(1,N):
  for b in range(1,N):
    for c in range(1,N):
      if a*b+c == N:
        d += 1
print(d)

Submission status: Runtime Error

Solution code:
S = str(input(""))
if Word.endswith('y'):
    print(S[:-1]+"ies")
elif S.endswith(('o', 'ch', 's', 'sh', 'x', 'z')):
    print(S+"es")
else:
    print(S+"s")

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1

    else:
        count=0
if c==1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
s = input
if Taknese == s:
print("Takneses")
else:
  print("Taknese")
  
if apple == s:
print("apples")
else:
  print("apple")
  
if bus == s:
print("buses")
else:
  print("bus")

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1
            sys.exit()
    else:
        count=0
if c==1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
N = int(input())
count = 0
c = 0
for i in range(N):
    d1,d2 = input().split()
    if d1==d2:
        count+=1
        if count==3:
            c =1
    else:
        count=0
if count==1:
    print('Yes')
else:
    print('No')

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""Untitled3.ipynb

Automatically generated by Colaboratory.

Original file is located at
    https://colab.research.google.com/drive/1VVfPJl7_dXodPfxyID5RNKhqW1ZRqVux
"""

N= int(input())
count=0
for i in range(N):
  p,q=map(int,input().split(' '))
  if count<3:
    if p==q:
      count+=1
    else:
      count=0
  else:
    pass

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

Submission status: Runtime Error

Solution code:
from pattern.text.en import singularize

plurals = [int(input())]

singles = [singularize(plural) for plural in plurals]
print singles

Submission status: Runtime Error

Solution code:
n=input()
if n[len(n)-1]=="s":
  n.append("es")
else:
  n.append("s")
print("".join(n))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
count = 0
for i in range(n):
    if i == 0:
        count = 0
    else:
        if n % i == 0:
            count += (n//i) -1
        else:
            count += (n//i)
print(count)

Submission status: Runtime Error

Solution code:
N = int(input())
 
count = 0
for a in range(1, N):
    ans, mod = divmod(N, a)
    if mod == 0:
        count += ans - 1
    else:
        count += ans
 
print(count)

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:
input = input()
if input[-1]=='s':
  return input.append('es')
else:
  return input.append('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( S + "s" )

Submission status: Runtime Error

Solution code:
N = int(input())

count = 0
for a in range(1, N):
    ans, mod = divmod(N, a)
    if mod == 0:
        count += ans - 1
    else:
        count += ans

print(count)

Submission status: Runtime Error

Solution code:
n=int(input())
c,f=0,0
while(n>0):
  a,b=map(int,input().split())
  if(a==b):
    c+=1
  else:
    c=0
  if(c>=3):
    f=1
    break
  n-=1
if(f==1 or c>=3):
  print("Yes")
else:
  print("No")

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:
# -*- coding: utf-8 -*-
"""
Created on Sat Sep 19 13:14:17 2020

@author: Admin
"""


n,x,m=input().split()
m=int(m)
a=[int(x)]
for i in range(1,int(n)):
    zp=a[i-1]
    z=zp**2
    a.append(z%m)
    
print(sum(a))

Submission status: Runtime Error

Solution code:
word = input()
if(word[-s] == 's'):
	print(word+'es')
else:
	print(word+'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:
word = int(input())

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

Submission status: Runtime Error

Solution code:
n=int(input())
flag=0
ans=0

for i in range(n):
    d1,d2=map(int,input().split())
    if d1==d2:
        flag+=1
        if flag==3:
            ans=1
    else:
        flag=0
if ans!=1:
    print("No")
else:
    print("Yes")

Submission status: Runtime Error

Solution code:
N= int(input())
count=0
for i in range(N):
	p,q=map(int,input().split(' '))
	if p==q:
		count+=1
	else:
		count=0

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

Submission status: Runtime Error

Solution code:
s=input()
s_list=list(s)
 
x=len(s_list)

if s_list[x-1]=="s":
  s_list[x-1]="e"
  s_list[x]="s"
else:
  s_list.append("s")

print(s_list)

Submission status: Runtime Error

Solution code:
N = int(input())
nums =[]
count = 0
switch = False
for i in range(N):
    nums.append([int(x) for x in input().split()])

for j in nums:
    if j[0] == j[1]:
        count += 1
    elif j[0] != j[1]:
        count = 0
    if count == 3:
        switch = True
if switch == True:
    print("Yes")
elif switch == False:
    print("No")

Submission status: Runtime Error

Solution code:
word = input()
	if(word[-s] == 's'):
    	print(word+'es')
    else:
    	print(word+'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:
S = input()
if S[-1] = "s"
print( S + "es" )
else print( S + "s" )

Submission status: Runtime Error

Solution code:
n=input()
l=list(n.split(''))
if l[-1]='s':
  l.append('es')
else:
  l.append('s')
s=''.join(l)
print(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:
n = int(input())
a = []
for i in range(n):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        a.append(True)
    else:
        a.append(False)
a.append(False)
a.append(False)
for i in a:
    if i == True:
        if a[a.index(i)+1] and a[a.index(i)+2]:
            print("Yes")
            exit()
print("No")

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
word = input()
	if(word[-1] == 's'):
  		print(word+'es')
 	else:
      print(word+'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:
n = int(input())
d = [list(map(int, input().split())) for i in range(n)]
count = 0
jail = False
for i in range(n):
    if d[i][0] == d[i][1]:
        count += 1
        if count == 3:
            jail = True
            break        
    else: count = 0
if jail == True:
    print("Yes")
else : print("No")

Submission status: Runtime Error

Solution code:
s=input()
s_list=list(s)

x=len(s_list)

a_list=reversed(s_list)
if a_list[0]=="s":
  s_list[x]="e"
  s_list[x+1]="s"
else:
  s_list[x+1]="s"

print(s_list)