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

Fixed submission:
from fractions import gcd
n,x = map(int,input().split())
l = list(map(int,input().split()))
ll = [abs(x-i) for i in l]
ans = ll[0]
for i in range(len(ll)):
    ans = gcd(ans,ll[i])
print(ans)

Buggy submission (verdict: Runtime Error):
from math import gcd
n,x = map(int,input().split())
l = list(map(int,input().split()))
ll = [abs(x-i) for i in l]
ans = ll[0]
for i in range(len(ll)):
    ans = gcd(ans,ll[i])
print(ans)

Buggy submission (verdict: Runtime Error):
from fractions import gcd
n,x = map(int,input().split())
l = list(map(int,input().split()))
ll = []
for i in range(n-1):
    ll.append(l[i+1]-l[i])
ans = ll[0]
for i in range(len(ll)):
    ans = gcd(ans,ll[i])
print(ans)
Problem p03273 (python)

Fixed submission:
h, w = map(int, input().split())
maps = []
for i in range(h):
	maps.append(str(input()))
row = [False] * h
col = [False] * w
for i in range(h):
	for j in range(w):
		if maps[i][j] == '#':
			row[i] = True
			col[j] = True

for i in range(h):
	if row[i]:
		for j in range(w):
			if col[j]:
				print(maps[i][j], end = '')
		print()

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
maps = []
for i in range(h):
	maps.append(str(input()))
row = [False] * h
col = [False] * w
for i in range(h):
	for j in range(w):
		if maps[i][j] == '#':
			row[i] = True
			col[j] = True

for i in range(h):
	if scr[i]:
		for j in range(w):
			if col[j]:
				print(maps[i][j], end = '')
		print()

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())
maps = []
for i in range(h):
	maps.append(str(input()))
row = [False] * h
col = [False] * w
for i in range(h):
	for j in range(w):
		if maps[i][j] == '#':
			row[i] = True
			col[j] = True

for i in range(h):
	if scr[i]:
		for j in range(w):
			if col[j]:
				print(a[i][j], end = '')
		print()
Problem p03280 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
if N >= 195:
  print("3")
elif N >= 165:
  print("2")
elif N >= 105:
  print("1")
else:
  print("0")
Problem p03281 (python)

Fixed submission:
N = int(input())
if N >= 195:
    print(5)
elif N >= 189:
    print(4)
elif N >= 165:
    print(3)
elif N >= 135:
    print(2)
elif N >= 105:
    print(1)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
c = []
for i in range(n):
    k = []
    for j in range(i):
        if i % j == 0:
            k.append(j)
    if len(k) == 8:
        c.append(i)
print(len(c))
Problem p03282 (python)

Fixed submission:
s = str(input())
k = int(input())
for i in range(k):
    if s[i] != "1":
        print(s[i])
        exit()
print(1)

Buggy submission (verdict: Runtime Error):
s = str(input())
k = int(input())
for i in range(k):
    if s[k] != 1:
        print(s[k])
        exit()
print(1)
Problem p03284 (python)

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

q = N//K
mod = N % K
if mod > 0:
    print(1)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N, M= map(int, input().split(" "))
A = [int(i) for i in input().split()]
count = 0
for i in range(N):
    for k in range(i,N):
        S = sum(A[i:k+1])
        if S % M ==0:
            count = count +1

print(count)

Buggy submission (verdict: Runtime Error):

Sum = int(input())

r = 0
for i in range(26):
    for k in range(15):
        if 4*i+7*k == Sum:
            r = r +1
        else:
            r = r
if r > 0:
    print("Yes")
else:
    print("No")
Problem p03288 (python)

Fixed submission:
my_rate = int(input())
if my_rate < 1200:
        print("ABC")
elif my_rate >=1200 and my_rate < 2800:
        print("ARC")
else:
        print("AGC")

Buggy submission (verdict: Runtime Error):
my_rate = input()
if my_rate < 1200:
        print("ABC")
elif my_rate >=1200 and my_rate < 2800:
        print("ARC")
else:
        print("AGC")

Buggy submission (verdict: Runtime Error):
my_rate = input()
if my_rate < 1200:
        print("ABC")
