Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02909 (python)

Fixed submission:
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)%3])

Buggy submission (verdict: Runtime Error):
S=input()
list=["Sunny","Cloudy","Rainy"]
print(list[(list.index(S)+1)]%3)

Buggy submission (verdict: Runtime Error):
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[(list.index(S)+1)]%3)

Buggy submission (verdict: Runtime Error):
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[list.index((S)+1)])

Buggy submission (verdict: Runtime Error):
S=input()
list=[Sunny,Cloudy,Rainy]
print(list[S])
Problem p02958 (python)

Fixed submission:
N=int(input())
l=list(map(int,input().split()))
a=list(range(1,N+1))
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
N=int(input())
l=list(map(int,input().split()))
a=l.sort()
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
N=int(input())
l=list(map(int,input().split()))
a=l.sort()
count=0
for i in range(0,len(l)):
  if l[i]==a[i]:
    count+=1
if count >= N-2:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
N=list(input())
for i,j in range(N):
  N[i],N[j]=N[j],N[i]
  if N==N.sort():
    print("YES")
    break
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
N=list(input())
for i,j in range(N):
  N2=N[i],N[j]=N[j],N[i]
  if N2==N.sort():
    print("YES")
    break
else:
  print("NO")
Problem p02969 (python)

Fixed submission:
r=int(input())
print(3*(r**2))

Buggy submission (verdict: Runtime Error):
r=int(input())
print(3(r**2))

Buggy submission (verdict: Runtime Error):
r=int(input())
print(3(r**2))

Buggy submission (verdict: Runtime Error):
r=int(input())
print(3r**2)
Problem p02993 (python)

Fixed submission:
S=input()
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')

Buggy submission (verdict: Runtime Error):
S=input()
for i in range(3):
  if S[i]=S[i+1]:
    print("Bad")
    break
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
S=input()
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
S=int(input())
if S[0]=S[1] or S[1]=S[2] or S[2]=S[3]:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
S=int(input())
count=1
for i in range(3):
    if S[i] == S[i+1]:
        print('Bad')
        break
else:
    print('Good')
Problem p03035 (python)

Fixed submission:
A,B=list(map(int,input().split()))
if A>=13:
  print(B)
