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

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

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

Fixed submission:
x=int(input())
a=int(input())
b=int(input())
print(x-a-((x-a)//b)*b)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
x=int(input())
ans= 0
for i in range(a+1):
  for j in range(b+1):
    for k in range(c+1):
      s = 500*i + 100*j + 50*k
      if s==x:
        ans+=1
print(ans)
Problem p03455 (python)

Fixed submission:
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(input().split()))
if a%2==0 or 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(inout().split())
if a%2==0 or b%2==0:print("Even")
else:print("Odd")
Problem p03471 (python)

Fixed submission:
N,Y=map(int,input().split())
answer=[-1, -1, -1]
for i in range(N+1):
  for j in range(N-i+1):
    k= N-i-j
    a=10000*i+5000*j+1000*k
    if Y==a:
      answer=[i,j,k]
      break
print(*answer)

Buggy submission (verdict: Runtime Error):
N,Y=map(int,input().split())
answer=[-1, -1, -1]
for i in range(N+1):
  for j in range(N-i+1):
    k= N-i-j
    a=10000*i+5000*j+1000*k
        if Y==a:
            answer=[i,j,k]
            break
print(*answer)
Problem p03493 (python)

Fixed submission:
s=input()
print(s.count("1"))

Buggy submission (verdict: Runtime Error):
s=input()
print(count.s("1"))
Problem p03544 (python)

Fixed submission:
n=int(input())
L=[2,1]
for i in range(n):
  l=L[i]+L[i+1]
  L.append(l)
print(L[n])

Buggy submission (verdict: Runtime Error):
n=int(input())
L=[2,1]
for i in range(n):
  l=L[i]+[i+1]
  L.append(l)
print(L)
Problem p03556 (python)

Fixed submission:
n=int(input())
for i in reversed(range(1, n+1)):
  if (i ** .5).is_integer():
    print(i)
    break

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(1,n):
  a=i*i
  if a>n:
    a= (i-1)*(i-1)
    break
print(a)
Problem p03574 (python)

Fixed submission:
H,W=map(int,input().split())
S=[list(input()) for i in range(H)]
for i in range(H):
    for j in range(W):
        if S[i][j]=='#':
            continue
            #もし見ている文字が#だったら通過
        cnt=0
        for k in [-1,0,1]:
            if i+k<0 or H<=i+k:
                continue
                #iが端の時通過
            for l in [-1,0,1]:
                if j+l<0 or j+l>=W:
                    continue
                    #jが端の時通過
                cnt+=1*(S[i+k][j+l]=='#')
                #一個前一個上~一個下一個右までの#の数を足す
        S[i][j]=str(cnt)
        #見ていた数を足した数字に変更
for i in range(H):
    print("".join(S[i]))

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
S=[list(input()) for i in range(H)]
for i in range(H):
    for j in range(W):
        if s[i][j]=='#':
            continue
            #もし見ている文字が#だったら通過
        cnt=0
        for k in [-1,0,1]:
            if i+k<0 or H<=i+k:
                continue
                #iが端の時通過
            for l in [-1,0,1]:
                if j+l<0 or j+l>=W:
                    continue
                    #jが端の時通過
                cnt+=1*(S[i+k][j+l]=='#')
                #一個前一個上~一個下一個右までの#の数を足す
        S[i][j]=str(cnt)
        #見ていた数を足した数字に変更
for i in range(H):
    print("".join(S[i]))

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
S=[list(input()) for i in range(H)]
for i in range(H):
    for j in range(W):
        if s[i][j]=='#':
            continue
            #もし見ている文字が#だったら通過
        cnt=0
        for k in [-1,0,1]:
            if i+k<0 or H<=i+k:
                continue
                #iが端の時通過
            for l in [-1,0,1]:
                if j+l<0 or j+l>=w:
                    continue
                    #jが端の時通過
                cnt+=1*(S[i+k][j+l]=='#')
                #一個前一個上~一個下一個右までの#の数を足す
        S[i][j]=str(cnt)
        #見ていた数を足した数字に変更
for i in range(H):
    print("".join(S[i]))

Buggy submission (verdict: Runtime Error):
H,W=map(int,input().split())
S=[list(input()) for i in range(H)]
for i in range(H):
    for j in range(W):
        if s[i][j]=='#':
            continue
            #もし見ている文字が#だったら通過
        cnt=0
        for k in [-1,0,1]:
            if i+k<0 or H<=i+k:
                continue
                #iが端の時通過
            for l in [-1,0,1]:
                if j+l<0 or j+l>=w:
                    continue
                    #jが端の時通過
                cnt+=1*(s[i+k][j+l]=='#')
                #一個前一個上~一個下一個右までの#の数を足す
        s[i][j]=str(cnt)
        #見ていた数を足した数字に変更
for i in range(h):
    print("".join(s[i]))
Problem p03578 (python)

Fixed submission:
from collections import Counter
N=int(input())
D=list(map(int,input().split()))
d=Counter(D)
M=int(input())
T=list(map(int,input().split()))
t=Counter(T)
ans="YES"
for k in list(t.keys()):
  if d[k]<t[k]:
    ans="NO"
    break
print(ans)

Buggy submission (verdict: Runtime Error):
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))
for i in range(N):
  if D[i] in T:
    T.remove(D[i])
    D.pop(i)
  if len(T)==0:
    break
