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

Fixed submission:
import sys
input=sys.stdin.readline
N=int(input())
ans=0
if N<=9:
  ans=N
elif 10<=N<=99:
  ans=9
elif 100<=N<=999:
  ans=9+(N-99)
elif 1000<=N<=9999:
  ans=909
elif 10000<=N<=99999:
  ans=909+(N-9999)
else:
  ans=90909
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
N=input()
ans=0
if N<=9:
  ans=N
elif 10<=N<=99:
  ans=10
elif 100<=N<=999:
  ans=9+(N-99)
elif 1000<=N<=9999:
  ans=909
elif 10000<=N<=99999:
  ans=909+(N-9999)
else:
  ans=90909
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
N=input()
if N<=9:
  print(N)
elif 10<=N<=99:
  print(10)
elif 100<=N<=999:
  print(9+(N-99))
elif 1000<=N<=9999:
  print(909)
elif 10000<=N<=99999:
  print(909+(N-9999))
else:
  print(90909)

Buggy submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
N=input()
if N<=9:
  print(N)
elif N<=99:
  print(10)
elif N<=999:
  print(9+(N-99))
elif N<=9999:
  print(909)
elif N<=99999:
  print(909+(N-9999))
else:
  print(90909)
Problem p02957 (python)

Fixed submission:
a,b=map(int, input().split())
print (int((a+b)/2) if (a+b)%2 == 0 else "IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
a,b=int(input())
if (a+b)%2==0:
  print((a+b)/2)
else:
  print('impossible')

Buggy submission (verdict: Runtime Error):
import sys
input=sys.stdin.readline
a,b=int(input())
if a+b%2==0:
  print((a+b)/2)
else:
  print('impossible')
Problem p02958 (python)

Fixed submission:
N=int(input())
p=list(map(int,input().split()))
np=sorted(p)
co=0
ans='YES'
for i in range(N):
  if p[i]!=np[i]:
    co+=1
if co<=2:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
N=int(input())
p=list(map(int,input().split()))
co=0
ans='YES'
for i in range(N):
  if p[i]!=i+1:
    co+=1
if co<=1:
  break
else:
  ans='NO'
print(ans)
Problem p02983 (python)

Fixed submission:
r,l=map(int,input().split())
v1,v2=r//2019,l//2019
if v2-v1>=1 or r%2019==0 or l%2019==0:
    print(0)
else:
    ans=2018
    for i in range(r,l):
        for j in range(i+1,l+1):
            ans=min(ans,(i*j)%2019)
    print(ans)

Buggy submission (verdict: Runtime Error):
r,l=map(int,input().split())
v1,v2=r//2019,l//2019
if v2-v1>=1 or r%2019==0 or l%2019==0:
    print(0)
else:
    ans=2018
    for i in range(r,l):
        for j in range(i+1,l+1):
            ans=min(ans,(i*j)%2019)
print(ans)

Buggy submission (verdict: Runtime Error):
r,l=map(int,input().split())
if l-r>=2019 or r%2019==0 or l%2019==0:
    print(0)
else:
    ans=2018
    for i in range(r,l):
        for j in range(i+1,l+1):
            ans=min(ans,(i*j)%2019)
print(ans)
Problem p02993 (python)

Fixed submission:
t=input()
ans=0
if t[0]==t[1] or t[1]==t[2] or t[2]==t[3]:
    ans='Bad'
else:
    ans='Good'
print(ans)

Buggy submission (verdict: Runtime Error):
s=input()
ans=0
if t[0]==t[1] or t[1]==t[2] or t[2]==t[3]:
    ans='Bad'
else:
    ans='Good'
print(ans)

Buggy submission (verdict: Runtime Error):
s=int(input())
n=str(s)
t=list(map(int,n))
ans=0
if t[0]==t[1] or t[1]==t[2] or t[2]==t[3]:
    ans='Bad'
else:
    ans='Good'
print(ans)
Problem p03030 (python)

Fixed submission:
n=int(input())
sp_lis=[]
for i in range(n):
    s,p=input().split()
    sp_lis.append([s,100-int(p),i+1])
sp_lis.sort()
for j in range(n):
    print(sp_lis[j][2])

Buggy submission (verdict: Runtime Error):
n=int(input())
sp_lis=[]
for i in range(n):
    s,p=input().split()
    sp_lis.append([s,100-int(p),i+1])
for j in range(n):
    print(sorted(sp_lis[j][2]))

Buggy submission (verdict: Runtime Error):
n=int(input())
sp_lis=[]
for i in range(n):
    s,p=input().split()
    sp_lis.append([s,100-p,i+1])
sp_lis.sort()
for j in range(n):
    print(sp_lis[j][2])

Buggy submission (verdict: Runtime Error):
n=int(input())
sp_lis=[]
for i in range(n):
    s,p=input().split()
    sp_lis.append([s,100-p,i+1])
for j in range(n):
    print(sorted(sp_lis[j][2]))

Buggy submission (verdict: Runtime Error):
n=int(input())
sp_lis=[]
s,p=input().split()
for i in range(1,n+1):
  sp_lis.append([s,100-p,i])
for j in range(n)
print(sorted(sp_lis[j][2]))
Problem p02675 (python)

Fixed submission:
n = input()
h = (2,4,5,7,9)
p = (0,1,6,8)
b = 3
m = int(n) % 10
if m in h:
  print("hon")
if m in p:
  print("pon")
if m == b:
  print("bon")

Buggy submission (verdict: Runtime Error):
n = input()
h = (2,4,5,7,9)
p = (0,1,6,8)
b = 3
m = int(n) % 10
if m in b:
  print("bon")
if m in p:
  print("pon")
if m == h:
  print("hon")
Problem p02677 (python)

Fixed submission:
import math
a,b,c,d = input().split(" ")
a = int(a)
b = int(b)
c = int(c)
d = int(d)
t1 = 30*c + 0.5*d
t2 = 6*d
e = math.cos(math.radians(t1-t2))
f = a*a + b*b - 2*a*b*e
print(f ** 0.5)

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d = input().split(" ")
a = int(a)
b = int(b)
c = int(c)
d = int(d)
t1 = 30* + 0.5*d
t2 = 6*d
print(t1,t2)
print(sqrt(e))
Problem p03471 (python)

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

Y=int(Y/1000)
A=B=C=-1

for c in range(N+1):
  for b in range(N+1):
    a=N-b-c
    if c+5*b > Y:
      break
    if c+5*b+10*a == Y:
      A,B,C=a,b,c
      
print(A,B,C)

Buggy submission (verdict: Runtime Error):
2000 20000000
Problem p03472 (python)

Fixed submission:
N,H=map(int,input().split())

a=[0]*N
b=[0]*N
for i in range(N):
  a[i],b[i]=map(int,input().split())

amax=max(a)
n=0
total=0
b.sort(reverse=True)
for i in range(N):
  if b[i] > amax:
    n+=1
    total+=b[i]
  else:
    break

if H <= total:
  for i in range(n):
    H-=b[i]
    if H <= 0:
      print(i+1)
      break
else:
  print(n+int((H-total-1)/amax)+1)

Buggy submission (verdict: Runtime Error):
N,H=map(int,input().split())

a=[0]*N
b=[0]*N
for i in range(N):
  a[i],b[i]=map(int,input().split())

amax=max(a)
n=0
total=0
b.sort(reverse=True)
for i in range(N):
  if b[i] > amax:
    n+=1
    total+=b[i]
  else:
    break

if H <= total:
  for i in range(n):
    H-=b[i]
    if H <＝0:
      print(i+1)
      break
else:
  print(n+int((H-total-1)/amax)+1)
Problem p02675 (python)

Fixed submission:
N = input()
n = N[len(N)-1]
if n == "2" or n== '4' or n=='5' or n=='7' or n=='9':
  print("hon")
elif n == '0' or n=='1' or n=='6' or n=='8':
  print('pon')
else:
  print('bon')

Buggy submission (verdict: Runtime Error):
N = input()
n = N[len(N)]
if n == "2" or n== '4' or n=='5' or n=='7' or n=='9':
  print("hon")
elif n == '0' or n=='1' or n=='6' or n=='8':
  print('pon')
else:
  print('bon')

Buggy submission (verdict: Runtime Error):
N = input()
n = N[len(n)]
if n == "2" or n== '4' or n=='5' or n=='7' or n=='9':
  print("hon")
elif n == '0' or n=='1' or n=='6' or n=='8':
  print('pon')
else:
  print('bon')

Buggy submission (verdict: Runtime Error):
N = input()
l = len(N)
n = N[l]
if n == "2" or '4' or '5' or '7' or '9':
  print("hon")
elif n == '0' or '1' or '6' or '8':
  print('pon')
else:
  print('bon')

Buggy submission (verdict: Runtime Error):
n = input()
l = len(n)
if n[l] == "2" or '4' or '5' or '7' or '9':
  print("hon")
elif n[l] == '0' or '1' or '6' or '8':
  print('pon')
else:
  print('bon')
Problem p02765 (python)

Fixed submission:
N,R=(int(x) for x in input().split())
if N>=10:
    print(R)
else:
    print(R+100*(10-N))

Buggy submission (verdict: Runtime Error):
N,R=input(int(x) for x in input().split())
if N>=10:
    print(R)
else:
    print(R+100*(10-N))
Problem p02975 (python)

Fixed submission:
import sys,collections
input = sys.stdin.readline

N = int(input())
a =list(map(int,input().split()))

if sum(a) == 0:
    print('Yes')
    exit()

if N%3 != 0:
    print('No')
    exit()    

ac = collections.Counter(a)

if len(ac) == 2 and ac[0] ==N/3:
    print('Yes')
    exit()


if len(ac) != 3 :
    print('No')
    exit()
else:
    lk1,lk2,lk3 = ac.keys()
    lv1,lv2,lv3 = ac.values()
if lv1 == lv2 ==lv3:
    if lk1^lk2 == lk3:
        print('Yes')
    else:
        print('No')
else:
    print('No')
    exit()

Buggy submission (verdict: Runtime Error):
N,A,B,C,D =list(map(int,input().split()))
s = input()
flag = 0
if C<D:
    if s[B-1:D].count('##') == 0 and s[A-1:C].count('##') == 0:
        print('Yes')
    else:
        print('No')
else:
    if s[B-1:C].count('...')>=1 and s[A:C].count('##')==0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
N,A,B,C,D =list(map(int,input().split()))
s = input()
flag = 0
if C<D:
    if s[B-1:D].count('##') == 0 and s[A-1:C].count('##') == 0:
        print('Yes')
    else:
        print('No')
else:
    if s[B-1:C].count('...')>=1 and s[A:C].count('##')==0:
        print('Yes')
    else:
        print('No')
Problem p02982 (python)

Fixed submission:
import numpy as np
N,D = list(map(int,input().split()))
 
lis =[list(map(int,input().split())) for i in range(N)]
lis_np = np.array(lis)
counter = 0
for i in range(N-1):
    for j in range(i+1,N):
        kyori = (sum((lis_np[:][i] - lis_np[:][j])**2))**0.5
        if kyori == int(kyori):
            counter += 1
        
print(counter)

Buggy submission (verdict: Runtime Error):
import numpy as np
N,D = list(map(int,input().split()))
 
lis =[list(map(int,input().split())) for i in range(N)]
lis_np = np.array(lis)
counter = 0
for i in range(N-1):
    for j in range(i+1,N):
        kyori = (sum((lis_np[:][i] - lis_np[:][j])**2))**0.5
        if kyori == int(kyori):
            counter += 1
        
print(counter)

Buggy submission (verdict: Runtime Error):
def isinteger(x):
    if isinstance(x, float):
        return x == int(x)


import numpy as np
N,D = list(map(int,input().split()))
 
lis =[list(map(int,input().split())) for i in range(N)]
lis_np = np.array(lis)
counter = 0
for i in range(N-1):
    for j in range(i+1,N):
        kyori = (sum((lis_np[:][i] - lis_np[:][j])**2))**0.5
        if isinteger(kyori):
            counter += 1
print(counter)

Buggy submission (verdict: Runtime Error):
def is_integer(n):
    try:
        float(n)
    except ValueError:
        return False
    else:
        return float(n).is_integer()


import numpy as np
N,D = list(map(int,input().split()))
 
lis =[list(map(int,input().split())) for i in range(N)]
lis_np = np.array(lis)
counter = 0
for i in range(N-1):
    for j in range(i+1,N):
        kyori = (sum((lis_np[:][i] - lis_np[:][j])**2))**0.5
        if is_integer(kyori):
            counter += 1
print(counter)
Problem p02995 (python)

Fixed submission:
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

A,B,C,D = list(map(int,input().split()))
if A%C == 0:
    num_C_bai = (B-(B%C) - A)//C + 1
else:
    num_C_bai = ((B-(B%C) - (A-(A%C)+C)))//C + 1
    
if A%D == 0:
    num_D_bai = (B-(B%D) - A)//D + 1
else:
    num_D_bai = ((B-(B%D) - (A-(A%D)+D)))//D + 1

E = lcm(C,D)

if A%E == 0:
    num_E_bai = (B-(B%E) - A)//E + 1
else:
    num_E_bai = ((B-(B%E) - (A-(A%E)+E)))//E + 1

print(B + 1 - A - num_C_bai - num_D_bai + num_E_bai)

Buggy submission (verdict: Runtime Error):
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

A,B,C,D = list(map(int,input().split()))
C_bai = list(range(A-(A%C)+C,B,C+1))
D_bai = list(range(A-(A%D)+D,B,D+1))
E = lcm(C,D)
CD_bai = list(range(A-(A%E)+E,B,E+1))
print(B-A+1-len(C_bai)-len(D_bai)+CD_bai)
Problem p02999 (python)

Fixed submission:
import sys
input = sys.stdin.readline

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

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

X,A =list(map(int,input().split()))
print(X//A*10)
Problem p03006 (python)

Fixed submission:
import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
xy = []

if N == 1:
    print(1)
    exit()

for _ in range(N):
    xy.append(list(map(int,input().split())))

rxy = []
for i in range(N):
    for j in range(N):
        if i==j:
            continue
        rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]))
