Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
#abc066d
mod=10**9+7

def com(n,r,m):
 f=[1,1]
 for i in range(2,n+1):
  f.append(f[i-1]*i%m)
 return f[n]*pow(f[r]*f[n-r]%m,m-2,m)%m


N=int(raw_input())
A=map(int,raw_input().split())
c=[-1]*N
for i in range(N+1):
 if c[A[i]-1]!=-1:
  break
 c[A[i]-1]=i
j=c[A[i]-1]
i=N-i
for k in range(1,N+2):
 res=com(N+1,k,mod)
 if k-1<=i+j:
  res-=com(i+j,k-1,mod)
 print res%mod


Fixed submission:
#abc066d
mod=10**9+7
fact=[1]*(10**5+2)
for n in range(1,10**5+2):
 fact[n]=n*fact[n-1]%mod

def com(n,k,m):
 return fact[n]*pow(fact[k],m-2,m)*pow(fact[n-k],m-2,m)%m

N=int(raw_input())
A=map(int,raw_input().split())
c=[-1]*N
for i in range(N+1):
 if c[A[i]-1]!=-1:
  break
 c[A[i]-1]=i
j=c[A[i]-1]
i=N-i
for k in range(1,N+2):
 res=com(N+1,k,mod)
 if k-1<=i+j:
  res-=com(i+j,k-1,mod)
 print res%mod

Buggy python submission (verdict: Time Limit Exceeded):
#abc066d
mod=10**9+7
def combi(n,r,mod):
 return fact[n]*pow(fact[r],mod-2,mod)*pow(fact[n-r],mod-2,mod)
fact=[1]
for i in range(1,10**6):
 fact.append(i*fact[-1]%mod)

def framod(n, mod, a=1):
    for i in range(1,n+1):
        a=a * i % mod
    return a