if len(T)==0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))
for i in range(N):
  if D[i] in T:
    T.remove(D[i])
    D.pop(i)
    if len(T)==0:
      break
if len(T)==0:
  print("YES")
else:
  print("NO")
Problem p03592 (python)

Fixed submission:
N,M,K=map(int,input().split())
for n in range(0,N+1):
  for m in range(0,M+1):
    if n*M+m*N-2*n*m==K:
      print("Yes")
      exit(0)
print("No")

Buggy submission (verdict: Runtime Error):
N,M,K=map(int,input().split())
ans="No"
for x in range(N+1):
  a=K-x*M
  b=N-2*x
  if x!=0 and a%b==0 and 0<=a//b<M:
    print("Yes")
    exit()
print("No")

Buggy submission (verdict: Runtime Error):
N,M,K=map(int,input().split())
ans="No"
for x in range(N+1):
  a=K-x*M
  b=N-2*x
  if a!=0 and a%b==0 and 0<=a//b<M:
    print("Yes")
    exit()
print("No")
Problem p03623 (python)

Fixed submission:
x,a,b=map(int,input().split())
if abs(a-x) < abs(b-x):print("A")
else:print("B")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(x) for x in input().split()]
AA=sorted(set(A),reverse=True)
li=[]
for aa in AA:
  if A.count(aa)>=4:
    print(aa**2)
    break
  if A.count(aa)>=2:
    li.append(aa)
  if len(li)==2:
    break
if len(li)==0:
  print(0)
if len(li)==2:
  print(li[0]*li[1])
Problem p03625 (python)

Fixed submission:
import collections
N=int(input())
A=[int(x) for x in input().split()]
C=collections.Counter(A)
C=sorted(list(C.items()),reverse=True)
li=[]
for i,j in C:
  if j>=4:
    li.append(i)
    break
  if j>=2:
    li.append(i)
  if len(li)==2:
    break
if len(li)==0:
  print(0)
if len(li)==1:
  print(li[0]**2)
if len(li)==2:
  print(li[0]*li[1])

Buggy submission (verdict: Runtime Error):
import collections
N=int(input())
A=[int(x) for x in input().split()]
C=collections.Counter(A)
li=[]
for i,j in C:
  if j>=4:
    li.append(i)
    break
  if j>=2:
    li.append(i)
  if len(li)==2:
    break
if len(li)==0:
  print(0)
if len(li)==1:
  print(li[0]**2)
if len(li)==2:
  print(li[0]*li[1])