cr = collections.Counter(rxy)
print(N-max(cr.values()))

Buggy submission (verdict: Runtime Error):
import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
xy = []
for _ in range(N):
    xy.append(list(map(int,input().split())))

rxy = []
for i in range(N):
    for j in range(N):
        if i==j:
            continue
        rxy.append((xy[i][0]-xy[j][0],xy[i][1]-xy[j][1]))
cr = collections.Counter(rxy)
print(N-max(cr.values()))
Problem p03007 (python)

Fixed submission:
import sys,math,collections,itertools,bisect
input = sys.stdin.readline

N=int(input())
A=sorted(list(map(int,input().split())))
process = []
for i in range(N-2):
    tmp = A.pop()
    y=A.pop()
    A.append(tmp)
    if y>=0:
        process.append([A[0],y])
        A[0]-=y
    else:
        process.append([A[-1],y])
        A[-1]-=y
process.append([A[-1],A[0]])
print(A[-1]-A[0])
for pro in process:
    print(*pro)

Buggy submission (verdict: Runtime Error):
import sys,math,collections,itertools,bisect
input = sys.stdin.readline

N=int(input())
A=list(map(int,input().split()))
process = []
#--最大最小を見つける--#
maxA = A.pop(A.index(max(A)))
minA = A.pop(A.index(min(A)))
A.append(minA-maxA)
process.append(A)