def power(n, r, mod):
    if r == 0: return 1
    if r%2 == 0:
        return power(n*n % mod, r//2, mod) % mod
    if r%2 == 1:
        return n * power(n, r-1, mod) % mod

def comb(n, k, mod):
    a=framod(n, mod)
    b=framod(k, mod)
    c=framod(n-k, mod)
    return (a * power(b, mod-2, mod) * power(c, mod-2, mod)) % mod

N=int(raw_input())
A=map(int,raw_input().split())
c=[-1]*N
for i in range(N+1):
 if c[A[i]-1]!=-1:
  break
 c[A[i]-1]=i
j=c[A[i]-1]
i=N-i
for k in range(1,N+2):
 res=comb(N+1,k,mod)
 if k-1<=i+j:
  res-=comb(i+j,k-1,mod)
 print res%mod


Fixed submission:
#abc066d
mod=10**9+7
fact=[1]*(10**5+2)
for n in range(1,10**5+2):
 fact[n]=n*fact[n-1]%mod

def com(n,k,m):
 return fact[n]*pow(fact[k],m-2,m)*pow(fact[n-k],m-2,m)%m

N=int(raw_input())
A=map(int,raw_input().split())
c=[-1]*N
for i in range(N+1):
 if c[A[i]-1]!=-1:
  break
 c[A[i]-1]=i
j=c[A[i]-1]
i=N-i
for k in range(1,N+2):
 res=com(N+1,k,mod)
 if k-1<=i+j:
  res-=com(i+j,k-1,mod)
 print res%mod
Buggy python submission (verdict: Runtime Error):
n=int(raw_input())
a=map(int,raw_input().split())
#color=[hai,cha,midori,mizu,ao,ki,daidai,aka]
c=[0 for i in xrange(8)]
ext=0
for x in a:
 if 1<=x<=399:
  c[0]+=1
 elif 400<=x<=799:
  c[1]+=1
 elif 800<=x<=1199:
  c[2]+=1
 elif 1200<=x<=1599:
  c[3]+=1
 elif 1600<=x<=1999:
  c[4]+=1
 elif 2000<=x<=2399:
  c[5]+=1
 elif 2400<=x<=2799:
  c[6]+=1
 elif 2800<=x<=3199:
  c[7]+=1
 else:
  ext+=1
print c
res1=len(c)-c.count(0)
res2=min(res1+ext,len(c))
print res1,res2


Fixed submission:
#ABC064A

r,g,b=raw_input().split()
if int(r+g+b)%4:
 print 'NO'
else:
 print 'YES'
Buggy python submission (verdict: Runtime Error):
#ABC063B

s=raw_input()
l1=len(s)
l2=len(set(s))
if li==l2:
 print 'yes'
else:
 print 'no'


Fixed submission:
#ABC063B

s=raw_input()
l1=len(s)
l2=len(set(s))
if l1==l2:
 print 'yes'
else:
 print 'no'
Buggy python submission (verdict: Runtime Error):
#ARC069A

n,m=map(int,raw_input().split())
if n>m*2:
 res=c/2
else:
 res=n+(m-2*n)/4
print res


Fixed submission:
#ARC069A

n,m=map(int,raw_input().split())
if n>m/2:
 res=m/2
else:
 res=n+(m-2*n)/4
print res

Buggy python submission (verdict: Runtime Error):
#ARC069A

n,m=map(int,raw_input().split())
if n>m*2:
 res=c/2
else:
 res=(n*2+m)/4
print res


Fixed submission:
#ARC069A

n,m=map(int,raw_input().split())
if n>m/2:
 res=m/2
else:
 res=n+(m-2*n)/4
print res
Buggy python submission (verdict: Runtime Error):
#ABC054A

a,b=map(int<raw_input().split())
if a==1:
 a=14
if b==1:
 b=14
if a>b:
 print 'Alice'
elif a<b:
 print 'Bob'
else:
 print 'Draw'


Fixed submission:
#ABC054A

a,b=map(int,raw_input().split())
if a==1:
 a=14
if b==1:
 b=14
if a>b:
 print 'Alice'
elif a<b:
 print 'Bob'
else:
 print 'Draw'
Buggy python submission (verdict: Runtime Error):
#ARC068C

n=int(raw_input())
if x<=6:
 print 1
else:
 res=n/11*2
 if n%11>=6:
  res+=2
 else:
  res+=1
 print res


Fixed submission:
#ARC068C

n=int(raw_input())

res=n/11*2
ref=n%11
if ref==0:
 print res
elif ref<=6:
 print res+1
else:
 print res+2
Buggy python submission (verdict: Runtime Error):
import sympy
import math

n=int(raw_input())
m=sympy.factorint(math.factorial(n))
res=1
v=m.values()
for i in xrange(len(v)):
 res*=v[i]+1
print res%(10**9+7)


Fixed submission:
#ARC052C

n=int(raw_input())
s=[1 for i in range(n+1)]
res=1
for i in range(2,n+1):
 if s[i]:
  for j in range(i*2,n+1,i):
   s[j]=0
  cnt=0
  temp=n
  while temp:
   cnt+=temp/i
   temp/=i
  res=res*(cnt+1)%(10**9+7)
print res

Buggy python submission (verdict: Runtime Error):
import sympy
import math

n=int(raw_input())
m=sympy.factorint(math.factorial(n))
print m
res=1
v=m.values()
for i in xrange(len(v)):
 res*=v[i]+1
print res%(10**9+7)


Fixed submission:
#ARC052C

n=int(raw_input())
s=[1 for i in range(n+1)]
res=1
for i in range(2,n+1):
 if s[i]:
  for j in range(i*2,n+1,i):
   s[j]=0
  cnt=0
  temp=n
  while temp:
   cnt+=temp/i
   temp/=i
  res=res*(cnt+1)%(10**9+7)
print res
Buggy python submission (verdict: Runtime Error):
#ABC050B

n=int(raw_input())
t=map(int,raw_input().split())
m=int(raw_input())
v=[]
for i in xrange(m):
 u=t[:]
 p,x=map(int,raw_input().split())
 u[p-1]=x
 v.append(sum(u))
for i in xrange(m):
 print v[i]


Fixed submission:
#ABC050A

res=raw_input()
res=res.replace(' ','')
print eval(res)
Buggy python submission (verdict: Runtime Error):
ABC048B

a,b,x=map(int,raw_input().split())
res=b/x
if a!=0:
 res-=(a-1)/x
else:
 res+=1
print res


Fixed submission:
#ABC048A

print 'A'+raw_input().split()[1][0]+'C'
Buggy python submission (verdict: Runtime Error):
ABC048B

a,b,x=map(int,raw_input().split())
res=b/x
if a!=0:
 res-=(a-1)/x
else:
 res+=1
print res


Fixed submission:
#ABC048B

a,b,x=map(int,raw_input().split())
res=b/x
if a!=0:
 res-=(a-1)/x
else:
 res+=1
print res
Buggy python submission (verdict: Runtime Error):
#agc007a

h,w=map(int(raw_input())
cnt=0
for i in range(h):
 cnt+=raw_input().count('#')
if cnt==h+w-1
 print 'Possible'
else:
 print 'Impossible'


Fixed submission:
#agc007a

h,w=map(int,raw_input().split())
cnt=0
for i in range(h):
 cnt+=raw_input().count('#')
if cnt==h+w-1:
 print 'Possible'
else:
 print 'Impossible'
Buggy python submission (verdict: Runtime Error):
#ABC046B

n,k=map(int,raw_input().split())
print k*((k-1)**(n-1))


Fixed submission:
#ABC046A
s=set(raw_input().split())
print len(s)
Buggy python submission (verdict: Time Limit Exceeded):
#AGC005A

x=raw_input()
while x.count('ST')>0:
 x=x.replace('ST','')
print len(x)


Fixed submission:
#AGC005A

s=raw_input()
res=0
for c in s:
 if c=='S':
  res+=1
 elif c=='T' and res>0:
  res-=1
print res*2

Buggy python submission (verdict: Time Limit Exceeded):
#AGC005A

x=raw_input()
while x.count('ST')>0:
 x=x.replace('ST','')
print len(x)


Fixed submission:
#AGC005A

s=raw_input()
res=0
for c in s:
 if c=='S':
  res+=1
 elif c=='T' and res>0:
  res-=1
print res*2

Buggy python submission (verdict: Time Limit Exceeded):
#AGC005A

x=raw_input()
while x.count('ST')!=0:
 x=x.replace('ST','')
print len(x)


Fixed submission:
#AGC005A

s=raw_input()
res=0
for c in s:
 if c=='S':
  res+=1
 elif c=='T' and res>0:
  res-=1
print res*2

Buggy python submission (verdict: Time Limit Exceeded):
#AGC005A

x=raw_input()
while x.count('ST')!=0:
 x=x.replace('ST','')
print len(x)


Fixed submission:
#AGC005A

s=raw_input()
res=0
for c in s:
 if c=='S':
  res+=1
 elif c=='T' and res>0:
  res-=1
print res*2

Buggy python submission (verdict: Time Limit Exceeded):
#AGC005A

x=raw_input()
while x.count('ST')!=0:
 x=x.replace('ST','')
print len(x)


Fixed submission:
#AGC005A

s=raw_input()
res=0
for c in s:
 if c=='S':
  res+=1
 elif c=='T' and res>0:
  res-=1
print res*2
Buggy python submission (verdict: Time Limit Exceeded):
#abc045_b
import sys

a=raw_input()
b=raw_input()
c=raw_input()

ch=a[0]

while True:
 if ch=='a':
  a=a[1:]
  if len(a)==0:
   print 'A'
   sys.exit()
  ch=a[0]
 elif ch=='b':
  b=b[1:]
  if len(b)==0:
   print 'B'
   sys.exit()
  ch=b[0]
 elif ch=='c':
  c=c[1:]
  if len(c)==0:
   print 'C'
   sys.exit()
  ch=c[0]
 

Fixed submission:
#ABC045A

a=int(raw_input())
b=int(raw_input())
h=int(raw_input())
print (a+b)*h/2
Buggy python submission (verdict: Runtime Error):
#AGC003B

n=int(raw_input())
s=[]
for i in xrange(1,n+1):
 x=int(raw_input())
 for j in xrange(x):
  s.append(i)
cnt=0
i=0
while i<len(s)-1:
 if s[i+1]-s[i]==0 or s[i+1]-s[i]==1:
  cnt+=1
  i+=2
 else:
  i+=1
print cnt


Fixed submission:
#AGC003A

s=raw_input()
l=[s[i] for i in xrange(len(s))]
if l.count('N')==0 and l.count('S')>0:
 print "No"
elif l.count('N')>0 and l.count('S')==0:
 print "No"
elif l.count('E')==0 and l.count('W')>0:
 print "No"
elif l.count('E')>0 and l.count('W')==0:
 print "No"
else:
 print "Yes"

Buggy python submission (verdict: Runtime Error):
#AGC003B

n=int(raw_input())
s=[]
for i in xrange(1,n+1):
 x=int(raw_input())
 for j in xrange(x):
  s.append(i)
cnt=0
i=0
while i<len(s)-1:
 if s[i+1]-s[i]==0 or s[i+1]-s[i]==1:
  cnt+=1
  i+=2
 else:
  i+=1
print cnt


Fixed submission:
#AGC003A

s=raw_input()
l=[s[i] for i in xrange(len(s))]
if l.count('N')==0 and l.count('S')>0:
 print "No"
elif l.count('N')>0 and l.count('S')==0:
 print "No"
elif l.count('E')==0 and l.count('W')>0:
 print "No"
elif l.count('E')>0 and l.count('W')==0:
 print "No"
else:
 print "Yes"
Buggy python submission (verdict: Time Limit Exceeded):
#AGC003B

n=int(raw_input())
s=[]
for i in xrange(1,n+1):
 x=int(raw_input())
 for j in xrange(x):
  s.append(i)
cnt=0
i=0
while i<len(s)-1:
 if s[i+1]-s[i]==0 or s[i+1]-s[i]==1:
  cnt+=1
  i+=2
 else:
  i+=1
print cnt


Fixed submission:
#AGC003B

n=int(raw_input())
s=[int(raw_input()) for i in xrange(n)]
cnt=0
temp=0
for d in s:
 cnt+=(d+temp)/2
 if d==0:
  temp=0
 else:
  temp=(d+temp)%2
print cnt

Buggy python submission (verdict: Time Limit Exceeded):
#AGC003B

n=int(raw_input())
s=[]
for i in xrange(1,n+1):
 x=int(raw_input())
 for j in xrange(x):
  s.append(i)
cnt=0
i=0
while i<len(s)-1:
 if s[i+1]-s[i]==0 or s[i+1]-s[i]==1:
  cnt+=1
  i+=2
 else:
  i+=1
print cnt


Fixed submission:
#AGC003B

n=int(raw_input())
s=[int(raw_input()) for i in xrange(n)]
cnt=0
temp=0
for d in s:
 cnt+=(d+temp)/2
 if d==0:
  temp=0
 else:
  temp=(d+temp)%2
print cnt
Buggy python submission (verdict: Runtime Error):
#coding: utf-8
#ABC043D
import sys

s=raw_input()

for i in xrange(len(s)-1):
 if s[i]==s[i+1]:
  print i+1,i+2
  sys.exit()

for i in xrange(len(s)-1):
 if s[i]==s[i+2]:
  print i+1,i+3
  sys.exit()
  
print -1,-1


Fixed submission:
#coding: utf-8
#ABC043D
import sys

s=raw_input()

for i in xrange(len(s)-1):
 if s[i]==s[i+1]:
  print i+1,i+2
  sys.exit()

for i in xrange(len(s)-2):
 if s[i]==s[i+2]:
  print i+1,i+3
  sys.exit()
  
print -1,-1
Buggy python submission (verdict: Runtime Error):
#coding: utf-8
#ABC042C

n,k=map(int,raw_input().split())
d=raw_input().split()

while True:
 if all(x not in str(n) for x in d):
  res=n
  break
 n+=1
 
print res


Fixed submission:
#coding: utf-8
#ABC042A

l=map(int,raw_input().split())

if l.count(5)==2 and l.count(7)==1:
 print "YES"
else:
 print "NO"

Buggy python submission (verdict: Runtime Error):
#coding: utf-8
#ABC042B

n,l=map(int,raw_input().split())
s=[raw_input() for i in xrange(n)]

s.sort()
res="".join(s)
print res


Fixed submission:
#coding: utf-8
#ABC042A

l=map(int,raw_input().split())

if l.count(5)==2 and l.count(7)==1:
 print "YES"
else:
 print "NO"
Buggy python submission (verdict: Runtime Error):
n = int(input())
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]
count = 0
total = 0

for _ in range(n):
  total += 1
  if x[n] == y[n]:
    count += 1
    if count == 3:
      print("Yes")
      break
  else:
    count = 0
  if total == n and count < 3:
    print("No")

Fixed submission:
n = int(input())
a = []

for _ in range(n):
  aa, b = map(int,input().split())
  if aa == b:
    a.append("1")
  else:
    a.append("0")
if "111" in "".join(a):
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())
print(max(a*c, a*d, b*c, b*d))