Buggy submission (verdict: Runtime Error):
N=int(input())
A=[int(x) for x in input().split()]
AA=sorted(set(A),reverse=True)
li=[]
for aa in AA:
  if A.count(aa)>=4:
    print(a**2)
    break
  if A.count(aa)>=2:
    li.append(aa)
  if len(li)==2:
    break
if len(li)==0:
  print(0)
if len(li)==2:
  print(li[0]*li[1])
Problem p03636 (python)

Fixed submission:
s=input()
a=s[0]
b=s[-1]
m=str(len(s)-2)
print(a+m+b)

Buggy submission (verdict: Runtime Error):
s=input()
a=s[0]
b=s[-1]
m=len(s)-2
print(a+m+b)
Problem p03644 (python)

Fixed submission:
N=int(input())
if N==1:
  print(1)
elif 2<=N<4:
  print(2)
elif 4<=N<8:
  print(4)
elif 8<=N<16:
  print(8)
elif 16<=N<32:
  print(16)
elif 32<=N<64:
  print(32)
else:
  print(64)

Buggy submission (verdict: Runtime Error):
N=int(input())
if N==1:
  print(1)
elif 2<=N<4
  print(2)
elif 4<=N<8:
  print(4)
elif 8<=N<16:
  print(8)
elif 16<=N<32:
  print(16)
elif 32<=N<64:
  print(32)
else:
  print(64)
Problem p03681 (python)

Fixed submission:
import math
mod=1000000007
N,M=map(int,input().split())
if abs(N-M)>1:
  print(0)
else:
  n=math.factorial(N)
  m=math.factorial(M)
  if n==m:
    print(2*n*m%mod)
  else:
    print(n*m%mod)

Buggy submission (verdict: Runtime Error):
import math
mod=1000000007
N,M=map(int,input().split())
if abs(N-M)>1:
  print(0)
else:
  n=math.factorial(N)
  m=math.factorial(M)
if n==m:
  print(2*n*m%mod)
else:
  print(n*m%mod)
Problem p03693 (python)

Fixed submission:
r,g,b=map(int,input().split())
num = 10*g+b
if num%4==0:print("YES")
else:print("NO")

Buggy submission (verdict: Runtime Error):
N=int(input())
A=list(map(int,input().split()))
gray=0
brown=0
green=0
light=0
blue=0
yellow=0
orange=0
red=0
god=0
for a in A:
  if 1<=a and a<=399 and gray==0:
    gray=1
  elif 400<=a and a<=799 and brown==0:
    brown=1
  elif 800<=a and a<=1199 and green==0:
    green=1
  elif 1200<=a and a<=1599 and light==0:
    light=1
  elif 1600<=a and a<=1999 and blue==0:
    blue=1
  elif 2000<=a and a<=2399 and yellow==0:
    yellow=1
  elif 2400<=a and a<=2799 and orange==0:
    orange=1
  elif 2800<=a and a<=3199 and red==0:
    red=1
  elif a>=3200:
    god+=1
mi=max(1,gray+brown+green+light+blue+yellow+orange+red)
ma=gray+brown+green+light+blue+yellow+orange+red+god
print(mi,ma)
Problem p03721 (python)

Fixed submission:
N,K=map(int,input().split())
li=sorted([list(map(int,input().split())) for _ in range(N)])
for l in li:
  K-=l[1]
  if K<=0:
    print(l[0])
    exit()

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
li=[]
k=K
for i in range(N):
  a,b=map(int,input().split())
  K-=b
  li.append(a)
  if K<=0:
    li.sort()
    print(li[k-1])
    exit()

Buggy submission (verdict: Runtime Error):
N,K=map(int,input().split())
li=[]
for i in range(N):
  a,b=map(int,input().split())
  K-=b
  li.append(a)
  if K<=0:
    li.sort()
    print(li[K-1])
    exit()
Problem p03729 (python)

Fixed submission:
a,b,c=input().split()
if a[-1] ==b[0] and b[-1] ==c[0]:print("YES")
else:print("NO")