for i in range(len(A)-2):
    maxA = A.pop(A.index(max(A)))
    A[-1]-=maxA
    process.append(list(q))
print(A[0]-A[-1])
for pro in process:
    print(*pro)
Problem p03085 (python)

Fixed submission:
a = {'A':'T','T':'A','G':'C','C':'G'}
print(a[input()])

Buggy submission (verdict: Runtime Error):
a = {'A':'T','T':'A','G':'C','T':'C'}
print(a[input()])
Problem p03087 (python)

Fixed submission:
import re
 
N,Q = list(map(int,input().split()))
s = input()
lis=[0]
 
count = 0
for i in range(1,len(s)):
    if s[i-1] == 'A' and s[i] == 'C':
        count +=1
    lis.append(count)
for i in range(Q):
    l,r = list(map(int,input().split()))
    print(lis[r-1]-lis[l-1])

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
N,Q = list(map(int,input().split()))
s = input()
lis=[0]*N
 
count = 0
for i in range(1,len(s)):
    if s[i-1] == 'A' and s[i] == 'C':
        count +=1
    lis[i]+=count
for i in range(Q):
    l,r = list(map(int,input().split()))
    print(lis[r-1]-lis[l-1])

Buggy submission (verdict: Runtime Error):
	def ss():
    N,Q = list(map(int,input().split()))
    s = input()
    lis=[0]*N
     
    count = 0
    for i in range(1,len(s)):
        if s[i-1] == 'A' and s[i] == 'C':
            count +=1
        lis[i]+=count
    for i in range(Q):
        l,r = list(map(int,input().split()))
        print(lis[r-1]-lis[l-1])