Fixed submission:
a, b, c, d = map(int, input().split())
print(max(a * c, a * d, b * c, b * d))
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ans = 10000
for i in range(len(s) - len(t) + 1):
  tmp = 0
  for i in range(len(t)):
    if s[i + j] != s[j]:
      tmp+=1
    ans = min(ans, tmp)
print(ans)

Fixed submission:
s = input()
t = input()
 
ans = 10000
for i in range(len(s) - len(t) + 1):
  tmp = 0
  for j in range(len(t)):
    if s[i + j] != t[j]:
      tmp+=1
  ans = min(ans, tmp)
print(ans)
Buggy python submission (verdict: Runtime Error):
a = int(input())
total = a + a**2 + a**3
ptint(total)

Fixed submission:
a = int(input())
total = a + a**2 + a**3
print(total)
Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split())
         
for i in range(5):
	if x[i] == 0:
    	print(i+1)

Fixed submission:
a, b, c, d, e = map(int,input().split())

if a == 0:
  print(1)
elif b == 0:
  print(2)
elif c == 0:
  print(3)
elif d == 0:
  print(4)
elif e == 0:
  print(5)

Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split())
for i in range(5):
	if x[i] == 0:
         print(i+1)
        

Fixed submission:
a, b, c, d, e = map(int,input().split())