Buggy submission (verdict: Runtime Error):
a,b,c=input().spit()
if a[-1] ==b[0] and b[-1] ==c[0]:print("YES")
else:print("NO")
Problem p03737 (python)

Fixed submission:
a,b,c=input().split()
print((a[0]+b[0]+c[0]).upper())

Buggy submission (verdict: Runtime Error):
a,b,c=input().split()
print(a[0]+b[0]+c[0].upper)
Problem p03777 (python)

Fixed submission:
a,b=input().split()
if a=="H" and b== "H":print("H")
elif a=="H" and b== "D":print("D")
elif a=="D" and b== "H":print("D")
else:print("H")

Buggy submission (verdict: Runtime Error):
a,b=map(input().split())
if a=="H" and b== "H":print("H")
elif a=="H" and b== "D":print("D")
elif a=="D" and b== "H":print("D")
else:print("H")

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a=="H" and b== "H":print("H")
elif a=="H" and b== "D":print("D")
elif a=="D" and b== "H":print("D")
else:print("H")
Problem p03844 (python)

Fixed submission:
list=input().split()
if list[1] == "+":print(int(list[0])+int(list[2]))
else:print(int(list[0])-int(list[2]))

Buggy submission (verdict: Runtime Error):
list=input().split()
if list[1] == "+":print(list[0]+list[2])
else:print(list[0]-list[2])
Problem p03943 (python)

Fixed submission:
a,b,c=map(int,input().split())
if max(a,b,c) == a+b+c-max(a,b,c):print("Yes")
else:print("No")

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if max(a,b,c) == a+b+c-max(a,bc):print("Yes")
else:print("No")
Problem p03957 (python)

Fixed submission:
s=input()[::-1]
ans="No"
try:
  c=s.index("C")
  f=s.index("F")
  if c>f:
    ans="Yes"
except:
  pass
print(ans)

Buggy submission (verdict: Runtime Error):
K,T=map(int,input().split())
A=list(map(int,input().split()))
M=max(A)
print(max(M-1-(K-M),0))
Problem p03958 (python)

Fixed submission:
K,T=map(int,input().split())
A=list(map(int,input().split()))
M=max(A)
print(max(M-1-(K-M),0))

Buggy submission (verdict: Runtime Error):
K,T=map(int,input().split())
A=list(map(int,input().split()))
M=max(A)
print(max(A-1-(K-A),0))
Problem p03999 (python)

Fixed submission:
S=input()
N=len(S)
ans=0
for i in range(2**(N-1)):
  formula=S[0]
  q="{:0>10b}".format(i)[::-1]
  #1<=N<=10なので長さは10で良い
  #また前から見て"+"を入れるか否か決定する為後ろ向きに並び替える
  for j in range(1,N):
    if int(q[j-1])&1:
      formula+="+"
      #qの見ている桁が1ならば"+"を入れる
    formula+=S[j]
    #次の桁を式に入れる
  ans+=eval(formula)    
print(ans)

Buggy submission (verdict: Runtime Error):
S=input()
N=len(S)
ans=0
for i in range(2**(N-1)):
  S=S[0]
  q="{:0>10b}".format(i)[::-1]
  for j in range(1,N):
    if int(q[j-1])&1:
      F+="+"
    F+=S[j]
  ans+=eval(F)    
print(ans)
Problem p04019 (python)

Fixed submission:
S=list(input())
ans="Yes"
n=S.count("N")
e=S.count("E")
w=S.count("W")
s=S.count("S")
if n>0 and s>0:
  if e>0 and w>0:
    pass
  elif e==0 and w==0:
    pass
  else:
    ans="No"
elif n==0 and s==0:
  if e>0 and w>0:
    pass
  elif e==0 and w==0:
    pass
  else:
    ans="No"
elif e>0 and w>0:
  if n>0 and s>0:
    pass
  elif n==0 and s==0:
    pass
  else:
    ans="No"
