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

Fixed submission:
N, M = map(int, input().split())
votes = list(map(int, input().split()))
min_votes = sum(votes) * 1.0 / (4*M)
votes_greater_than_min = list(filter(lambda x: x >= min_votes, votes))
if len(votes_greater_than_min) >= M:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
votes = list(map(int, input().split()))
min_votes: float = sum(votes) * 1.0 / (4*M)
votes_greater_than_min = list(filter(lambda x: x >= min_votes, votes))
if len(votes_greater_than_min) >= M:
    print('Yes')
else:
    print('No')
Problem p02780 (python)

Fixed submission:
n,k=map(int, input().split()) 
p=list(map(int, input().split()))
E = []
for e in p:
    E.append( (1+e)/2 )

s=0
for i in range(k):
    s += E[i]
    
box=[]
box.append(s)
for i in range(k,n):
    s += E[i] - E[i-k]
    box.append(s)
    
print(max(box))

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

new_p = [(1+i)/2 for i in p]
box=[]
sec_box=[]
s=0
for i in range(n):
    s = sum(new_p[:i])
    box.append(s)
    if i>k:
        sec_box.append(box[i]-box[i-k])
print(max(sec_box))
Problem p02783 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split()) 
if A % b !=0:
    print(a//b+1)
else:
    print(a//b)
Problem p02817 (python)

Fixed submission:
a,b=map(str, input().split())
print(b+a)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split())
print(a+b)
Problem p02910 (python)

Fixed submission:
s=str(input())
even = ["L","U", "D"]
odd = ["R", "U", "D"]
a = []
b = []
for i in range(len(s)):
     if (i+1)%2 == 0:
            if s[i] in even:
                a.append(True) 
            else:
                a.append(False)
     elif (i+1)%2 != 0:
            if s[i] in odd:
                b.append(True) 
            else:
                b.append(False)
if all(a) and all(b):
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
s=str(input())
even = ["L". "U", "D"]
odd = ["R", "U", "D"]
a = []
b = []
for i in range(len(str)):
     if i%2 == 0:
            if s[i] in even:
                a.apend(True) 
            else:
                a.apend(False)
     elif i%2 i= 0:
            if s[i] in odd:
                b.apend(True) 
            else:
                b.apend(False)
if all(a) and all(b):
    print('Yes')
else:
    print('No')
Problem p03494 (python)

Fixed submission:
import numpy as np
N = int(input())
box = list(map(int, input().split()))
box = np.array(box)
count=0
while(True):
  if any([i % 2 != 0 for i in box]):
    break
  elif all([i % 2 == 0 for i in box]):
    box /= 2
    count +=1
print(count)

Buggy submission (verdict: Runtime Error):
N = int(input())
box = list(map(int, input().split()))
count = 0
for i in range(N):
    if box%2 ==0:
        box/=2
        count ++
    elif box%2 !=0:
        break
print(count)
Problem p03657 (python)

Fixed submission:
a,b=map(int, input().split()) 
if (a+b)%3 ==0 or a%3==0 or b%3==0:
    print("Possible")
else:
    print("Impossible")

Buggy submission (verdict: Runtime Error):
a,b=map(int, input().split()) 
if (a+b)%3 ==0 or a%==0 or b%==0:
    print("Possible")
else:
    print("Impossible")
Problem p03997 (python)

Fixed submission:
a=int(input()) 
b=int(input()) 
h=int(input()) 

print(int((a+b)*h/2))

Buggy submission (verdict: Runtime Error):
a,b,h=map(int, input().split())
print((a+b)*h/2)
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())

print(int((a + b) * h / 2))

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

Fixed submission:
import sys

I = list(map(int, input().split()))
H = I[0]
A = I[1]
count = 0

if not 1 <= H or not H <= 10**4 or not 1 <= A or not A <= 10**4:
    print("error:1≤H≤10000,1≤A≤10000である必要があります")
    sys.exit()
# print("H =",H, "A =",A)