elif my rate >=1200 and my_rate < 2800:
        print("ARC")
else:
        print("AGC")
Problem p03325 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(n):
    while a[i] % 2==0:
        a[i] /= 2
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
cnt = 0
for i in range(N):
    while a[i] % 2==0:
        a[i] /= 2
        cnt += 1
print(cnt)
Problem p03347 (python)

Fixed submission:
n = int(input())
prev = ans = -1
a = [int(input()) for _ in range(n)]
for i in a:
    if i - prev > 1:
        print(-1)
        exit()
    elif i - prev == 1:
        ans += 1
    else:
        ans += i
    prev = i
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for _ in range(n)]
ans = 0
if a[0] != 0:
    print(-1)
    exit()
for i in range(n-1):
    if a[i+1] - a[i] > 1:
        print(-1)
        exit()
for _ in range(n):
    if set(a) == set([-1,0]) or set(a) == set([0]):
        break
    i = a.argmax()
    if i == 0:
        print(-1)
        exit()
    if a[i-1] + 1 == a[i]:
        a[i] = -1
        ans += 1
    elif a[i-1] == -1:
        a[i-1] = a[i] - 1
        a[i] = -1
        ans += 1
    else:
        print(-1)
        exit()
print(ans)
Problem p03352 (python)

Fixed submission:
n = int(input())
l = []
for i in range(1,n+1):
    for j in range(2,100):
        if i**j <= n:
            l.append(i**j)
print(max(l))

Buggy submission (verdict: Runtime Error):
n = int(input())
l = []
for i in range(1,n+1):
    for j in range(2,i):
        if i**j <= n:
            l.append(i**j)
print(max(l))

Buggy submission (verdict: Runtime Error):
n = input()
for i in range(i,n+1):
    if i**2 > n:
        print((i-1)**2)
        exit()
    elif i**2 == n:
        print(i**2)
        exit()
Problem p03363 (python)

Fixed submission:
from itertools import accumulate
from collections import Counter
n = int(input())
nums = list(map(int,input().split()))
s = [0]+list(accumulate(nums))
ans = 0
for i in Counter(s).values():
    if i > 1:
        ans += i * (i - 1) // 2
print(ans)

Buggy submission (verdict: Runtime Error):
from itertools import accumulate
from collections import Counter
n = int(input())
nums = list(map(int,input().split()))
s = [0]+list(accumulate(nums))
ans = 0
for i in Counter(S).values():
    if i > 1:
        ans += i * (i - 1) // 2