ss()
Problem p03164 (python)

Fixed submission:
N,W = map(int,input().split())
wv = [0]
for i in range(N):
    wv.append(list(map(int,input().split())))
    
#- dp[i][j] i番目までの品物から、価値がjとなるように選んだ時の、重さの最小値
Vmax = 10**3*100
dp = [[float('inf')]*(Vmax+1) for i in range(N+1)]
dp[0][0]=0#なにも品物を選ばないなら価値0で重さ0

for i in range(1,N+1):#N番目以降は品物がもうないので0。→N-1からやる
    for j in range(0,Vmax+1): #価値でループ
        if j<wv[i][1]:#i番目の荷物の価値がそもそも入れたい価値よりも大きい→いれられない
            dp[i][j] = dp[i-1][j]
        else:
            dp[i][j] = min(dp[i-1][j],dp[i-1][j-wv[i][1]]+wv[i][0])#いれない or いれる　の大きいほう
#最後の出力は、最終番目以降の品物(つまり、全部)から、価値の大きいほうから見ていき、許容W以下のもの
for i in range(Vmax,-1,-1):
    if dp[N][i] <= W:
        print(i)
        break

Buggy submission (verdict: Runtime Error):
N,W = map(int,input().split())
wv = []
for i in range(N):
    wv.append(list(map(int,input().split())))
    