while True:
    H -= A
    count += 1
    # print("H =",H, "A =",A)
    if H <= 0:
        break
print(count)

Buggy submission (verdict: Runtime Error):
import sys
import math

H = int(input())
count = 0

if not 1 <= H or not H <= 10**12:
    print("error:1≤H≤10^12である必要があります")
    sys.exit()

while True:
    if H <= 0:
        break
    H = math.floor(H / 2)
    count = 1 + 2*count
print(count)
Problem p02786 (python)

Fixed submission:
h = int(input())

result = 0
i = 1
while h > 0:
    h = h // 2
    result = result + i
    i *= 2

print(result)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split())
N = list(map(int,input().split()))
N.sort()
for i in range(b):
    if N:
        N.pop()
print(sum(N))
Problem p02717 (python)

Fixed submission:
n = list(map(int,input().split()))
print(n[2],n[0],n[1])

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))
print(n[1] n[2] n[3])
Problem p02718 (python)

Fixed submission:
n = list(map(int,input().split()))
vote = list(map(int,input().split()))
a = sum(vote)/(4*n[1])
result = 0
for i in range(n[0]):
  if vote[i]>=a:
    result += 1
if result<n[1]:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
n = list(map(int,input().split()))
vote = list(map(int,input().split()))
a = sum(vote)/(4*n[1])
result = 0
for i in range(n[0]):
  if vote[i]=>a:
    result += 1
if result<n[1]:
  print('No')
else:
  print('Yes')
Problem p02731 (python)

Fixed submission:
line = int(input())
calc = line * line * line / 27

print(str(calc))

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

calc = int(line) * int(calc) * int(calc) / 27

print(str(calc))
Problem p02830 (python)

Fixed submission:
N = int(input())
S, T = map(str,input().split())
for i in range(N):
     print(S[i] + T[i],end="")

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(str,input().split())
for i in N:
     print(S[i] + T[i],end="")

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(int,input().split())
for i in N:
     print(S[i] + T[i],end="")

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(int,input().split())
for i in range(N):
     print(S[i] + T[i])

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(int,input().split())
for i in N:
     print(S[i] + T[i])

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(int,input().split())
for i in N:
    print(S + T)
    print(S[i] + T[i])

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(int,input().split())
for i in N:
    print(S + T)
print(S[i] + T[i])

Buggy submission (verdict: Runtime Error):
N = int(input())
S, T = map(int,input().split())
for i in N:
    print(S + T)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = int(input())
T = int(input())
for i in N:
    print(S + T)

Buggy submission (verdict: Runtime Error):
N = int(input())
S = int(input())
T = int(input())
for i in N:
    print(S + T)
Problem p02772 (python)

Fixed submission:
n = input()
_list = input().split(" ")
_list = [int(x) for x in _list]
even = [x for x in _list if x % 2==0]
answer = []
for x in even:
    if x % 3 == 0 or x % 5 == 0:
        answer.append(True)
if len(even) ==len(answer):
    print("APPROVED")
else:
    print("DENIED")

Buggy submission (verdict: Runtime Error):
N = input()
A = map(int, input().split())
even = []
count = []
for x in A:
    if x % 2 == 0:
        even.append(x)
for x in even:
    if x%3 == 0 or x%5 == 0:
        count += 1
if count == len(even):
    print("Approved")
else:
    print("Denied")
Problem p02811 (python)

Fixed submission:
K, X = map(int, input().split())
print("Yes") if 500 * K >= X else print("No")

Buggy submission (verdict: Runtime Error):
K, X = [map(int, input().split())]
print("Yes") if K*500 >= X else print("No")

Buggy submission (verdict: Runtime Error):
K, X = (int, input().split())
print("Yes") if 500*K>X else print("No")
Problem p02812 (python)

Fixed submission:
N = int(input())
S = str(input())
print(S.count("ABC"))

Buggy submission (verdict: Runtime Error):
[K, X] = [int(x) for x in input().split()]
if K * 500 >= X:
    print('Yes')