elif e==0 and w==0:
  if n>0 and s>0:
    pass
  elif n==0 and s==0:
    pass
  else:
    ans="No"
else:
  ans="No"
print(ans)

Buggy submission (verdict: Runtime Error):
S=list(input())
ans="Yes"
n=S.count("N")
e=S.count("E")
w=S.count("W")
s=S.count("S")
if n>0 and s>0:
  if e>0 and w>0:
    pass
  elif e==0 and w==0:
    pass
  else:
    ans="No"
elif n==0 and s==0:
    if e>0 and w>0:
    pass
  elif e==0 and w==0:
    pass
  else:
    ans="No"
elif e>0 and w>0:
  if n>0 and s>0:
    pass
  elif n==0 and s==0:
    pass
  else:
    ans="No"
elif e==0 and w==0:
  if n>0 and s>0:
    pass
  elif n==0 and s==0:
    pass
  else:
    ans="No"
else:
  ans="No"
print(ans)
Problem p03085 (python)

Fixed submission:
b = input()
print('A' if b == 'T' else 'T' if b == 'A' else 'C' if b == 'G' else 'G')

Buggy submission (verdict: Runtime Error):
b = input()
print('A' if b == 'T' else 'T' if b == 'A' else 'C' if b == 'G' else 'G' if b == 'C')
Problem p03160 (python)

Fixed submission:
N = int(input())
h = list(map(int, input().split()))
dp = [float('inf')]*N
dp[0] = 0
dp[1] = abs(h[1] - h[0])
for i in range(2, N):
  dp[i] = min(dp[i], dp[i-1] + abs(h[i] - h[i-1]))
  dp[i] = min(dp[i], dp[i-2] + abs(h[i] - h[i-2]))
print(dp[N-1])