#- dp[i][j] i番目より後ろの品物から、重さjまで許して荷物を入れた時の価値の最大
dp = [[0]*(W+1) for i in range(N+1)]

for i in range(N-1,-1,-1):#N番目以降は品物がもうないので0。→N-1からやる
    for j in range(W,-1,-1): #重いほうから見ていく
        if j<wv[i][0]:#i番目の荷物の重さがそもそも許容値よりも大きい→いれられない
            dp[i][j] = dp[i+1][j]
        else:
            dp[i][j] = max(dp[i+1][j],dp[i+1][j-wv[i][0]]+wv[i][1])#いれない or いれる　の大きいほう
#最後の出力は、0番目以降の品物(つまり、全部)から、重さWまで許したときの価値の最大
print(dp[0][W])
Problem p03166 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10**9)
N,M = map(int,input().split())
road = [[] for _ in range(N+1)]
for _ in range(M):
    x,y=map(int,input().split())
    road[x].append(y)
flag = [0]*(N+1)
dist = [0]*(N+1)
def distance(i):#地点iから終点までの最長距離
    if flag[i] == 1:
        return dist[i]
    
    if road[i] == []:#行き先がない
        return 0
    else:#行き先がある
        long_dist = 0
        tmp = 0
        for dirct in road[i]:
            tmp = 1 + distance(dirct)
            long_dist = max(long_dist,tmp)
        flag[i]=1
        dist[i] = long_dist
        return long_dist