print(ans)
Problem p03379 (python)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = tuple(a)
a.sort()
A1 = a[n//2-1]
A2 = a[n//2]
med = (A1+A2)/2
for i in range(n):
    if b[i] <= med:
        print(A2)
    else:
        print(A1)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = tuple(a)
a.sort()
A1 = a[N//2-1]
A2 = a[N//2]
med = (A1+A2)/2
for i in range(N):
    if b[i] <= med:
        print(A2)
    else:
        print(A1)
Problem p03387 (python)

Fixed submission:
L = sorted(list(map(int,input().split())),reverse=True)
m = (L[0]-L[1]) % 2 - (L[0] - L[2]) % 2
if m == 0:
    print(L[0]+(-L[1]-L[2])//2)
else:
    print(L[0]+(-L[1]-L[2]+3)//2)

Buggy submission (verdict: Runtime Error):
L = list(map(int,input().split())).sort(reverse=True)
m = (L[0]-L[1]) % 2 - (L[0] - L[2]) % 2
if m == 0:
    print(L[0]+(-L[1]-L[2])//2)
else:
    print(L[0]+(-L[1]-L[2]+3)//2)
Problem p03427 (python)

Fixed submission:
n = str(input())
if n == "1":
    print(1)
    exit()
if n[0] == "1":
    tmpint = eval("9"*(len(n)-1))
    #print("tmpint",tmpint)
else:
    tmpint = eval(str(eval(n[0])-1) + "9"*(len(n)-1))
    #print("tmpint",tmpint)
tmpsum = sum([
        eval(str(tmpint)[i]) for i in range(len(str(tmpint)))
    ])
ssum = sum([
        eval(n[i]) for i in range(len(str(n)))
    ])
print(max(tmpsum,ssum))
#print(tmpsum,ssum)

Buggy submission (verdict: Runtime Error):
n = str(input())
if n == 1:
    print(1)
    exit()
if n[0] == "1":
    tmpint = eval("9"*(len(n)-1))
    #print("tmpint",tmpint)
else:
    tmpint = eval(str(eval(n[0])-1) + "9"*(len(n)-1))
    #print("tmpint",tmpint)
tmpsum = sum([
        eval(str(tmpint)[i]) for i in range(len(str(tmpint)))
    ])
ssum = sum([
        eval(n[i]) for i in range(len(str(n)))
    ])
print(max(tmpsum,ssum))
#print(tmpsum,ssum)

Buggy submission (verdict: Runtime Error):
n = str(input())
if n[0] == "1":
    tmpint = eval("9"*(len(n)-1))
    #print("tmpint",tmpint)
else:
    tmpint = eval(str(eval(n[0])-1) + "9"*(len(n)-1))
    #print("tmpint",tmpint)
tmpsum = sum([
        eval(str(tmpint)[i]) for i in range(len(str(tmpint)))
    ])
ssum = sum([
        eval(n[i]) for i in range(len(str(n)))
    ])
print(max(tmpsum,ssum))
#print(tmpsum,ssum)
Problem p03447 (python)

Fixed submission:
X = int(input())
X = X - int(input())
print(X % int(input()))

Buggy submission (verdict: Runtime Error):
x = int(input())
y = int(input())
z = int(input())
s = int(input())
a = 0
for i in range(x+1):
    for j in range(y+1):
        for k in range(z+1):
            if 500*i+100*j+50*k == s:
                a = a+1
print(a)

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

s = int(input())

a = 0
for i in range(x+1):
    for j in range(y+1):
        for k in range(z+1):
            if 500*x+100*y+50*z == s:
                a = a+1


print(a)
Problem p03448 (python)

Fixed submission:
x = int(input())
y = int(input())
z = int(input())
s = int(input())
a = 0
for i in range(x+1):
    for j in range(y+1):
        for k in range(z+1):
            if 500*i+100*j+50*k == s:
                a = a+1
print(a)

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

s = int(input())

a = 0
for i in range(x+1):
    for j in range(y+1):
        for k in range(z+1):
            if 500*x+100*y+50*z == s
                a = a+1


print(a)
Problem p03469 (python)

Fixed submission:
S = str(input())
print(S[0:3]+"8"+S[4:])

Buggy submission (verdict: Runtime Error):
n,h = map(int,input().split())
A = []
B = []
for i in range(n):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
A.sort(reverse=True)
B.sort(reverse=True)
B = [ i for i in B if i > A[0] ]
ans = 0
for i in B:
    ans += 1
    h -= i
    if h < 0:
        break
if h > 0:
    if h % A[0] == 0:
        ans += h // A[0]
    else:
        ans += h // A[0] + 1
print(ans)

Buggy submission (verdict: Runtime Error):
S = str(input())
S[3]="8"
print(S)
Problem p03473 (python)

Fixed submission:
N = int(input())
print(48-N)

Buggy submission (verdict: Runtime Error):
A,B = map(int,input().split())
S = str(input())
if len(S) > A+B+1:
        print("No1")
        exit()
if len(S[A+1:]) != B:
        print("No2")
        exit()
if S == S[0:A]+"-"+S[A+1:] and "-" not in S[0:A] and "-" not in S[A+1:] :
        print("Yes")
else:
        print("No")
Problem p03477 (python)

Fixed submission:
A,B,C,D = map(int,input().split())
E = A+B
F = C+D
if E > F:
  print("Left")
elif E == F:
  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")
elif A+B == C+D:
  print("Blanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
A,B,C,D =　map(int,input().split())
if A+B > C+D:
  print("Left")
elif A+B == C+D:
  print("Blanced")
else:
  print("Right")

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

i = 0
for k in range(N +1):
    if A <= sum( [int(s) for s in str(k)] ) <= B:
        i = i+1
print(i)
Problem p03478 (python)

Fixed submission:
n, a, b = map(int, input().split())
c = 0
for i in range(n+1):
    if a <= sum(list(map(int, list(str(i))))) <= b:
        c += i
print(c)

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

i = 0
for i in range(N +1):
    if A <= sum( [int(s) for s in str(i)] ) <= B:
        i = i+1
print(i)

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

i = 0
for i in range(N +1)
    if A <= sum( [int(s) for s in str(i)] ) <= B:
        i = i+1
print(i)
Problem p03486 (python)

Fixed submission:
s=" ".join(sorted(input()))
t=" ".join(sorted(input(),reverse=True))
if s<t:print("Yes")
else:print("No")

Buggy submission (verdict: Runtime Error):
s = str(input())
s = sorted([s[i] for i in range(len(s))])
t = str(input())
t = sorted([t[i] for i in range(len(t))],reverse=True)

if len(t) < len(s):
    for i in range(len(t)):
        if s[i] == t[i]:
            i += 1
        if s[i] < t[i]:
            print("Yes")
            exit()
    print("No")
else:
    s = sorted(s,reverse=True)
    for i in range(len(s)):
        if s[i] > t[i]:
            print("No")
            exit()
    print("Yes")

Buggy submission (verdict: Runtime Error):
s = str(input())
s = sorted([s[i] for i in range(len(s))])
t = str(input())
t = sorted([t[i] for i in range(len(t))],reverse=True)

if len(t) < len(s):
    for i in range(len(t)):
        if s[i] == t[i]:
            i += 1
        if s[i] < t[i]:
            print("Yes")
            exit()
    print("No")
else:
    s = sorted(s,reverse=True)
    for i in range(len(s)):
        if s[i] > t[i]:

            print("No")
            exit()

    print("Yes")
Problem p03502 (python)

Fixed submission:
N = int(input())
S = str(N)

f = 0
for i in range(len(S)):
    f += int(S[i])
if N % f == 0:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
S = str(N)

f = 0
for i in range(len(N)):
    f += int(S[i])
if N % f == 0:
    print("Yes")
else:
    print("No")
Problem p03543 (python)

Fixed submission:
S = str(input())
if S[0] == S[1] == S[2] or S[1] == S[2] == S[3]:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
S = str(input())
N = int(input())
q = (N -1) // 5
mod = N % 5

    print(S[q]+S[mod-1])

Buggy submission (verdict: Runtime Error):
S = str(input())
N = int(input())
q = (N -1) // 5
mod = N % 5
if N == 25:
    print(S[4]+S[4])
else:
    print(S[q]+S[mod-1])
Problem p03549 (python)

Fixed submission:
import sys
input = sys.stdin.readline
n,m = map(int, input().split())
print((1900*m + 100*(n - m))*2**m)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
n,m = map(int, input().split())
print((1900*m + 100*(n − m))*2**m)

Buggy submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
n,m = map(int, input().split())
print((1900*m + 100(N − M))*2**m)
Problem p03555 (python)

Fixed submission:
S = str(input())
s = str(input())
if S[0] == s[2] and S[1] == s[1] and S[2] == s[0]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
n = int(input())
for i in range(n+1):
    if i**2 > n:
        print((i-1)**2)
        exit()
Problem p03563 (python)

Fixed submission:
R = int(input())
G = int(input())
P = 2*G-R
print(P)

Buggy submission (verdict: Runtime Error):
R = int(input())
G = int(input())
P = 2G-R
print(P)
Problem p03591 (python)

Fixed submission:
s = str(input())
if s[0:4] == "YAKI":
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
n,m,k = map(int, input().split())
for i in range(n + 1):
    for j in range(m + 1):
        if i*(m - j) + j*(n - i) == k:
            print("Yes")
            exit()
print("No")
Problem p03611 (python)

Fixed submission:
from collections import Counter
n = int(input())
A = list(map(int,input().split()))
B = [A[i]-1 for i in range(n)] +  A + [A[i]+1 for i in range(n)]
ans = Counter(B).most_common()[0][0]
print(B.count(ans))

Buggy submission (verdict: Runtime Error):
import statistics
n = int(input())
A = list(map(int,input().split()))
B = [A[i]-1 for i in range(n)] +  A + [A[i]+1 for i in range(n)]
ans = statistics.mode(B)
print(B.count(ans))
Problem p03623 (python)

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

Buggy submission (verdict: Runtime Error):
n = int(input())
A = list(map(int, input().split()))
a = list(set(A))
a.sort(reverse = True)
B = []
for i in a:
    if A.count(i) >= 2:
        B.append(i)
if len(B) <= 1:
    print(0)
else:
    print(B[0]*B[1])
Problem p03625 (python)

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

n = int(input())
A = list(map(int, input().split()))
c = collections.Counter(A)
l = c.most_common()
L = [ l[i] for i in range(len(l)) if l[i][1] >= 2 ]
b = sorted(L,reverse = True)
if len(b) == 0:
    ans = 0
elif len(b) == 1 and b[0][1] < 4:
    ans = 0
else:
    if b[0][1] >= 4:
        ans = b[0][0]**2
    else:
        ans = b[0][0]*b[1][0]
print(ans)

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

n = int(input())
A = list(map(int, input().split()))
a = reversed(list(set(A)))
B = []
for k in range(len(a)):
    i = a[k]
    if A.count(i) >= 4:
        if len(B) == 0:
            print(i**2)
            exit()
        else:
            B.append(i)
            if len(B) >= 2:
                print(B[0]*B[1])
                exit()

    if A.count(i) >= 2:
        B.append(i)
        if len(B) >= 2:
            print(B[0]*B[1])
            exit()
if len(B) <= 1:
    print(0)

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

n = int(input())
A = list(map(int, input().split()))
a = sorted(list(set(A)),reverse = True)
B = []
for i in a:
    if A.count(B[0]) >= 4:
        print(i**2)
        exit()
    if A.count(i) >= 2:
        B.append(i)
        if len(B) >= 2:
            print(B[0]*B[1])
            exit()
if len(B) <= 1:
    print(0)
Problem p03643 (python)

Fixed submission:
c = str(input())
print("ABC"+c)

Buggy submission (verdict: Runtime Error):
ソースコード 拡げる

Copy
Copy
N = int(input())
count = 0
for i in range(N):
    c = 2**count
    if c > N:
        print(c//2)
        exit()
    else:
        count +=1
Problem p03699 (python)

Fixed submission:
n = int(input())
s = [int(input()) for i in range(n)]
s.sort()
j = sum([ i % 10 for i in s ])
if j == 0:
    ans = 0
else:
    if sum(s) % 10 != 0:
        ans = sum(s)
    else:
        for i in range(n):
            tmp = sum(s)-s[i]
            if tmp % 10 != 0:
                ans = tmp
                break
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [int(input()) for i in range(n)]
s.sort()
j = sum([ i % 10 for i in s ])
if j == 0:
    ans = 0
else:
    for i in range(n):
        tmp = sum(s)-s[i]
        if tmp % 10 != 0:
            ans = tmp
            break
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
pros = [ int(input()) for i in range(n)]
pros.sort()
tmp = sum(pros)
if tmp % 10 == 0:
    ttmp = sum(pros[0:-1])
    if ttmp % 10 == 0:
        ans = 0
else:
    ans = tmp
    
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
pros = [ int(input()) for i in range(n)]
k = set()
for i in range(1 << len(pros)):
    output = []
    for j in range(len(pros)):
        if ((i >> j) & 1) == 1:
            output.append(pros[j])
    if sum(output) % 10 != 0:
        k.add(sum(output))
print(max(k))
Problem p03712 (python)

Fixed submission:
N,M = map(int,input().split())
print("#"*(M+2))
for i in range(N):
    print("#"+str(input())+"#")
print("#"*(M+2))

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
print("#"*(N+2))
for i in range(M):
    print("#"+str(input())+"#")
print("#"*(N+2))
Problem p03777 (python)

Fixed submission:
A,B = map(str,input().split())
if A == "H":
  A = 1
else:
  A = -1
if B == "H":
  B = 1
else:
  B = -1

if A*B > 0:
  print("H")
else:
  print("D")

Buggy submission (verdict: Runtime Error):
w,a,b = map(int,input().split())
ans = 0
if b > a:
    if a + w < b:
        ans = b - (a + w)
else:
    if b + w <= a:
        ans = a - (b + w)

print(ans)
Problem p03845 (python)

Fixed submission:
N = int(input())
Problems = list(map(int,input().split()))
M = int(input())
for i in range(M):
    p,t = map(int,input().split())
    k = Problems[p-1]
    Problems[p-1] = t
    print(sum(Problems))
    Problems[p-1] = k

Buggy submission (verdict: Runtime Error):
N = int(input())
Problems = list(map(int,input().split()))
results = []
M = int(input())
for i in range(M):
  	temPro = Problems
    p,t = map(int,input().split())
    temPro[p-1] = t

    print(sum(temPro))

Buggy submission (verdict: Runtime Error):
N = int(input())
Problems = list(map(int,input().split()))
M = int(input())
for i in range(M):
    p,t = map(int,input().split())
    Problems[p] = t
    print(sum(Problems))
Problem p03852 (python)

Fixed submission:
c = str(input())
if c in ["a","i","u","e","o"]:
    print("vowel")
else:
    print("consonant")

Buggy submission (verdict: Runtime Error):
c = str(input())
if c in [a,i,u,e,o]:
    print("vowel")
else:
    print("consonant")

Buggy submission (verdict: Runtime Error):
c = str(input())
if c in {a,i,u,e,o}:
    print("vowel")
else:
    print("consonant")
Problem p03860 (python)

Fixed submission:
A,B,C = map(str,input().split())
print("A"+B[0]+"C")

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

print(b // x - a //x)
Problem p03909 (python)

Fixed submission:
h,w = map(int,input().split())
maps = []
alphabet = ["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"]
for i in range(h):
    maps.append(list(map(str,input().split())))
for i in range(h):
    for j in range(w):
        if maps[i][j] == "snuke":
            print(alphabet[j]+str(i+1))
            exit()

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
maps = []

for i in range(h):
    maps.append(list(map(str,input().split())))
for i in range(h):
    for j in range(w):
        if maps[i][j] == "snuke":
            print('{}{}'.format(chr(row.index('snuke')+65),i+1))
            exit()

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
maps = []

for i in range(h):
    maps.append(list(map(int,input().split())))
for i in range(h):
    for j in range(w):
        if maps[i][j] == "snuke":
            print(i+1)
            exit()

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
maps = []
for i in range(h):
    maps.append(list(map(int,input().split())))
for i in range(h):
    for j in range(w):
        if maps[i][j] == "snuke":
            print('{}{}'.format(chr(row.index('snuke')+65),i+1))
            exit()

Buggy submission (verdict: Runtime Error):
h,w = map(int,input().split())
maps = []
for i in range(h):
    maps.append(list(map(int,input().split())))
for i in range(h):
    for j in range(w):
        if maps[i][j] == "snuke":
            print(chr(ord('A') + w) + str(h + 1))
            exit()
Problem p03992 (python)

Fixed submission:
s= str(input())
print(s[0:4]+" "+s[4:])

Buggy submission (verdict: Runtime Error):
N = int(input())
n = list(map(int,input().split()))
ans  = 0
for i in range(N):
    if n[n[i]-1] == i:
        ans += 1 
print(ans)
Problem p03993 (python)

Fixed submission:
N = int(input())
n = list(map(int,input().split()))
ans  = 0
for i in range(N):
    if n[n[i]-1] == i+1:
        ans += 1 
print(ans // 2)

Buggy submission (verdict: Runtime Error):
N = int(input())
n = list(map(int,input().split()))
ans  = 0
for i in range(N):
    if n[n[i]] == i:
        ans += 1 
print(ans)
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=int(input())
b=int(input())
c=int(input())
print((a+b)*h/2)

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
print((a+b)*h//2)