Buggy submission (verdict: Runtime Error):
N = int(input())
h = list(map(int, input().split()))
dp = [float('inf')]*N
dp[0] = 0
dp[1] = abs(h[1] - h[0])
for i in range(2, N):
  dp[i] = min(dp[i-1] + abs(h[i] - h[i-1], dp[i-2] + abs(h[i] - h[i-2]))
print(dp[N-1])
Problem p03624 (python)

Fixed submission:
s = sorted(list(set(input())))
lst = 'abcdefghijklmnopqrstuvwxyz'
flag = False
for i in lst:
    if i not in s:
        flag = True
        print(i)
        break
if flag == False:
    print('None')

Buggy submission (verdict: Runtime Error):
s = list(set(input()))
s.sort()
flag = False
for i in range(26):
    if s[i] != chr(ord('a') + i):
        flag = True
        print(chr(ord('a') + i))
        break
if flag == False:
    print('None')
Problem p03845 (python)

Fixed submission:
N = int(input())
T = list(map(int, input().split()))
sumT = sum(T)
M = int(input())
PX = [list(map(int, input().split())) for _ in range(M)]
for i in range(M):
    p, x = PX[i]
    print(sumT-T[p-1]+x)

Buggy submission (verdict: Runtime Error):
N = int(input())
T = list(map(int, input().split()))
sumT = sum(T)
M = int(input())
PX = [list(map(int, input().split())) for _ in range(M)]
for i in range(M):
    print(sumT-T[i]+PX[i][1])
Problem p03962 (python)

Fixed submission:
print(len(set(input().split())))

Buggy submission (verdict: Runtime Error):
print(len(set(map(int, input().split())))
Problem p02681 (python)

Fixed submission:
s = input()
t = input()

if t[:-1] == s:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):

a,b,c,k = map(int,input().split())
 
if k <= a:
  print(a)
elif a < k and k <= a+b:
  print(a)
elif a+b < k and k <= a+b+c:
  print(a-k+a+b)
Problem p02684 (python)

Fixed submission:
n, k = map(int, input().split())
a = list(map(int, input().split()))

d = {}
for i in range(1, n + 1):
    d[i] = a[i - 1]

did = set()
route = [1]

now = 1
for i in range(k):
    now = d[now]
    route.append(now)
    if now in did:
        break
    did.add(now)

if k < 10 ** 6:
    now = 1
    for i in range(k):
        now = d[now]

    print(now)

else:
    for i in range(len(route)):
        if route[i] == route[-1]:
            roop = route[i:-1]
            print(roop[(k - i) % len(roop)])
            exit()

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

d = {}
for i in range(1, n + 1):
    d[i] = a[i - 1]

did = set(1)
route = [1]

now = 1
for i in range(k):
    now = d[now]
    route.append(now)
    if now in did:
        break
    did.add(now)

if k < 10 ** 6:#計算量的に間に合うので愚直に
    now = 1
    for i in range(k):
        now = d[now]

    print(now)

else:
    for i in range(len(route)):
        if route[i] == route[-1]:
            roop = route[i:-1]
            print(roop[(k - i) % len(roop)])
            exit()

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

d = {}
for i in range(1, n + 1):
    d[i] = a[i - 1]

did = set()
route = [1]

now = 1
for i in range(k):
    now = d[now]
    route.append(now)
    if now in did:
        break
    did.add(now)


for i in range(len(route)):
  if route[i] == route[-1]:#routeには第二ループの始めがギリ入っている
    roop = route[i:-1]
    print(roop[(k - i) % len(roop)])#k-iは残り移動階数
    exit()

Buggy submission (verdict: Runtime Error):

def main():
  n,k = map(int,input().split())
  a = list(map(int,input().split()))
  l = [1]

  for i in range(1,k+1):
    ind = l[-1]
    if a[ind-1] in set(l):
      l.append(a[ind-1])
      roop = l[-1]
      nokori = k-i
      break
    
    else:
      l.append(a[ind-1])
    
  l.pop()
  rooplist = l[l.index(roop):]
  rooplen = len(rooplist)
  mod = nokori%rooplen

  print(rooplist[mod])


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = list(map(int,input().split()))
l = [1]

for i in range(1,k+1):
  ind = l[-1]
  if a[ind-1] in set(l):
    l.append(a[ind-1])
    roop = l[-1]
    nokori = k-i
    break
    
  else:
    l.append(a[ind-1])
    
l.pop()
rooplist = l[l.index(roop):]
rooplen = len(rooplist)
mod = nokori%rooplen

print(rooplist[mod])

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
a = list(map(int,input().split()))
l = [1]

for i in range(1,k+1):
  ind = l[-1]
  if a[ind-1] in set(l):
    l.append(a[ind-1])
    roop = l[-1]
    nokori = k-i
    break
    
  else:
    l.append(a[ind-1])
    
l.pop()
rooplist = l[l.index(roop):]
rooplen = len(rooplist)
mod = nokori%rooplen

print(rooplist[mod])
Problem p02690 (python)

Fixed submission:
x = int(input())
a = [i for i in range(120)] + [-i for i in range(1,119)]
b = [i for i in range(119)] + [-i for i in range(1,120)]

for i in a:
  for j in b:
    if i**5 - j**5 == x:
      print(i,j)
      exit()

Buggy submission (verdict: Runtime Error):
x = int(input())

for i in range(10**9):
  a1= (x + i**5)**0.2
  a2 = (x + (-i)**5)**0.2
  
  if a1.is_integer():
    print(int(a1),i)
    exit()
  if a2.is_integer():
    print(int(a2),-i)
    exit()
Problem p02717 (python)

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

print(z,x,y)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
m = n//k
a = n - (k*m)
    
print(min(a,abs(a-k)))
Problem p02755 (python)

Fixed submission:
import math
a,b = map(int,input().split())
sup = math.floor((a+1)/0.08)

for i in range(1,sup):
  if math.floor(i*0.08)== a and math.floor(i*0.1) == b:
    print(i)
    exit()
    
print(-1)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
 
for i in range(1,10**10):
  if (int(i*0.08)/int(i*0.1)) == a/b:
    print(i)
    exit()

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
 
for i in range(10**10):
  if (int(i*0.08)/int(i*0.1)) == a/b:
    print(i)
    exit()

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

for i in range(10**10):
  if (int(i*0.08)/int(i*0.1) == a/b):
    print(i)
    exit()
Problem p02760 (python)

Fixed submission:
a = [list(map(int,input().split())) for i in range(3)]
n = int(input())
b = [int(input()) for i in range(n)]
 
for i in b:
  for j in range(3):
    for k in range(3):
      if i == a[j][k]:
        a[j][k] = 0
        
for i in range(3):
  if sum(a[i]) == 0:
    print('Yes')
    exit()
    
if a[0][0]+a[1][0]+a[2][0] == 0 or a[0][1]+a[1][1]+a[2][1] == 0 or a[0][2]+a[1][2]+a[2][2] == 0:
  print('Yes')
elif a[0][0]+a[1][1]+a[2][2] == 0 or a[0][2]+a[1][1]+a[2][0] == 0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a = [list(map(int,input().split())) for i in range(3)]
n = int(input())
b = [int(input()) for i in range(n)]

for i in range(3):
    for j in range(3):
      for k in b:
        if k == a[i][j]:
          a[i][j] = 101
          break
      
if a[1] == [101,101,101] or a[2] == [101,101,101] or a[3] == [101,101,101]:
  print('Yes')
  exit()
elif (a[1][1]==101 and a[2][1] ==101 and a[3][1] == 101) or (a[1][2]==101 and a[2][2] ==101 and a[3][2] == 101) and (a[1][3]==101 and a[2][3] ==101 and a[3][3] == 101):
  print('Yes')
  exit()
elif (a[1][1]==101 and a[2][2] ==101 and a[3][3] == 101) or (a[1][3]==101 and a[2][2] ==101 and a[3][1] == 101):
  print('Yes')
  exit()
else:
  print('No')
Problem p02780 (python)

Fixed submission:
n,k = map(int,input().split())
p = list(map(int,input().split()))
ave = []
ans = 0
tmp = 0

for i in range(n):
  ave.append((p[i]+1)/2)

for j in range(n):
  tmp += ave[j]
  if j >= k:
    tmp -= ave[j-k]
    
  ans = max(ans,tmp)


print(ans)

Buggy submission (verdict: Runtime Error):
n,k = map(int,input().split())
p = list(map(int,input().split()))
ave = []

for i in range(n):
  ave.append((p[i]+1)/2)

for i in range(n-k+1):
  ans = max(ans,sum(ave[i:i+k]))

print(ans)
Problem p02813 (python)

Fixed submission:
n=int(input())
p=tuple(map(int,input().split()))
q=tuple(map(int,input().split()))
temp=[0]*n
for i in range(0,n):
  temp[i]=i+1
from itertools import permutations
templ=list(permutations(temp,n))#長さnのtmpの順列リストを取る　どうやら昇順で取ってくれるらし
     
for i in range(0,len(templ)):
  if templ[i]==p:
    a=i#大きさの差を取るので，ずれは問題なし
  if templ[i]==q:
    b=i
print(abs(a-b))

Buggy submission (verdict: Runtime Error):
n=int(input())
p=tuple(map(int,input().split()))
q=tuple(map(int,input().split()))
temp=[0]*n
for i in range(0,n):
  temp[i]=i+1
from itertools import permutations
templ=list(permutations(temp,n) #長さnのtmpの順列リストを取る　どうやら昇順で取ってくれるらしい
for i in range(0,len(templ)):
  if templ[i]==p:
    a=i#そのまま大きさになる
  if templ[i]==q:
    b=i
print(abs(a-b))
Problem p02848 (python)

Fixed submission:
n = int(input())
s = input()
S = ''
list = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']*2
 
for i in s:
  S += list[list.index(i) + n]
  
print(S)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
S = ''
list = [A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z]*2

for i in range(len(s)):
  S += list[list.index('i') + n]
  
print(S)