ans = 0
for i in range(1,N+1):
    ans = max(ans,distance(i))
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
road = [[] for _ in range(N+1)]
for _ in range(M):
    x,y=map(int,input().split())
    road[x].append(y)
flag = [0]*(N+1)
dist = [0]*(N+1)
def distance(i):#地点iから終点までの最長距離
    if flag[i] == 1:
        return dist[i]
    
    if road[i] == []:#行き先がない
        return 0
    else:#行き先がある
        long_dist = 0
        tmp = 0
        for dirct in road[i]:
            tmp = 1 + distance(dirct)
            long_dist = max(long_dist,tmp)
        flag[i]=1
        dist[i] = long_dist
        return long_dist

ans = 0
for i in range(1,N+1):
    ans = max(ans,distance(i))
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
road = [[] for _ in range(N+1)]
for _ in range(M):
    x,y=map(int,input().split())
    road[x].append(y)
flag = [0]*(N+1)
dist = [0]*(N+1)
def distance(i):#地点iから終点までの最長距離
    if flag[i] == 1:
        return dist[i]
    
    if road[i] == []:#行き先がない
        return 0
    else:#行き先がある
        long_dist = 0
        for dirct in road[i]:
            tmp = 1 + distance(dirct)
            long_dist = max(long_dist,tmp)
        flag[i]=1
        dist[i] = long_dist
        return long_dist

ans = 0
for i in range(1,N+1):
    ans = max(ans,distance(i))
print(ans)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
road = [[] for _ in range(N+1)]
for _ in range(M):
    x,y=map(int,input().split())
    road[x].append(y)
flag = [0]*(N+1)
dist = [0]*(N+1)
def distance(i):#地点iから終点までの最長距離
    if flag[i] == 1:
        return dist[i]
    
    if road[i] == []:#行き先がない
        return 0
    else:#行き先がある
        long_dist = 0
        for dirct in road[i]:
            tmp = 1 + distance(dirct)
            long_dist = max(long_dist,tmp)
    flag[i]=1
    dist[i] = long_dist
    return long_dist

ans = 0
for i in range(1,N+1):
    ans = max(ans,distance(i))
print(ans)
Problem p03231 (python)

Fixed submission:
import sys,math
input = sys.stdin.readline

N,M = list(map(int,input().split()))
S = input().rstrip()
T = input().rstrip()

L = N*M//math.gcd(N,M)

sn = L//M
tm = L//N