elif 6<=A<=12:
  print(B//2)
else:
  print(0)

Buggy submission (verdict: Runtime Error):
A,B=int(input())
if A>=13:
  print(B)
elif 6<=A<=12:
  print(B//2)
else:
  print(0)
Problem p02755 (python)

Fixed submission:
a, b = map(int, input().split())
for i in range(1002):
    if (i*0.08)//1==a and (i*0.1)//1==b:
        print(i)
        exit()
print('-1')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
price = (a // 0.09)+1
while (price * 0.08) => a:
    if (price * 0.1) //1== b:
        print(int(price))
        exit()
    price += 1
print('-1')
Problem p02730 (python)

Fixed submission:
s=list(input())
N=len(s)
s2=s[:(N-1)//2]
s3=s[((N+3)-1)//2:N+1]
if s==list(reversed(s)) and s2==list(reversed(s2)) and s3==list(reversed(s3)):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
palindrom = str(input())
if palindrom != palindrom[::-1]:
  return "No"
else:
  return "Yes"

Buggy submission (verdict: Runtime Error):
palindrom = input()
if palindrom != palindrom[::-1]:
  return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
  return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
  return "No"
else:
  return "Yes"

Buggy submission (verdict: Runtime Error):
palindrom = input()
if palindrom != palindrom[::-1]:
	return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
	return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
	return "No"
else
	return "Yes"

Buggy submission (verdict: Runtime Error):
palindrom = input()
if palindrom != palindrom[::-1]:
  return "No"
n = (len(palindrom)-1)/2
if palindrom[:n] != palindrom[:n:-1]:
  return "No"
n2 = (len(palindrom)+3)/2
if palindrom[:n2] != palindrom[:n2:-1]:
  return "No"
else
	reutn "Yes"
Problem p02761 (python)

Fixed submission:
import sys

n,m = input().split()
n,m = [int(n), int(m)]
num = 0
flag = 0
s = []
c = []

if m == 0:
  if n == 1:
    print(0)
    sys.exit()
    
  print(pow(10, n-1))
  sys.exit()

for i in range(m):
  s_i,c_i = input().split()
  s_i,c_i = [int(s_i), int(c_i)]
  flag = 0
  if n >= 2 and (s_i == 1 and c_i == 0):
    print(-1)
    sys.exit()
    
  for j in range(len(s)):
    if s[j] == s_i and c[j] != c_i:
      print(-1)
      sys.exit()
    elif s[j] == s_i and c[j] == c_i:
      flag = 1
  
  if flag == 1:
    continue
    
  s.append(s_i)
  c.append(c_i)
  
  num += c_i * pow(10, n-s_i)
  
  
if n >= 2 and num < pow(10, n-1):
  num += pow(10, n-1)
    
print(num)

Buggy submission (verdict: Runtime Error):
import sys

n,m = input().split()
n,m = [int(n), int(m)]
num = 0
flag = 0
s = []
c = []

if m == 0:
  if n == 1:
    print(0)
    sys.exit()
    
  print(pow(10, n-1))
  sys.exit()

for i in range(m):
  s_i,c_i = input().split()
  s_i,c_i = [int(s_i), int(c_i)]
  if n >= 2 and (s_i == 1 and c_i == 0):
    print(-1)
    sys.exit()
    
  for j in range(i):
    if s[j] == s_i and c[j] != c_i:
      print(-1)
      sys.exit()
    elif s[j] == s_i and c[j] == c_i:
      flag = 1
  
  if flag == 1:
    continue
    
  s.append(s_i)
  c.append(c_i)
  
  num += c_i * pow(10, n-s_i)
  
print(num)
Problem p02730 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
    if s[i] != s[-1*i-1]:
      return False
  return True

if len(s) < 3:
  ans = 'No'
else:
  if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
      ans = 'Yes'
    else:
      ans = 'No'
  else:
    ans = 'No'
    
print(ans)

Buggy submission (verdict: Runtime Error):
def kaibun(s):
    for i in range(len(s)-(len(s)%2)):
        if s[i] != s[-1*i-1]:
            return False
    return True

if kaibun(s):
    s_half = s[:(len(s)-1)//2]
    if kaibun(s_half):
        ans = 'Yes'
    else:
        ans = 'No'
else:
    ans = 'No'

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 入力
s = input()

def kaibun(s):
  for i in range(len(s)-(len(s)%2)):
  	if s[i] != s[-1*i-1]:
      return False
  return True

if kaibun(s):
  s_half = s[:(len(s)-1)//2]
  if kaibun(s_half):
    ans = 'Yes'
  else:
    ans = 'No'
else:
  ans = 'No'

# 出力
print(ans)
Problem p02731 (python)

Fixed submission:
# -*- coding: utf-8 -*-
# 入力
L = int(input())

print((L/3)**3)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 入力
L = input()

print((L/3)**3)
Problem p02861 (python)

Fixed submission:
N=int(input())
dis_list=[list(map(int, input().split())) for _ in range(N)]
ans=0
for x1,y1 in dis_list:
  for x2,y2 in dis_list:
    ans += ((x1-x2)**2+(y1-y2)**2)**0.5
print(ans/N)

Buggy submission (verdict: Runtime Error):
N=int(input())
dis_list=[list(map(int, input().split())) for  in range(N)]
ans=0
for x1,y1 in dis_list:
  for x2,y2 in dis_list:
    ans += ((x1-x2)**2+(y1-y2)**2)**0.5
print(ans/N)
Problem p02953 (python)

Fixed submission:
N=int(input())
H=list(map(int, input().split()))
for i in range(N-1):
  if H[N-i-2]-H[N-i-1]==1:
    H[N-i-2]-=1
  elif H[N-i-2]-H[N-i-1]>1:
    print('No')
    exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
N=int(input())
H=list(map(int, input().split()))
c=0
s=[H[i]-H[i+1] for i in range(N-1)]
for i in range(N-2):
  if H[i]-H[i+2]>1:
    c=1
if N==2 and (H[0]-H[1])>1:
  c=1
if max(s)>1:
  c=1
print('Yes' if c==0 else 'No')
Problem p02957 (python)

Fixed submission:
A,B=map(int,input().split())
print((A+B)//2 if (A+B)%2==0 else 'IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
N=int(input())
p=list(map(int, input().split()))
s = [x for x in range(1,N+1) if x!=p[x-1]]
if len(s)<3:
  print("YES")
else:
  print("NO")
Problem p02999 (python)

Fixed submission:
X,A=map(int, input().split())
print(0 if X<A else 10)

Buggy submission (verdict: Runtime Error):
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(N) if sum(L[:x])<=X]
if N>=len(s):
  print(len(s))
else:
  print(N+1)
Problem p03000 (python)

Fixed submission:
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(len(L)+1) if sum(L[:x])<=X]
if N+1>=len(s):
  print(len(s))
else:
  print(N+1)

Buggy submission (verdict: Runtime Error):
N,X=map(int, input().split())
L=list(map(int, input().split()))
s=[x for x in range(N) if sum(L[:x])<=X]
if n>=len(s):
  print(len(s))
else:
  print(N+1)
Problem p03043 (python)

Fixed submission:
import math
N,K=map(int,input().split())
m=0
for i in range(1,N+1):
  if i<K:
    temp=math.ceil(math.log2(K/i))
    m+=(1/2)**temp
  else:
    m+=1
print(m/N)

Buggy submission (verdict: Runtime Error):
import math
N,K=map(int,input().split())
m=0
for i in range(1,N+1):
  if i<K:
    temp=math.ceil(math.log2(K/i))
    m+=(1/2)**temp
  else:
    ans+=1
print(m/N)
Problem p03059 (python)

Fixed submission:
A,B,T=map(int, input().split())
print((T//A)*B)

Buggy submission (verdict: Runtime Error):
N=int(input())
vs=list(map(int, input().split()))
cs=list(map(int, input().split()))
s=[v-c for v,c in zip(vs,cs) if v-c>0]
print(sum(s))
Problem p03087 (python)

Fixed submission:
N,Q=map(int,input().split())
S=[i for i in input()]
t=[0]*(N+1)
for i in range(N-1):
  t[i+1]=t[i]+(1 if S[i]=='A' and S[i+1]=='C' else 0)
for i in range(Q):
  l,r=map(int, input().split())
  print(t[r-1]-t[l-1])

Buggy submission (verdict: Runtime Error):
N,Q=map(int,input().split())
S=[i for i in input()]
t=[0]*(N+1)
for i in range(N):
  t[i+1]=t[i]+(1 if S[i]=='A' and S[i+1]=='C' else 0)
for i in range(Q):
  l,r=map(int, input().split())
  print(t[r-1]-t[l-1])
Problem p03240 (python)

Fixed submission:
n = int(input())
p = [list(map(int, input().split()))for _ in range(n)]
ax, ay, ah = list(filter(lambda x: x[2], p))[0]
for x in range(101):
    for y in range(101):
        H = ah+abs(ax-x)+abs(ay-y)
        if all(max(H-abs(t[0]-x)-abs(t[1]-y), 0) == t[2]for t in p):
            print(x, y, H)

Buggy submission (verdict: Runtime Error):
N=int(input())
p=[list(map(int, input().split())) for _ in range(N)]
ax, ay, ah = list(filter(lambda x: x[2], p))[0]
for i in range(101):
  for j in range(101):
    center=[i,j,ah+abs(ax-i)+abs(ay-j)]
    if all(t[2]==max(center[2]-abs(t[0]-center[0])-abs(t[1]-center[1]),0) for t in x) :
      print(center[0],center[1],center[2])

Buggy submission (verdict: Runtime Error):
N = int(input())
x = [list(map(int, input().split()))for _ in range(N)]
ax=x[0][0]
ay=x[0][1]
ah=x[0][2]
for x in range(101):
    for y in range(101):
        H = ah+abs(ax-x)+abs(ay-y)
        if all(max(H-abs(t[0]-x)-abs(t[1]-y), 0) == t[2]for t in p):
            print(x, y, H)

Buggy submission (verdict: Runtime Error):
N = int(input())
x = [list(map(int, input().split()))for _ in range(n)]
ax=x[0][0]
ay=x[0][1]
ah=x[0][2]
for x in range(101):
    for y in range(101):
        H = ah+abs(ax-x)+abs(ay-y)
        if all(max(H-abs(t[0]-x)-abs(t[1]-y), 0) == t[2]for t in p):
            print(x, y, H)
Problem p03282 (python)

Fixed submission:
S=input()
K=int(input())
i=0
for i in range(len(S)):
  if int(S[i])>1:
    c=i
    break
if K>i:
  print(int(S[i]))
else:
  print(1)

Buggy submission (verdict: Runtime Error):
S=input()
K=int(input())
i=0
while int(S[i])<2:
  i+=1
  if i==len(S)-1: break
print(int(S[i]))

Buggy submission (verdict: Runtime Error):
S=input()
K=int(input())
i=0
while int(S[i])<2:
  i+=1
print(int(S[i]))

Buggy submission (verdict: Runtime Error):
S=input()
i=0
while int(S[i])<2:
  i+=1
print(int(S[i]))
Problem p02730 (python)

Fixed submission:
def is_palindrome(s: str) -> bool:
    return s[::-1] == s

s = input()
n = len(s)
print(
  "Yes"
  if (
    is_palindrome(s)
    and is_palindrome(s[: int((n - 1) / 2)])
    and is_palindrome(s[int((n + 3) / 2) - 1 :])
  )
  else "No"
)

Buggy submission (verdict: Runtime Error):
s = input()
n = len(s)
print(
  "Yes"
  if (
    is_palindrome(s)
    and is_palindrome(s[: int((n - 1) / 2)])
    and is_palindrome(s[int((n + 3) / 2) - 1 :])
  )
  else "No"
)
Problem p02936 (python)

Fixed submission:
from sys import stdin, setrecursionlimit
setrecursionlimit(10000000)

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()


def dfs(node, prev):
    for i in graph[node]:
        if i != prev:
            inc[i] += inc[node]
            dfs(i, node)


n, q = mi()
inc = [0 for i in range(n+1)]
graph = [[] for i in range(n+1)]
for i in range(n-1):
    a, b = mi()
    graph[a].append(b)
    graph[b].append(a)
for i in range(q):
    a, b = mi()
    inc[a] += b
dfs(1, -1)
print(*inc[1:])

Buggy submission (verdict: Runtime Error):
from sys import stdin

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()


def dfs(node, prev):
    for i in graph[node]:
        if i != prev:
            inc[i] += inc[node]
            dfs(i, node)


n, q = mi()
inc = [0 for i in range(n+1)]
graph = [[] for i in range(n+1)]
for i in range(n-1):
    a, b = mi()
    graph[a].append(b)
    graph[b].append(a)
for i in range(q):
    a, b = mi()
    inc[a] += b
dfs(1, -1)
print(*inc[1:])
Problem p02947 (python)

Fixed submission:
from sys import stdin, exit
from math import factorial
input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

def choose(x):
  return factorial(x)/(2*factorial(x-2))

words = {}

for i in range(int(input())):
    s = "".join(sorted(si()))
    if s not in words:
        words[s] = 1
    else:
        words[s] += 1
ans = 0
for i in words:
    if words[i] == 1: continue
    ans += choose(words[i])
print(int(ans))

Buggy submission (verdict: Runtime Error):
from sys import stdin, exit
from math import factorial
input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()

def choose(x):
  return factorial(x)/(2*factorial(x-2))

words = {}

for i in range(int(input())):
    s = "".join(sorted(si()))
    if s not in words:
        words[s] = 1
    else:
        words[s] += 1
ans = 0
print(words)
for i in words:
    ans += choose(words[i])
print(int(ans))
Problem p03166 (python)

Fixed submission:
from sys import stdin, exit, setrecursionlimit
setrecursionlimit(100000000)

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()


def dfs(node):
    if len(graph[node]) == 0:
        dp[node] = 0
        return 0
    if dp[node] != -1: return dp[node]
    ans = 0
    for i in graph[node]:
        ans = max(ans, dfs(i)+1)
    dp[node] = ans
    return ans


n, m = mi()
graph= [[] for i in range(n+1)]
for i in range(m):
    a, b = mi()
    graph[a].append(b)
dp = [-1]*(n+1)
for i in range(1, n+1):
    if dp[i] == -1:
        dfs(i)
print(max(dp))

Buggy submission (verdict: Runtime Error):
from sys import stdin, exit

input = stdin.readline
lmi = lambda: list(map(int, input().split()))
mi = lambda: map(int, input().split())
si = lambda: input().strip('\n')
ssi = lambda: input().strip('\n').split()


def dfs(node):
    if len(graph[node]) == 0:
        dp[node] = 0
        return 0
    if dp[node] != -1: return dp[node]
    ans = 0
    for i in graph[node]:
        ans = max(ans, dfs(i)+1)
    dp[node] = ans
    return ans


n, m = mi()
graph= [[] for i in range(n+1)]
for i in range(m):
    a, b = mi()
    graph[a].append(b)
dp = [-1]*(n+1)
for i in range(1, n+1):
    if dp[i] == -1:
        dfs(i)
print(max(dp))
Problem p02731 (python)

Fixed submission:
L = int(input())
print(pow(L/3,3))

Buggy submission (verdict: Runtime Error):
L = input(input())
print(pow(L/3,3))

Buggy submission (verdict: Runtime Error):
L = input()

print(pow(L/3,3))

Buggy submission (verdict: Runtime Error):
L = input()

L/=3
print(pow(L,3))
Problem p02730 (python)

Fixed submission:
S = input()
def kaibun_check(bun):
    if bun == bun[::-1]:
        return True
    else:
        return False
if kaibun_check(S):
    idx = int((len(S) -1)/2)
    if kaibun_check(S[:idx]):
        print("Yes")
    else:
        print("No")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = input()
def kaibun_check(bun):
    if bun == bun[::-1]
        return True
    else:
        return False
if kaibun_check(S):
    if kaibun_check(S[:len(S)/2]):
        print(Yes)
    else:
        print(No)
else:
    print(No)
Problem p02741 (python)

Fixed submission:
N = 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[N-1])

Buggy submission (verdict: Runtime Error):
N = 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[N-1])
Problem p02743 (python)

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

if 0 >  c - a - b:
    print('No')
else :
    if 4*a*b < (c - (a+b))**2:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
a,b,c = map(int,input().split())

if 2*math.sqrt(a)*math.sqrt(b) <  c - a - b:
    print('Yes')
else :
    print('No')
Problem p02811 (python)

Fixed submission:
k, n = [int(x) for x in input().split()]

if k*500 >= n:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
k, n = [int(x) for x input().split()]

if k*500 >= n:
  print("YES")
else:
  print("NO")
Problem p02818 (python)

Fixed submission:
a, b, c = [int(x) for x in input().split()]

ma = min(a, c)
a = a-ma
c = c-ma
ma = min(c, b)
b = b - ma
print(str(a)+" "+str(b))

Buggy submission (verdict: Runtime Error):
a, b, c = [int(x) for x input().split()]

ma = min(a, c)
a = a-ma
c = c-ma
ma = min(c, b)
b = b - ma
print(str(a)+" "+str(b))
Problem p02981 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
densha=n*a
taxi=b
if densha>taxi:
    print(taxi)
elif densha<taxi:
    print(densha)
else:
    print(densha)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=int(input())
b=int(input())
densha=n*a
taxi=b
if densha>taxi:
    print(taxi)
elif densha<taxi:
    print(densha)
else :
    print(densha)
Problem p02741 (python)

Fixed submission:
number = [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(number[int(input())-1])

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))

a = n[0]
aa = a*a
b = n[1]
bb = b*b
c = n[2]
cc = c*c

if aa+bb < cc :

	print("Yes")
  
else :

	print("No")

Buggy submission (verdict: Runtime Error):
number = [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(number[K-1])

Buggy submission (verdict: Runtime Error):
number = [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(number[k-1])

Buggy submission (verdict: Runtime Error):
n = [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(n[k-1])

Buggy submission (verdict: Runtime Error):
n = [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(n[k-1])

Buggy submission (verdict: Runtime Error):
n[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(n[k-1])

Buggy submission (verdict: Runtime Error):
n[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(n[k+1])

Buggy submission (verdict: Runtime Error):
n[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(n[k+1])

Buggy submission (verdict: Runtime Error):
K = [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(K[n+1])
Problem p02838 (python)

Fixed submission:
import numpy as np
n = int(input())
A = np.array(list(map(int, input().split())))
mod = 10 ** 9 + 7
ans = 0
for i in range(60):
    tmp = (A >> i) & 1
    x = np.count_nonzero(tmp)
    x *= n - x
    ans = (ans + pow(2, i, mod) * x) % mod
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
A = np.array(list(map(int, input().split())))
mod = 10 ** 9 + 7
ans = 0
for i in range(60):
    tmp = A & 1
    A >>= 1
    x = np.count_nonzero(tmp)
    x *= n - x
    ans = (ans + pow(2, i, mod) * x) % mod
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
A = np.array(list(map(int, input().split())))
mod = 10 ** 19 + 7
print(mod)
ans = 0
for i in range(60):
    tmp = (A >> i)
    x = np.count_nonzero(tmp)
    x *= n - x
    ans = (ans + pow(2, i, mod) * x) % mod
print(ans)
Problem p02789 (python)

Fixed submission:
s = input().split()
n = int(s[0])
m = int(s[1])
if(n==m):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s = input().split()
n = s[0]
m = s[1]
if (1<=n && n<=100 && 0<=m && m<=n):
  if (isinstance(n, int) && isinstance(m, int)):
    print(Yes)
  else:
    print(No)
else:
  print(No)
Problem p02743 (python)

Fixed submission:
a,b,c = map(int,input().split(" "))
right = c- a- b
if right > 0 and right ** 2 > 4 * a* b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import math
a,b,c = map(int,input())
left = math.sqrt(a) + math.sqrt(b)
right = math.sqrt(c)
if left < right:
    print("Yes")
else:
    print("No")