if a == 0:
  print(1)
elif b == 0:
  print(2)
elif c == 0:
  print(3)
elif d == 0:
  print(4)
elif e == 0:
  print(5)

Buggy python submission (verdict: Runtime Error):
x = list(map(int,input().split())
         
for i in range(5):
	if x[i] == 0:
    	print(i+1)
  

Fixed submission:
a, b, c, d, e = map(int,input().split())

if a == 0:
  print(1)
elif b == 0:
  print(2)
elif c == 0:
  print(3)
elif d == 0:
  print(4)
elif e == 0:
  print(5)

Buggy python submission (verdict: Runtime Error):
x=map(int,input().split())
 
for i in range(5):
    if x[i]==0:
        print(i+1)

Fixed submission:
a, b, c, d, e = map(int,input().split())

if a == 0:
  print(1)
elif b == 0:
  print(2)
elif c == 0:
  print(3)
elif d == 0:
  print(4)
elif e == 0:
  print(5)
Buggy python submission (verdict: Runtime Error):
a, b = list(map, input().split())
print(a * b)

Fixed submission:
a, b = list(map(int, input().split()))
print(a * b)

Buggy python submission (verdict: Runtime Error):
a, b = int(input())
total = a * b
print(total)

Fixed submission:
a, b = list(map(int, input().split()))
print(a * b)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n % 10 == 3:
  print("bon")
elif n % 10 == 0 or n % 10 == 1 or n % 10 == 6 or n % 10 == 8:
  pritn("pon")
else:
  print("hon")


Fixed submission:
n = int(input())
d = n%10
 
if d in [2, 4, 5, 7, 9]:
  print("hon")
elif d in [0, 1, 6, 8]:
  print("pon")
elif d in [3]:
  print("bon")

Buggy python submission (verdict: Runtime Error):
n = int(input())
d = n%10

if d in [2, 4, 5, 7, 9]:
  print("hon")
elif d in [0, 1, 6, 8]:
  print("pon")
else d in [3]:
  print("bon")

Fixed submission:
n = int(input())
d = n%10
 
if d in [2, 4, 5, 7, 9]:
  print("hon")
elif d in [0, 1, 6, 8]:
  print("pon")
elif d in [3]:
  print("bon")
Buggy python submission (verdict: Runtime Error):
S = input()
if s == "ABC":
  print("ARC")
else:
  print("ABC")

Fixed submission:
S = input()
if S == "ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = map(int, input().split())

 
for i in range(a, b+1):
	if i % k == 0:
    	print("OK")
    	break
else:
	print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for x in range(a, b+1):
    if x % k == 0:
        print('OK')
        break
else:
    print('NG')

Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = map(int, input().split())
B = b + 1
 
for i in range(a, B):
	if i % k == 0:
    	print("OK")
    	break
else:
	print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for x in range(a, b+1):
    if x % k == 0:
        print('OK')
        break
else:
    print('NG')

Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = map(int, input().split())
B = b + 1
 
for i in range(a, B):
	if i % k == 0:
    	print("OK")
    	break
else:
	print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for x in range(a, b+1):
    if x % k == 0:
        print('OK')
        break
else:
    print('NG')

Buggy python submission (verdict: Runtime Error):
k = int(input())
a, b = list(map, int(input()))
B = b + 1

for i in range(a, B):
  if i % k == 0:
    print("OK")
  else:
    print("NG")

Fixed submission:
k = int(input())
a, b = map(int, input().split())
 
for x in range(a, b+1):
    if x % k == 0:
        print('OK')
        break
else:
    print('NG')
Buggy python submission (verdict: Runtime Error):
n = int(input())

if n in 7:
  print("Yes")
elif n not in 7:
  print("No")

Fixed submission:
n = input()
if "7" in n:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N = int(input())

if N.count(7) >= 1:
  print("Yes")
else:
  print("No")

Fixed submission:
n = input()
if "7" in n:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N =input()
if N.count("7") >= 1:
  pirnt("Yes)
else:
	print("No"9

Fixed submission:
n = input()
if "7" in n:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())

counted = n.count(7)

if counted == True:
  print("Yes")
else:
  print("No")

Fixed submission:
n = input()
if "7" in n:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())

a = b, b = a
a = c, c = a
print(a b c)


Fixed submission:
X, Y, Z = map(int, input().split())

print(Z, X, Y)
Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
total = sum(a)
if total/(4*m) > a[m]:
  print("No")
else:
  print("Yes")

Fixed submission:
n, m = map(int,input().split())
a = list(map(int,input().split()))
a.sort()
total = sum(a)
if total/(4*m) > a[-m]:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
x = int(input())
glad = x//*1000 + x%500//5*5
print(glad)


Fixed submission:
x = int(input())
glad = x//500*1000 + x%500//5*5
print(glad)
Buggy python submission (verdict: Runtime Error):
k = int(input())
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(a[k + 1])

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(a[K-1])

Buggy python submission (verdict: Runtime Error):
a = list[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(a[K])

Fixed submission:
a = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
K = int(input())
print(a[K-1])
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()

if a == b and b== c and a==c:
  print("No")
else:
  print("Yes")

Fixed submission:
s = input()
if "A" not in s or "B" not in s:
  print("No")
else:
  print("Yes")
Buggy python submission (verdict: Runtime Error):
n, a, b = map(int,input().split())

if a != 0:
  answer = n // (a+b)
  remainder = n % (a+b)
  print(answer*a) + min(a, remainder)
else:
  print(0)

Fixed submission:
n, a, b = map(int,input().split())
 
if a != 0:
  answer = n // (a+b)
  remainder = n % (a+b)
  print((answer*a) + min(a, remainder))
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
s, t = input().split()
a, b = map(int, input().split())
u = input()
 
if u == s:
  print(s-1,t)
elif u == t:
  print(s, t-1)

Fixed submission:
s, t = input().split()
a, b = map(int, input().split())
u = input()
 
if u == s:
  print(a-1,b)
elif u == t:
  print(a, b-1)

Buggy python submission (verdict: Runtime Error):
s, t = input().split()
a, b = map(int, input().split())
u = int(input())
 
if u == s:
  print(s-1,t)
elif u == t:
  print(s, t-1)

Fixed submission:
s, t = input().split()
a, b = map(int, input().split())
u = input()
 
if u == s:
  print(a-1,b)
elif u == t:
  print(a, b-1)

Buggy python submission (verdict: Runtime Error):
s, t = input()
a, b = map(int, input().split())
u = int(input())

if u == "red":
  print(int(s-1,t))
elif t == "blue":
  print(int(s, t-1))

Fixed submission:
s, t = input().split()
a, b = map(int, input().split())
u = input()
 
if u == s:
  print(a-1,b)
elif u == t:
  print(a, b-1)
Buggy python submission (verdict: Runtime Error):
c = int(input())
C = ord(c)
print(chr(C))

Fixed submission:
C = input() 

if C== "a" :
  print("b")
elif C== "b":
  print("c")
elif C== "c":
  print("d")
elif C== "d":
  print("e")
elif C== "e":
  print("f")
elif C== "f":
  print("g")
elif C== "g":
  print("h")
elif C== "h":
  print("i")
elif C== "i":
  print("j")
elif C== "j":
  print("k")
elif C== "k":
  print("l")
elif C== "l":
  print("m")
elif C== "m":
  print("n")
elif C== "n":
  print("o")
elif C== "o":
  print("p")
elif C== "p":
  print("q")
elif C== "q":
  print("r")
elif C== "r":
  print("s")
elif C== "s":
  print("t")
elif C== "t":
  print("u")
elif C== "u":
  print("v")
elif C== "v":
  print("w")
elif C== "w":
  print("x")
elif C== "x":
  print("y")
elif C== "y":
  print("z")
Buggy python submission (verdict: Runtime Error):
t1 = [int(i) for i in input().split()]
total = list1[0]*500
 
if total > list1[1]:
  print("Yes")
else:
  print("No")

Fixed submission:
k, x = map(int,input().split())

total = k * 500
if total >= x:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
S=input()
s=[S]

for i in range(1000):
  if s[i]%2==0:
    s.append(s[i]/2)
    if s[i+1] in s:
      print(i)
      break
  else:
    s.append(s[i]*3 + 1)
    if s[i+1] in s:
      print(i)
      break

Fixed submission:
s = int(input())
a = []
while(s not in a):
    a.append(s)
    if s%2==0:
        s = s//2
    else:
        s = 3*s + 1
print(len(a)+1)
Buggy python submission (verdict: Runtime Error):
S=input()
s=len(S)
if S[s] == "s":
  print(S+"es")
else:
  print(S+"s")
    

Fixed submission:
S=input()
s=len(S)
if S[s-1] == "s":
  print(S+"es")
else:
  print(S+"s")
Buggy python submission (verdict: Runtime Error):
if x==0:
  return 1
elif x==1:
  return 0
else:
  break

Fixed submission:
x=int(input())

if x==0:
  print(1)
else:
  print(0)
Buggy python submission (verdict: Runtime Error):
D=int(input())
T=int(input())
S=int(input())
limit_speed=D/T+D%T

if(limit_speed<=S):
  print("Yes")
else:
  print("No")


Fixed submission:
d, t, s = list(map(int, input().split(" ")))
 
min = d / s
 
if min <= t:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c=map(int,input()split())
sum=a+b+c

if sum >=22:
  print("bust")
else:
  print("win")

Fixed submission:
a,b,c=map(int,input().split())
sum=a+b+c
 
if sum >=22:
  print("bust")
else:
  print("win")
Buggy python submission (verdict: Runtime Error):
s=input()


if s=="Sunny":
  print("Cloudy")
elif s=="Cloudy":
  print("Rainy")
elif s=="Rainy":
  print("Sunny)

Fixed submission:
s=input()
 
 
if s=="Sunny":
  print("Cloudy")
elif s=="Cloudy":
  print("Rainy")
elif s=="Rainy":
  print("Sunny")
Buggy python submission (verdict: Time Limit Exceeded):
a,b=map(int,input().split())

S=[a,b]
M=max(S)

for i in range(M):
  if abs(a-i)==abs(b-i):
    print(i)
    exit()
print("IMPOSSIBLE")

Fixed submission:
A,B=map(int, input().split())
 
if (A+B)%2==0:
	print(int((A+B)/2))
else:
	print("IMPOSSIBLE")
Buggy python submission (verdict: Runtime Error):
n,a,b=map(int,input().split())

if n*a >= b:
  ptiny(b)
else:
  print(n*a)

Fixed submission:
n,a,b=map(int,input().split())
 
if n*a >= b:
  print(b)
else:
  print(n*a)