for i in range(N//sn):
    if S[i*sn] == T[i*tm]:
        continue
    else:
        print(-1)
        exit()
print(L)

Buggy submission (verdict: Runtime Error):
import sys,math
input = sys.stdin.readline

N,M = list(map(int,input().split()))
S = input().rstrip()
T = input().rstrip()

lcm = N*M//math.gcd(N,M)
X_S=list("#"*lcm)
for i in range(N):
    X_S[i*lcm//N] = S[i]

for i in range(M):
    if X_S[i*lcm//M] == T[i] or X_S[i*lcm//M] == '#':
        continue
    else:
        print(-1)
print(lcm)

Buggy submission (verdict: Runtime Error):
import sys,math
input = sys.stdin.readline

N,M = list(map(int,input().split()))
S = input().rstrip()
T = input().rstrip()

lcm = N*M//math.gcd(N,M)
X_S=list("#"*lcm)
X_T=list("#"*lcm)
for i in range(N):
    X_S[i*lcm//N] = S[i]
for j in range(M):
    X_T[j*lcm//M] =T[j]

for i in range(lcm):
    if X_S[i] == X_T[i] or X_S[i] =='#' or X_T[i] =='#':
        continue
    else:
        print(-1)
        exit()
print(lcm)
Problem p03238 (python)

Fixed submission:
if input() == '1':
  print('Hello World')
else:
  print(eval(input()+'+'+input()))

Buggy submission (verdict: Runtime Error):
if input() == '1':
  print(Hello World)
else:
  print(eval(input()+'+'+input()))

Buggy submission (verdict: Runtime Error):
N,T = map(int,(list(input().split())))
cost = []
for _ in range(N):
    c,t = map(int,(list(input().split())))
    if t<=T:
        cost.append(c)
print(min(cost))
Problem p03239 (python)

Fixed submission:
N,T = map(int,(list(input().split())))
cost = 1001
for _ in range(N):
    c,t = map(int,(list(input().split())))
    if t<=T:
        cost=min(cost,c)
if cost == 1001:
    print('TLE')
else:
    print(cost)

Buggy submission (verdict: Runtime Error):
N,T = map(int,(list(input().split())))
cost = []
for i in range(N):
    c,t = map(int,(list(input().split())))
    if t<=T:
        cost.append(c)
print(min(cost))
Problem p03260 (python)

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

if A*B in [2,4,6]:
  print('No')
else:
  print('Yes')

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

if A*B in [4,6,9]:
  print('No')
else:
  print('Yes')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    '

Buggy submission (verdict: Runtime Error):
if int(input())*int(input()) in [4,6,9]:
  print('No')
else:
  print('Yes')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    '
Problem p03263 (python)

Fixed submission:
import sys,math,collections,itertools
input = sys.stdin.readline

H,W= list(map(int,input().split()))
a = [ list(map(int,input().split())) for _ in range(H)]
operation = []

#-奇数だったら右へずらしていく。偶数ならなにもしない-#
cnt = 0
for ih in range(H):
    for iw in range(W-1):
        if a[ih][iw]%2 == 0:
            continue
        else:
            a[ih][iw] -= 1
            a[ih][iw+1] += 1
            cnt += 1
            operation.append([ih+1,iw+1,ih+1,iw+2])
#-最右端を上から下まで-#
for ih in range(H-1):
    if a[ih][W-1]%2 == 0:
        continue
    else:
        a[ih][W-1] -= 1
        a[ih+1][W-1] += 1
        cnt += 1
        operation.append([ih+1,W,ih+2,W])
print(cnt)
for ope in operation:
    print(*ope)

Buggy submission (verdict: Runtime Error):
import sys,math,collections,itertools
input = sys.stdin.readline

H,W= list(map(int,input().split()))
a = [ list(map(int,input().split())) for _ in range(H)]
operation = []

#-奇数だったら右へずらしていく。偶数ならなにもしない-#
cnt = 0
for ih in range(H):
    for iw in range(W-1):
        if a[ih][iw]%2 == 0:
            continue
        else:
            a[ih][iw] -= 1
            a[ih][iw+1] += 1
            cnt += 1
            operation.append([ih+1,iw+1,ih+1,iw+2])
#-最右端を上から下まで-#
for ih in range(H-1):
    if a[ih][iw]%2 == 0:
        continue
    else:
        a[ih][W] -= 1
        a[ih][W+1] += 1
        cnt += 1
        operation.append([ih+1,W+1,ih+2,W+1])
print(cnt)
for ope in operation:
    print(*ope)