else:
    print('No')
Problem p02830 (python)

Fixed submission:
new_str = ""
num = int(input())
string = input().split(" ")
for i in range(0,num):
    new_str += string[0][i] + string[1][i]
print(new_str)

Buggy submission (verdict: Runtime Error):
new_str = ""
num = int(input())
string = input().split(" ")
for i in range(0,num):
    new_str += string[0][i] + string[i][0]
print("".join(new_str))
Problem p03415 (python)

Fixed submission:
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
print(s)

Buggy submission (verdict: Runtime Error):
s=''
for i in range(3):
  temp=input()
  s=s+temp[i]
 print(s)

Buggy submission (verdict: Runtime Error):
s=''
for i in range(3):
  s=s+input()[i]
 print(s)

Buggy submission (verdict: Runtime Error):
for i in range(3):
  input().strip[i]
Problem p02922 (python)

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

tap = 0

if b != 1:
    while(tap*(a-1) +1) < b:
        tap += 1

print(tap)

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

tap = 0

if b != 1:
    while ( (tap*(a-1) +1) < b:
        tap += 1

print(tap)
Problem p02789 (python)

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



if N==M:
    print("Yes")

        
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N= int(input())
M=int(input())
if N==M:
    print("yes")
else:
    print("no")
Problem p02817 (python)

Fixed submission:
s,t=input().split()
print(t+s)

Buggy submission (verdict: Runtime Error):
T=input()
S=input()
print(T + S)
Problem p02909 (python)

Fixed submission:
S=input()
 
if S == 'Sunny':
  print('Cloudy')
elif S == 'Cloudy':
  print('Rainy')
else:
  print('Sunny')

Buggy submission (verdict: Runtime Error):
S=input()
 
if S == 'Sunny':
	print("Cloudy)
elif S == 'Rainy':
	print('Sunny')
else:
	print('Rainy')

Buggy submission (verdict: Runtime Error):
S=input()
 
if S=='Sunny':
  print("Cloudy)
elif S=='Rainy':
  print('Sunny')
else:
  print('Rainy')

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

if S=='Sunny':
  print("Cloudy)
elif S=='Rainy':
  print('Sunny')
else S=='Cloudy':
  print('Rainy')
Problem p02999 (python)

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

Buggy submission (verdict: Runtime Error):
M,A = map(int,input().split())
 
if X < A:
  print("0")
else:
  print("10")

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

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

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

if A*N < B:
    print(A*N)
else:
    print(B)

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

if N*A>B:
  print(B)
else print(N*A)
Problem p02787 (python)

Fixed submission:
from math import ceil, floor

h, n = map(int, input().split())
l = [list(map(int, input().split())) for _ in range(n)]

if n == 1:
  print(ceil(h/l[0][0]) * l[0][1])
  exit(0)

dp = [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[hp] = min([dp[hp], dp[hp - l[i][0]] + l[i][1]])
    else:
      dp[hp] = min([dp[hp], l[i][1]])

print(dp[-1])

Buggy submission (verdict: Runtime Error):
from math import ceil, floor

h, n = map(int, input().split())
l = []
for _ in range(n):
  l.append(list(map(int, input().split())))

if n == 1:
  print(ceil(hp/l[0][0]) * l[0][1])
  exit(0)

dp = [
  [ceil(hp/l[0][0]) * l[0][1] for hp in range(h + 1)],
  [None] * (h + 1)
  ]

for i in range(1, n):
  for hp in range(h + 1):
    if hp >= l[i][0]:
      dp[1][hp] = min([dp[0][hp], dp[1][hp - l[i][0]] + l[i][1]])
    else:
      dp[1][hp] = min([dp[0][hp], l[i][1]])

  dp[0] = dp[1]
  dp[1] = [None] * (h + 1)

print(dp[0][-1])
Problem p02888 (python)

Fixed submission:
from collections import defaultdict

n = int(input())
l = list(map(int, input().split()))
l.sort()

# 2辺の和リスト
d = [0] * (l[-1] * 3)
ans = 0

for i in range(n):
  for val in d[l[i] + 1:]:
    # 長さd[i]より小さい組み合わせはOK
    ans += val

  # 自身との組み合わせをdに追加
  for j in range(i):
    d[l[i] + l[j]] += 1

print(ans)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

n = int(input())
l = list(map(int, input().split()))
l.sort()

# 2辺の和リスト
d = [0] * (l[-1] * 2)
ans = 0

for i in range(n):
  for val in d[l[i] + 1:]:
    # 長さd[i]より小さい組み合わせはOK
    ans += val

  # 自身との組み合わせをdに追加
  for j in range(i):
    d[l[i] + l[j]] += 1

print(ans)
Problem p02936 (python)

Fixed submission:
import sys

sys.setrecursionlimit(10**6)

n, q = map(int, sys.stdin.readline().strip().split())

path = [[] for _ in range(n + 1)]
for i in range(n - 1):
  a, b = map(int, input().split())
  path[a].append(b)
  path[b].append(a)

plus = [0] * (n + 1)

for _ in range(q):
  p, x = map(int, sys.stdin.readline().strip().split())
  plus[p] += x

def calc(num, path, plus, parent):
  for i in path[num]:
    if i == parent:
      continue

    plus[i] += plus[num]
    calc(i, path, plus, num)

calc(1, path, plus, 0)

print(" ".join([str(i) for i in plus[1:]]))

Buggy submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10**6)

n, q = map(int, sys.stdin.readline().strip())

path = [[] for _ in range(n + 1)]
for i in range(n - 1):
  a, b = map(int, input().split())
  path[a].append(b)
  path[b].append(a)

plus = [0] * (n + 1)

for _ in range(q):
  p, x = map(int, sys.stdin.readline().strip())
  plus[p] += x

def calc(num, path, plus, parent):
  for i in path[num]:
    if i == parent:
      continue

    plus[i] += plus[num]
    calc(i, path, plus, num)

calc(1, path, plus, 0)

print(" ".join([str(i) for i in plus[1:]]))
Problem p03006 (python)

Fixed submission:
#!/usr/bin/python3

from itertools import permutations
from collections import Counter

def main():
  n = int(input())
  x = []
  y = []

  if n == 1:
    print(1)
    return

  for i in range(n):
    x_tmp, y_tmp = map(int, input().split(' '))
    x.append(x_tmp)
    y.append(y_tmp)

  cnt = Counter()

  for i, j in permutations(range(n), 2):
    dist = (x[i] - x[j], y[i]- y[j])
    cnt[dist] += 1

  dist, c = cnt.most_common(1)[0]
  print(n - c)

if __name__ == '__main__':
  main()

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

from itertools import product
from collections import Counter

def main():
  n = int(input())
  x = []
  y = []

  if n == 1:
    print(1)
    return

  for i in range(n):
    x_tmp, y_tmp = map(int, input().split(' '))
    x.append(x_tmp)
    y.append(y_tmp)

  cnt = Counter()

  for i, j in product(range(n), 2):
    dist = (x[i] - x[j], y[i]- y[j])
    cnt[dist] += 1

  dist, c = cnt.most_common(1)[0]
  print(n - c)

if __name__ == '__main__':
  main()

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

from itertools import combinations
from collections import Counter

n = int(input())
x = []
y = []

for i in range(n):
  x_tmp, y_tmp = map(int, input().split(' '))
  x.append(x_tmp)
  y.append(y_tmp)

cnt = Counter()

for i, j in combinations(range(n), 2):
  dist = (x[i] - x[j], y[i]- y[j])
  cnt[dist] += 1

dist, c = cnt.most_common(1)[0]
print(n - c)
Problem p02957 (python)

Fixed submission:
A,B=input().split()
a=int(A)
b=int(B)
K=(b+a)/2
k=int(K)
if((b+a)%2==0):
    print(k)
if((b+a)%2!=0):
    print("IMPOSSIBLE")

Buggy submission (verdict: Runtime Error):
A=input() 
a=int(A)
B=input() 
b=int(B)
K=(b+a)/2
k=int(K)
if((b+a)%2==0):
    print(k)
if((b+a)%2!=0):
    print("IMPOSSIBLE")
Problem p02811 (python)

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

if 500 * K >= X:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
K = int(input())
X = int(input())

if 500 * K >= X:
    print('Yes')
else:
    print('No')
Problem p03059 (python)

Fixed submission:
a = list(map(int, input().split()))
print(a[2]//a[0] * a[1])

Buggy submission (verdict: Runtime Error):
a = list(map(int, input().split())
print(a[1]//a[0]*(a[2]+0.5))
Problem p03711 (python)

Fixed submission:
x, y = map(int, input().split())
a = [0, 1, 3, 1, 2, 1, 2, 1, 1, 2, 1, 2, 1]
if a[x] == a[y]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split())
a = [0, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1]
if a[x] == a[y]:
    print("Yes")
else:
    print("No")
Problem p02909 (python)

Fixed submission:
import sys
import math
import re

a = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy":"Sunny"}

print(a[input()])

Buggy submission (verdict: Runtime Error):
import sys
import math
import re

a = {"Sunny": "Cloudy", "Cloudy": "Rainy", "Rainy":"Sunny"}

print a[input()]
Problem p03043 (python)

Fixed submission:
import math
n,k = map(int,input().split())

ret=0

for i in range(1,n+1):
    p=math.ceil(math.log2(k/i))
    p=p if p>0 else 0
    ret+=math.pow(0.5,p)/n

ret=math.floor(ret*1e12)*1e-12
print(ret)

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

ret=0

for i in range(1,n+1):
    p=math.ceil(math.log2(k/i))
    p=p if p>0 else 0
    ret+=math.pow(0.5,p)/n

print(ret)
Problem p03048 (python)

Fixed submission:
R,G,B,N=map(int,input().split())

#R*r+G*g+B*b==n
ir=int(N/R)+1
ig=int(N/G)+1
ib=int(N/B)+1
s=0
for r in range(ir):
    for g in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)

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

#R*r+G*g+B*b==n
ir= int(R/N)
ig=int(G/N)
ib=int(B/N)
s=0
for R in range(ir):
    for G in range(ig):
        if(R*r+G*g>N):
            break;
        if((N-R*r-G*g)%B==0):
            s+=1
print(s)
Problem p03231 (python)

Fixed submission:
from sys import exit
import math
from fractions import gcd

def lcm(x,y):
    return x*y//gcd(x,y)

N,M=map(int,input().split())
S=input()
T=input()
if S[0] != T[0]:
    print("-1")
    exit()
if N==M:
    if S==T:
        print(N)

    else:
        print(-1)
    exit()
    
if N<M:
    N,M=M,N
    S,T=T,S
    

# N>M S>T
if(N%M==0):
    S2=""
    for i in range(N):
        if i%(N//M)==0 :
            S2+=S[i]
            
    if S2==T:
        print(N)
    else:
        print(-1)
    exit()

else:
    g=gcd(N,M)
    S2=""
    for i in range(N):
        if i%(N//g)==0 :
            S2+=S[i]
    T2=""
    for i in range(M):
        if i%(M//g)==0 :
            T2+=T[i]
    if S2==T2:
        print(lcm(N,M))
    else:
        print(-1)

Buggy submission (verdict: Runtime Error):
from sys import exit
import math
from fractions import gcd

def lcm(x,y):
    return x*y/gcd(x,y)

N,M=map(int,input().split())
S=input()
T=input()
if S[0] != T[0]:
    print("-1")
    exit()
if N<M:
    N,M=M,N
    S,T=T,S
    

# N>M S>T
if(N%M==0):
    S2=""
    for i in range(N):
        if i%(N//M)==0 :
            S2+=S[i]
            
    if S2==T:
        print(N)
    else:
        print(-1)
    exit()

else:
    print(lcm(n,m))

Buggy submission (verdict: Runtime Error):
from sys import exit
import fractions
n,m=map(int,input().split())
s=input()
t=input()


print((m*n)//gcd)
Problem p03408 (python)

Fixed submission:
ifhesay={}
def say(word,add):
	if word in ifhesay:
		ifhesay[word]+=add
	else:
		ifhesay[word]=add

n=int(input())

for i in range(n):
	say(input(),1)

m=int(input())

for i in range(m):
	say(input(),-1)

max=0

for k in ifhesay:
	v=ifhesay[k]
	if v>max:
		max=v
print(max)

Buggy submission (verdict: Runtime Error):
3
apple
orange
apple
1
grape
Problem p03447 (python)

Fixed submission:
x=int(input())
a=int(input())
b=int(input())

i=0
while (x-a-b*i)>=0:
	i+=1
i-=1
print(x-a-b*i)

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

i=0
while (x-a-b*i)>=0:
	i+=1
i-=1
print(x-a-b*i)
Problem p03680 (python)

Fixed submission:
import sys
n=int(input())
a=[]
f=[]
has2=False
for i in range(n):
  ai=int(input())-1
  if ai==1:
    has2=True
  a.append(ai)
  f.append(False)

if has2==False:
  print("-1")
  sys.exit()

now=0
cnt=0
while True:
  
  if f[now]==True:
    print(-1)
    sys.exit()
  if now==1:
    print(cnt)
    sys.exit()
  f[now]=True
  now=a[now]
  cnt+=1

Buggy submission (verdict: Runtime Error):
import sys
n=int(input())
a=[]
f=[]
has2=False
for i in range(n):
  ai=int(input())
  if ai==2:
    has2=True
  a.append(ai)
  f.append(False)

if has2==False:
  print("-1")
  sys.exit()

f[0]=True
now=0
cnt=0
while True:
  if f[now]==True:
    print(-1)
    break
  if now==2:
    print(cnt)
    break
  f[now]=True
  now=a[now]
  cnt++
Problem p02760 (python)

Fixed submission:
a = [int(j) for i in range(3) for j in input().split(' ')]
n = int(input())
nn = [int(input()) for i in range(n)]

cnt = 0
for ni in nn:
  if ni in a:
    cnt += 1
    a[a.index(ni)] = 0

judge = "No"
for i in range(3):
  if sum(a[i::3])==0 or sum(a[i*3:i*3+3])==0:
    judge = "Yes"
    
if sum(a[::4])==0 or (a[2]+a[4]+a[6])==0:
  judge = "Yes"
  
print(judge)

Buggy submission (verdict: Runtime Error):
60 88 34
92 41 43
65 73 48
10
60
43
88
11
48
73
65
41
92
34
Problem p02848 (python)

Fixed submission:
n = int(input())
s = [i for i in str(input())]
alpha_lst = [i for i in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ']

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]
#tmp = [alpha_lst.index(i) for i in s]
print(''.join(tmp))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input()).split()
alpha_lst = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split()

tmp = [alpha_lst[(int(alpha_lst.index(i))+n)%26] for i in s]

print(''.join(tmp))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = str(input()).split()
alpha_lst = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split()

tmp = [alpha_lst[(alpha_lst.index(i)+n)%26] for i in s]

print(''.join(tmp))
Problem p03110 (python)

Fixed submission:
n = int(input())
sumv = 0
for idx in range(n):
  v, u = str(input()).split(' ')
  if u == 'JPY':
    sumv += float(int(v))
  elif u == 'BTC':
    sumv += float(v) * 380000.0
print(sumv)

Buggy submission (verdict: Runtime Error):
n = int(input())
sumv = 0
for idx in n:
  v, u = str(input()).split(' ')
  if u == 'JPY':
    sumv += float(int(v))
  elif u == 'BTC':
    sumv += float(v) * 380000.0
print(sumv)