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

Fixed submission:
N,K=map(int,input().split())
count = 0
for i in range(1,N+1):
    h = list(map(int,input().split()))
    for j in h:
        if j >= K:
            count += 1
        else: continue
    break
print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
K = int(input())
count = 0
for i in range(1,N+1):
    n = int(input())
    if n >= K:
        count += 1
    else: continue
print(count)

Buggy submission (verdict: Runtime Error):
N = input()
K = input ()
A = int(N)
B = int(K)
j = 0
for i in range(1,A+1):
    n = input()
    a = int(n)
    if a >= B:
        j += 1
    else: continue
print(j)

Buggy submission (verdict: Runtime Error):
N = input()
K = input()
A = int(N)
B = int(K)
j = 0
for i in range(1,A+1):
  n = input()
  a = int(n)
  if a >= B:
	j += 1
    continue
  else: continue
print(j)
Problem p02677 (python)

Fixed submission:
import math
a,b,h,m = map(int , input().split())
long_needle =(5 * m)/60 + h * 5  
sort_needle = m
ans = math.sqrt(a**2 + b **2 - 2*a*b*math.cos(abs(math.pi*(long_needle-sort_needle))/30))
print(ans)

Buggy submission (verdict: Runtime Error):
import math
a,b,h,m = map(int , input().split())
long_needle =(5 * m)/60 + h * 5  
sort_needle = m
ans = math.sqrt(a**2 + b **2 - 2*a*b*abs(math.cos(abs(math.pi*(long_needle-sort_needle))/30))
print(ans)
Problem p02706 (python)

Fixed submission:
n,m = map(int,input().split())
all = list(map(int,input().split()))
result = 0

for i in range(m):
    result += all[i]

result = max(-1 ,n-(result))
print(result)

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

for i in range(m):
    result += all[i]

result = max(-1 ,n-(result))
print(result)
Problem p02713 (python)

Fixed submission:
from math import gcd
ans = 0
k = int(input())
for i in range(1, k+1):
	for j in range(1, k+1):
		for l  in range(1, k+1):
			ans += gcd(gcd(i, j), l)
print(ans)

Buggy submission (verdict: Runtime Error):
import math
import numpy as np
result = 0
n = int(input())
for i in range(1,n+1):
    for j in range(1,n+1):
        for k in range(1,n+1):
            result +=  np.gcd.reduce((i,j,k))
print(result)

Buggy submission (verdict: Runtime Error):
import math
import itertools
import numpy as np
def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1
list2 = []
result = 0
n = int(input())
for i in range(1,n+1):
    if(not(is_prime(i))):
        for j in range(1,n+1):
          for k in range(1,n+1):
#            list2.append([i,j,k])
#            result +=  np.gcd.reduce((i,j,k))
#            print(result ,i,k,j)
    else:
        result += n*n-1
for i in range(1,n+1):
    if(is_prime(i)):
        result += i
print(result)
#print(list2)
Problem p02717 (python)

Fixed submission:
#!/usr/bin/env python3
# from typing import *

# def solve(X: int, Y: int, Z: int) -> Any:
def solve(x, y, z):
    x, y = y, x
    x, z = z, x
    return x, y, z

# generated by online-judge-template-generator (https://github.com/kmyk/online-judge-template-generator)
def main():
    X, Y, Z = map(int, input().split())
    ans = solve(X, Y, Z)
    print(*ans)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
from typing import *

# def solve(X: int, Y: int, Z: int) -> Any:
def solve(x, y, z):
    x, y = y, x
    x, z = z, x
    return x, y, z

# generated by online-judge-template-generator (https://github.com/kmyk/online-judge-template-generator)
def main():
    X, Y, Z = map(int, input().split())
    ans = solve(X, Y, Z)
    print(*ans)

if __name__ == '__main__':
    main()
Problem p03046 (python)

Fixed submission:
#!/usr/bin/env python3
import functools
import operator

def solve(m, k):
    if k >= 2 ** m:
        return [-1]
    if m == 1 and k == 0:
        return [0, 1, 1, 0]
    b = list(range(2 ** m))
    b.remove(k)
    if functools.reduce(operator.xor, b, 0) != k:
        return [-1]
    a = b + [k] + list(reversed(b)) + [k]
    return a

print(*solve(*map(int, input().split())))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import functools
import operator

def solve(m, k):
    if k >= 2 ** m:
        return [-1]
    if m == 1 and k == 0:
        return [0, 1, 1, 0]
    b = list(range(2 ** m))
    b.remove(k)
    if functools.reduce(operator.xor, b) != k:
        return [-1]
    a = b + [k] + list(reversed(b)) + [k]
    return a

print(*solve(*map(int, input().split())))
Problem p03128 (python)

Fixed submission:
#!/usr/bin/env python3
math_inf = float('inf')  # the Python of AtCoder is too old

def solve(n, m, a):
    cost = [ math_inf, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]
    dp = [ None ] * (n + 1)
    dp[0] = 0
    for i in range(1, len(dp)):
        dp[i] = max([ dp[i - cost[a_i]] * 10 + a_i for a_i in a if cost[a_i] <= i ] + [ - math_inf ])
    return str(dp[n])


n, m = map(int, input().split())
a = list(map(int, input().split()))
print(solve(n, m, a))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
math_inf = float('inf')  # the Python of AtCoder is too old

def solve(n, m, a):
    cost = [ math_inf, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]

    small = [ None ] * min(100, n)
    small[0] = 0
    for i in range(1, len(small)):
        small[i] = max([ small[i - cost[a_i]] * 10 + a_i for a_i in a if cost[a_i] <= i ] + [ - math_inf ])

    min_cost, min_cost_a_i = min([ (cost[a_i], a_i) for a_i in a ])
    s = ''
    while n:
        k = (n - min_cost) // min_cost
        c = min_cost_a_i
        k, c = max([ ((n - cost[a_i]) // min_cost, a_i) for a_i in a if n - cost[a_i] >= 100 or small[n - cost[a_i]] >= 0 ])
        n -= cost[c]
        s += str(c)
    return s


n, m = map(int, input().split())
a = list(map(int, input().split()))
print(solve(n, m, a))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
import math

def solve(n, m, a):
    cost = [ math.inf, 2, 5, 5, 4, 5, 6, 3, 7, 6 ]

    small = [ None ] * min(100, n)
    small[0] = 0
    for i in range(1, len(small)):
        small[i] = max([ small[i - cost[a_i]] * 10 + a_i for a_i in a if cost[a_i] <= i ] + [ - math.inf ])

    min_cost, min_cost_a_i = min([ (cost[a_i], a_i) for a_i in a ])
    s = ''
    while n:
        k = (n - min_cost) // min_cost
        c = min_cost_a_i
        k, c = max([ ((n - cost[a_i]) // min_cost, a_i) for a_i in a if n - cost[a_i] >= 100 or small[n - cost[a_i]] >= 0 ])
        n -= cost[c]
        s += str(c)
    return s


n, m = map(int, input().split())
a = list(map(int, input().split()))
print(solve(n, m, a))
Problem p03675 (python)

Fixed submission:
#!/usr/bin/env python3
n = int(input())
a = input().split()
l = []
r = []
for a_i in a:
    r += [ a_i ]
    l, r = r, l
print(*(list(reversed(l)) + r))

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env python3
n = int(input())
a = input().split()
l = []
r = []
for a_i in a:
    r += [ a_i ]
    l, r = r, l
print(*reversed(l), *r)
Problem p02705 (python)

Fixed submission:
from math import pi

r=int(input())
print(2*pi*r)

Buggy submission (verdict: Runtime Error):
import numpy as np
r=int(input())
print('{:.2f}'.format(2*np.pi*r))
Problem p02675 (python)

Fixed submission:
N = int(input())
a = int(N/10)
c = N-a*10

if c == 0 or c==1 or c==6 or c==8:
   print("pon")
elif c==3:
   print("bon")
else:
   print("hon")

Buggy submission (verdict: Runtime Error):
A,B,H,M=(int(x) for x in input().split())

import math

time = H*60 + M
dist = (5.5 * time)%360
if 0 < dist < 180:
   dist = 360 - dist

ans = math.sqrt(A*A + B*B  - 2*A*B*math.cos(math.radians(dist)))

print(ans)

Buggy submission (verdict: Runtime Error):
a = int(N/10)
c = N-a*10

if c == 0 or c==1 or c==6 or c==8:
   print("pon")
elif c==3:
   print("bon")
else:
   print("hon")

Buggy submission (verdict: Runtime Error):
a = int(N/10)
c = N-a*10

if c == 0 or c==1 or c==6 or c==8:
   print("pon")
elif c==3:
   print("bon")
else:
   print("hon")
Problem p02677 (python)

Fixed submission:
A,B,H,M=(int(x) for x in input().split())

import math

time = H*60 + M
dist = (5.5 * time)%360
if 0 < dist < 180:
   dist = 360 - dist

ans = math.sqrt(A*A + B*B  - 2*A*B*math.cos(math.radians(dist)))

print(ans)

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
H = int(input())
M = int(input())

import math

time = H*60 + M
dist = (5.5 * time)%360
if 0 < dist < 180:
   dist = 360 - dist

ans = math.sqrt(A*A + B*B  - 2*A*B*math.cos(math.radians(dist)))

print(ans)
Problem p02675 (python)

Fixed submission:
ichinikurai = int(input()[-1])
if ichinikurai in [2,4,5,7,9]:
    print("hon")
elif ichinikurai in [0,1,6,8]:
    print("pon")
else:
    print("bon")

Buggy submission (verdict: Runtime Error):
ichinikurai = int(input()).[-1]
if ichinikurai in [2,4,5,7,9]:
    print("hon")
else if ichinikurai in [0,1,6,8]:
    print("pon")
else:
    print("bon")

Buggy submission (verdict: Runtime Error):
def therefore(i):
  ichinokurai = i[-1]
  if ichinokurai in [2,4,5,7,9]:
    return "hon"
  else if ichinokurai in [0,1,6,8]:
    return "pon"
  else:
    return "bon"
Problem p02681 (python)

Fixed submission:
S = input()
T = input()

if S == T[:len(T)-1]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())

if A>K:
    print(K)
elif (A+B)>=K:
    print(A)
else:
    print(A-(K-A-B))

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(int, input().split())

if A>K:
    print(K)
elif (A+B)>=K:
    print(A)
else:
    print(A-(K-A-B))

Buggy submission (verdict: Runtime Error):
A, B, C, K = map(float, input().split())

if A>K:
    print(K)
elif (A+B)>=K:
    print(A)
else:
    print(A-(K-A-B))
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if a*b%2 == 0:
    print("Even")
else:
    print("Odd")

Buggy submission (verdict: Runtime Error):
N = int(input())
pt, px, py = 0, 0, 0

for i in range (N):
    t, x, y = map(int, input().split())
    dt = t - pt
    dxy = x-px+y-py
    if dxy > dt or (dxy - dt)%2:
        print("No")
        exit()
    pt, px, py = t, x, y
print("Yes")
Problem p03457 (python)

Fixed submission:
n = int(input())
a,b,c=0,0,0
for i in range(n):
    t,x,y = map(int, input().split())
    sa = t-a
    if sa<abs(x-b)+abs(y-c):
        print("No")
        exit()
    else:
        tw = sa-abs(x-b)-abs(y-c)
        if tw%2!=0:
            print("No")
            exit()
    a,b,c=t,x,y
print("Yes")

Buggy submission (verdict: Runtime Error):
N = int(input())
pt, px, py = 0, 0, 0

for i in range (N):
    t, x, y = map(int, input().split())
    dt = t - pt
    dxy = x-px+y-py
    if dxy > dt or dxy%2 != dt%2:
        print("No")
        exit()
    pt, px, py = x, y, z
print("Yes")
Problem p02675 (python)

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

Buggy submission (verdict: Runtime Error):
K = int(input())
S = input()
if len(S) <= K:
  print(S)
else:
  print(S[:K]+"...")
Problem p04043 (python)

Fixed submission:
phrases = list(map(int, input().split(' ')))
if phrases.count(5) == 2 and phrases.count(7) == 1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
line1 = input().split(' ')
N = line1[0]
D = input().split(' ')
# print(D)
i = -1
while i > -len(N)-1:
    # print("here")
    while (N[i] in D):
        j = abs(i)
        k = (10**(j-1))
        N = str(int(N)+k)
        # print(N)
    i -= 1
print(N)
Problem p04046 (python)

Fixed submission:

# Function to find modulo inverse of b. It returns  
# -1 when inverse doesn't  
# modInverse works for prime m 
def gcd(b, m):
  if b == 0:
    return m
  return gcd(m%b, b)

def modInverse(b,m): 
    g = gcd(b, m) 
    if (g != 1): 
        # print("Inverse doesn't exist")  
        return -1
    else:  
        # If b and m are relatively prime,  
        # then modulo inverse is b^(m-2) mode m  
        return pow(b, m - 2, m) 
  
  
# Function to compute a/b under modulo m  
def modDivide(a,b,m): 
    a = a % m 
    inv = modInverse(b,m) 
    if(inv == -1): 
        print("Division not defined") 
    else: 
        return (inv*a) % m

MOD = (10 ** 9) + 7
H, W, A, B = list(map(int, input().split(' ')))

DP = []
j = 1
for i in range(1,200002):
    j *= i
    j %= MOD
    DP.append(j)

# print(DP)
def factorial(i):
    if (i == 0):
        return 1
    global DP
    # print(i)
    # print(i, DP[i-1])
    # print(DP[i-1])
    return DP[i-1]

def move2(H, W, A, B):
    numPaths = 0
    h = H-A
    w = W-(W-B)+1
    a = A+1
    pttp = 0
    for b in range(w, W+1):
        # print(h, b, a, W-b+1)
        ttp = (factorial(h+b-2)*modInverse((factorial(h-1)*factorial(b-1))% MOD, MOD)) % MOD
        tpttp = ttp
        ttp -= pttp
        pttp = tpttp
        btp = (factorial(a+(W-b+1)-2)*modInverse((factorial(a-1)*factorial(W-b))% MOD, MOD)) % MOD
        # btp = factorial(a+(W-b+1)-2)//(factorial(a-1)*factorial(W-b))
        numPaths += ttp*btp
    return numPaths

ways = move2(H, W, A, B)
print(ways % (10**9 + 7))

Buggy submission (verdict: Runtime Error):
import math 
  
# Function to find modulo inverse of b. It returns  
# -1 when inverse doesn't  
# modInverse works for prime m 
def modInverse(b,m): 
    g = math.gcd(b, m)  
    if (g != 1): 
        # print("Inverse doesn't exist")  
        return -1
    else:  
        # If b and m are relatively prime,  
        # then modulo inverse is b^(m-2) mode m  
        return pow(b, m - 2, m) 
  
  
# Function to compute a/b under modulo m  
def modDivide(a,b,m): 
    a = a % m 
    inv = modInverse(b,m) 
    if(inv == -1): 
        print("Division not defined") 
    else: 
        return (inv*a) % m

MOD = (10 ** 9) + 7
H, W, A, B = list(map(int, input().split(' ')))

DP = []
j = 1
for i in range(1,200002):
    j *= i
    j %= MOD
    DP.append(j)

# print(DP)
def factorial(i):
    if (i == 0):
        return 1
    global DP
    # print(i)
    # print(i, DP[i-1])
    # print(DP[i-1])
    return DP[i-1]

def move2(H, W, A, B):
    numPaths = 0
    h = H-A
    w = W-(W-B)+1
    a = A+1
    pttp = 0
    for b in range(w, W+1):
        # print(h, b, a, W-b+1)
        ttp = (factorial(h+b-2)*modInverse((factorial(h-1)*factorial(b-1))% MOD, MOD)) % MOD
        tpttp = ttp
        ttp -= pttp
        pttp = tpttp
        btp = (factorial(a+(W-b+1)-2)*modInverse((factorial(a-1)*factorial(W-b))% MOD, MOD)) % MOD
        # btp = factorial(a+(W-b+1)-2)//(factorial(a-1)*factorial(W-b))
        numPaths += ttp*btp
    return numPaths

ways = move2(H, W, A, B)
print(ways % (10**9 + 7))
Problem p02742 (python)

Fixed submission:
H,W = map(int,input().split())
if H == 1 or W == 1:
	print(1)
elif (H*W)%2 == 0:
	print(int(H*W/2))
else:
	print(int((H*W)//2+1))

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
if (H*W)%2== 0:
	print(long(H*W/2))
else:
	print(long((H*W)//2+1))
Problem p02760 (python)

Fixed submission:
import numpy as np
L=[]
bingo = np.zeros([3,3])
for i in range(3):
	L.append(input().split())
L = list(np.reshape(L,9))
N = int(input())
for i in range(N):
	l = input()
	if l in L:
		ptr = L.index(l)
		bingo[ptr/3,ptr%3]=1
#print(bingo)
ans = "No"
flg = 0
for i in range(3):
	flg = flg or bingo[i,0] and bingo[i,1] and bingo[i,2]
for i in range(3):
	flg = flg or bingo[0,i] and bingo[1,i] and bingo[2,i]
flg = flg or bingo[0,0] and bingo[1,1] and bingo[2,2]
flg = flg or bingo[2,0] and bingo[1,1] and bingo[0,2]
if flg == 1:
	ans = "Yes"
print(ans)

Buggy submission (verdict: Runtime Error):
for i in range(3):
	L[i] = list(map(int,input().split()))
import numpy as np
L=[]
bingo = np.zeros([3,3])
for i in range(3):
	L.append(input().split())
L = list(np.reshape(L,9))
N = int(input())
for i in range(N):
	l = input()
	if l in L:
		ptr = L.index(l)
		bingo[ptr/3,ptr%3]=1
#print(bingo)
ans = "No"
flg = 0
for i in range(3):
	flg = flg or bingo[i,0] and bingo[i,1] and bingo[i,2]
for i in range(3):
	flg = flg or bingo[0,i] and bingo[1,i] and bingo[2,i]
flg = flg or bingo[0,0] and bingo[1,1] and bingo[2,2]
flg = flg or bingo[2,0] and bingo[1,1] and bingo[0,2]
if flg == 1:
	ans = "Yes"
print(ans)
Problem p02853 (python)

Fixed submission:
en = list(map(int,input().split()))
sum = 0
for i in range(2):
	if en[i] == 1:
		sum += 300000;
	elif en[i] == 2:
		sum += 200000;
	elif en[i] == 3:
		sum +=100000;
if en[0] ==1 and en[1] == 1:
	sum += 400000
print(sum)

Buggy submission (verdict: Runtime Error):
en = list(map(int,input().split()))
sum = 0
for i in range(2):
	if en[i] == 1:
		sum += 30000
	elif en[i] == 2:
		sum += 20000;
	elif en[i] == 3:
		sum +=10000;
if en[0] ==1 and en[1] == 1:
	sum += 40000
print(sum)
Problem p02999 (python)

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

if X < A:
	print(0)
else:
	print(10)

Buggy submission (verdict: Runtime Error):
X, A = matp(int,input().split())

if X < A:
	print(0)
else:
	print(10)
Problem p02681 (python)

Fixed submission:
def main():
	S = input().split()[0]
	T = input().split()[0]
	T = T[:-1]
	if S == T:
		ans = 'Yes'
	else:
		ans ='No'
	return ans
     
if __name__ == '__main__':
	print(main())

Buggy submission (verdict: Runtime Error):
import re
def main():
	S = input().split()[0]
	T = input().split()[0]
	repatter = re.compile(S)
	result = repatter.match(T)
	if len(S) + 1 != len(T):
		return 'No'
	if S == result.group():
		ans = 'Yes'
	else:
		ans ='No'
	return ans


     
if __name__ == '__main__':
	print(main())
Problem p02765 (python)

Fixed submission:
# -*- coding: utf-8 -*-
N,R = map(int, input().split())
if N < 10:
	R = R + 100 * (10 - N )
     
print(R)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N,R = map(int, input().split())
if N < 10:
  R = R - 100×(10−N)

print(R)
Problem p03059 (python)

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

Buggy submission (verdict: Runtime Error):
a,b,t = map(input,input().split())
ans = b*(t+0.5)//a
print(ans)

Buggy submission (verdict: Runtime Error):
a,b,t = map(input,input().split())
ans = (t+0.5)*b/a
print(ans)
Problem p03060 (python)

Fixed submission:
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
maxbenefit = 0
for i in range(n):
    if c[i]<v[i]:
        maxbenefit += v[i]-c[i]
print(maxbenefit)

Buggy submission (verdict: Runtime Error):
n = int(input())
v = map(int,input().split())
c = map(int,input().split())
maxbenefit = 0
for i in range(n):
    if c[i]<v[i]:
        maxbenefit += v[i]-c[i]
print(maxbenefit)
Problem p03101 (python)

Fixed submission:
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c*b-d*a+c*d)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
c,d = map(int,input().split())
print(a*b-c-d+cd)
Problem p03109 (python)

Fixed submission:
a = input()
if int(a[5])==0 and int(a[6])<=4:
  print('Heisei')
else:
  print('TBD')

Buggy submission (verdict: Runtime Error):
a = input()
if int(a[5])=0 and int(a[6])<=4:
  print('Heisei')
else:
  print('TBD')

Buggy submission (verdict: Runtime Error):
a = input()
if int(a[6])<=4:
  print('Heisei')
elif int(a[6])>4 or int(a[5])=1:
  print('TBD')
Problem p03149 (python)

Fixed submission:
n= list(map(int,input().split()))
n.sort()
if 1 in n and 7 in n and 9 in n and 4 in n:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n= sort(list(int,input().split()))
if n == [1,7,9,4]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n=list(int,input().split())
if n==[1,4,7,9]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a=list(sort(list(int,input().split())))
if a==[1,4,7,9]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a=sorted(list(int,input().split()))
if a==[1,4,7,9]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a=list(sort(list(int,input().split())))
if a==[1,4,7,9]:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n = list(int,input().split())
if 1 in n and 9 in n and 7 in n and 4 in n:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input())
if 1 in n and 9 in n and 7 in n and 4 in n:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input.()split())
if 1 in n and 9 in n and 7 in n and 4 in n:
  print("YES")
else:
  print("NO")
Problem p03238 (python)

Fixed submission:
n = int(input())
if n==1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n=1:
  print('Hello World')
else:
  a = int(input())
  b = int(input())
  print(a+b)
Problem p03288 (python)

Fixed submission:
r = int(input())
if r < 1200:
  print('ABC')
elif 1200 <= r < 2800:
  print('ARC')
else:
  print('AGC')

Buggy submission (verdict: Runtime Error):
r = int(input())
if r < 1200:
  print(ABC)
elif 1200 <= r < 2800:
  print(ARC)
else:
  print(AGC)

Buggy submission (verdict: Runtime Error):
r = int(input())
if r < 1200:
  print(ABC)
if 1200 <= r < 2800:
  print(ARC)
else:
  print(AGC)

Buggy submission (verdict: Runtime Error):
r = input()
if r < 1200:
  print(ABC)
if 1200 <= r < 2800:
  print(ARC)
else:
  print(AGC)
Problem p03369 (python)

Fixed submission:
s = list(input())
print(700+100*(s.count('o')))

Buggy submission (verdict: Runtime Error):
s = input()
print(700+100*(s.count(o)))
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())
if (n%500)-a <=0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
a = int(input())
if (n%500)-a =<0:
  print("Yes")
else:
  print("No")
Problem p03437 (python)

Fixed submission:
x,y=map(int,input().split())
if x%y==0:
  print(-1)
else:
  print(x)

Buggy submission (verdict: Runtime Error):
x,y=map(int,input()..split())
if x%y==0:
  print(-1)
else:
  print(x)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")

Buggy submission (verdict: Runtime Error):
a ,b = map(int ,input().split())
if a*b % 2 =0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a ,b = map(int ,input().split())
if a%2=0 or b%2=0:
  print Even
else:
  print Odd

Buggy submission (verdict: Runtime Error):
a ,b = map(int ,raw_input().split())
if a%2=0 or b%2=0:
  print Even
else:
  print Odd

Buggy submission (verdict: Runtime Error):
l = map(int ,raw_input().split() )
for i in range(len(l)):
  a='Odd'
  if l[i]% 2 = 0:
    a = 'Even'
print a

Buggy submission (verdict: Runtime Error):
l = map(int ,raw_input().split() )
for i in range(0,1):
  a='Odd'
  if l[i]% 2 = 0:
    a = 'Even'
print(a)

Buggy submission (verdict: Runtime Error):
l = map(int ,raw_input().split() )
for i in range(len(l)):
  a='Odd'
  if l[i]% 2 = 0:
    a = 'Even'
print(a)
Problem p03469 (python)

Fixed submission:
s = input()
print(s[:3]+'8'+s[4:])

Buggy submission (verdict: Runtime Error):
s = input()
s[3] = '8'
print(s)

Buggy submission (verdict: Runtime Error):
n = input()
s =n.replace(2017,2018)
print(s)

Buggy submission (verdict: Runtime Error):
n = input()
n[3] = '8'
print(n)

Buggy submission (verdict: Runtime Error):
n = input()
n[3] = '8'
print(str(n))

Buggy submission (verdict: Runtime Error):
s = list(int,input().split())
s[3] = 8
print(s)
Problem p03477 (python)

Fixed submission:
a,b,c,d=map(int,input().split())
if a+b > c+d:
  print("Left")
elif a+b==c+d:
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
if a+b>c+d:
  print("Left")
if a+b=c+d:
  print("Balanced")
else:
  print("Right")
Problem p03493 (python)

Fixed submission:
s = input()
res = 0
for v in s:
  res += int(v)
print(res)

Buggy submission (verdict: Runtime Error):
a = list(input())
res = 0
for i in range(len(a)+1):
  if a[i] ==1:
    res +=1
print(res)