Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n,*a=map(int,open(0).read().split())
d=[j-i for i,j in zip(a,a[1:]+[a[0]])]
M=max(d)
dd=[M-x for x in d]
if (n==2 and sum(a)%3) or any(x%n for x in dd) or sum(x//n for x in dd)!=M or sum(a)//M!=n*(n+1)//2:
	print("NO")
else:
	print("YES")

Fixed submission:
n,*a=map(int,open(0).read().split())
d=[j-i for i,j in zip(a,a[1:]+[a[0]])]
M=max(d)
dd=[M-x for x in d]
if n==1:
	print("YES")
elif (n==2 and sum(a)%3) or any(x%n for x in dd) or sum(x//n for x in dd)!=M or sum(a)//M!=n*(n+1)//2:
	print("NO")
else:
	print("YES")

Buggy python submission (verdict: Runtime Error):
n,*a=map(int,open(0).read().split())
d=[j-i for i,j in zip(a,a[1:]+[a[0]])]
M=max(d)
dd=[M-x for x in d]
if n==1 or (all(x%n==0 for x in dd) and sum(x//n for x in dd)==M and sum(a)//M==n*(n+1)//2):
	print("YES")
else:
	print("NO")

Fixed submission:
n,*a=map(int,open(0).read().split())
d=[j-i for i,j in zip(a,a[1:]+[a[0]])]
M=max(d)
dd=[M-x for x in d]
if n==1:
	print("YES")
elif (n==2 and sum(a)%3) or any(x%n for x in dd) or sum(x//n for x in dd)!=M or sum(a)//M!=n*(n+1)//2:
	print("NO")
else:
	print("YES")

Buggy python submission (verdict: Runtime Error):
n,*a=map(int,open(0).read().split())
d=[j-i for i,j in zip(a,a[1:]+[a[0]])]
M=max(d)
dd=[M-x for x in d]
if all(x%n==0 for x in dd) and sum(x//n for x in dd)==M and sum(a)//M==n*(n+1)//2:
	print("YES")
else:
	print("NO")

Fixed submission:
n,*a=map(int,open(0).read().split())
d=[j-i for i,j in zip(a,a[1:]+[a[0]])]
M=max(d)
dd=[M-x for x in d]
if n==1:
	print("YES")
elif (n==2 and sum(a)%3) or any(x%n for x in dd) or sum(x//n for x in dd)!=M or sum(a)//M!=n*(n+1)//2:
	print("NO")
else:
	print("YES")
Buggy python submission (verdict: Runtime Error):
print("ABC"*(int(input()<1200))or"ARC")

Fixed submission:
print("ABC"*(int(input())<1200)or"ARC")
Buggy python submission (verdict: Time Limit Exceeded):
n,t,*a=map(int,open(0).read().split())
amin = [10**9+1] + [0]*n
amax = [0]*(n+1)
for i,x in enumerate(a):
	amin[i+1] = min(amin[i],x)
for i,x in enumerate(a[::-1]):
	amax[i+1] = max(amax[i],x)
d = max(i-j for i,j in zip(amax[-2::-1], amin[1:]))
dp = [[0]*(n+1) for _ in range(n+1)]
for i in range(n):
	for j in range(n):
		if a[i]-a[j]==d:
			dp[i+1][j+1] = dp[i][j] + 1
		else:
			dp[i+1][j+1] = max(dp[i+1][j],dp[i][j+1])
print(dp[-1][-1])

Fixed submission:
from itertools import*;_,a=open(0);*a,=map(int,a.split());c=[x-y for x,y in zip(a,accumulate(a,min))];print(c.count(max(c)))
Buggy python submission (verdict: Runtime Error):
import re
print("YNEOS"[1-re.match('.*C.*F',input())::2]


Fixed submission:
import re
print("YNeos"[not re.match('.*C.*F',input())::2])
Buggy python submission (verdict: Runtime Error):
from collections import Counter

from operator import mul
from functools import reduce
def cmb(n,r):
	if n < r:return 0
	if r == 0 or n-r == 0:return 1
	r = min(n-r,r)
	u = reduce(mul, range(n, n-r, -1))
	d = reduce(mul, range(1,r+1))
	return u//d

n,a,*x = map(int,open(0).read().split())
dp = [[0]*(n*max(x)+1)for _ in range(n+1)]
dp[0][0] = 1
lim1 = lim2 = 1
for k,v in Counter(x).items():
	for i in range(1,v+1):
		c = cmb(v,i)
		for j in range(lim1)[::-1]:
			for s in range(lim2)[::-1]:
				dp[j+i][s+k*i] += dp[j][s]*c
	lim1 += v
	lim2 += k*v
cnt = 0
for i in range(1,n+1):
	cnt += dp[i][i*a]
print(cnt)

Fixed submission:
n,*x=map(int,open(0).read().split())
y=[x[0]-i for i in x]
m=n*max(x)
dp=[[0]*(m*2+1) for _ in range(n+1)]
dp[0][0]=1
for i in range(1,n+1):
	for s in range(-m,m):
		dp[i][s]=dp[i-1][s]+dp[i-1][s-y[i]]
print(dp[n][0]-1)
Buggy python submission (verdict: Runtime Error):
n,a,*x=map(int,open(0).read().split());dp={0:1}
for i in x:
	for k,v in dp.items():
		dp[i+k-a]=dp.get(i+k-a,0)+v
print(dp[0]-1)

Fixed submission:
n,a,*x=map(int,open(0).read().split());dp={0:1}
for i in x:
	for k,v in set(dp.items()):
		dp[i+k-a]=dp.get(i+k-a,0)+v
print(dp[0]-1)
Buggy python submission (verdict: Runtime Error):
from scipy.optimize import*;n,a=open(0)
print(round(minimize(lambda x:sum((x-int(b))**2 for b in a.split()),0)["fun"]))

Fixed submission:
n,*A=map(int,open(0).read().split());print(min(sum((x-a)**2for a in A)for x in range(-100,101)))
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())

count=0
lis=[]


for i in range(1,N+1):
	if N/i==N//i:
		if N/i < i:
			break
		lis.append(i)

llis=[]
for x in lis:
	y = N / x
	mm=max([x,y])

	ketasuu=len(str(int(mm)))
	llis.append(ketasuu)


print(min(llis))

Fixed submission:
N=int(input())

count=0
lis=[]


for i in range(1,N+1):
	if N/i < i:
		break
	if N/i==N//i:
		lis.append(i)

llis=[]
for x in lis:
	y = N / x
	mm=max([x,y])

	ketasuu=len(str(int(mm)))
	llis.append(ketasuu)


print(min(llis))
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    S = list(input())
    T = list(input())

    letter = []
    for i in range(len(S)):
        letter.append(T[i])                                                                                                                                                     
        if S[i] == T[i]:
            continue
        else:
            if S[i] in letter:
                break
            else:
                s = S[i]
                for j in range(len(S)):
                    if S[j] == s:
                        S[j] = T[i]
                    elif S[j] == T[i]:
                        S[j] = s

    if S == T:
        print('Yes')
    else:
        print('No')

Fixed submission:
if __name__ == '__main__':
    A, B, C = list(map(int, input().split()))
    if A >= B and A >= C:
        print(10*A+B+C)
    elif B >= A and B>=C:
        print(B*10+A+C)
    else:
        print(C*10+A+B)
Buggy python submission (verdict: Runtime Error):
a, b = int(input())
if a*b % 2 == 0
    print('No')
else:
    print('Yes')

Fixed submission:
a, b = map(int, input().split(' '))
if a*b % 2 == 0:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
import numpy as np
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

N, X = map(int, input().split(' '))
city = np.array(list(map(int, input().split(' '))))

city -= X
print(gcd(*city))

Fixed submission:
import numpy as np
import math
from functools import reduce

def gcd(a, b):
    while b:
        a, b = b, a % b

    return a

def multi_gcd(*numbers):
    return reduce(gcd, numbers)

N, X = map(int, input().split(' '))
city = np.array(list(map(int, input().split(' '))))

city -= X
print(abs(multi_gcd(*city)))
Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == '__main__':
    N = int(input())
    S = input()

    res = float('inf')
    for i in range(N):
        temp = 0
        for j in range(N):
            if i > j and S[j] == 'W':
                temp += 1
            elif i < j and S[j] == 'E':
                temp += 1
        if res > temp:
            res = temp

    print(res)

Fixed submission:
if __name__ == '__main__':
    N = int(input())
    S = input()

    numE = S.count('E')
    numW = S.count('W')

    #index iの要素はiより左側にいてかつ西を向いている
    #人の人数を表す
    sumW = [0]
    for i in range(N):
        if S[i] == 'W':
            sumW.append(sumW[i] + 1)
        else:
            sumW.append(sumW[i])

    sumE = []
    for i in range(N):
        sumE.append(numE-i+sumW[i])
        if S[i] == 'E':
            sumE[i] -= 1
    att = []
    for i in range(N):
        att.append(sumW[i] + sumE[i])

    print(min(att))
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    s = input()
    K = int(input())

    subs = []
    for i in range(len(s)):                                                                                                                                                   for j in range(K):
            try:
                subs.append(s[i:i+j+1])
            except:
                break
    subs = set(subs)
    print(sorted(list(subs))[K-1])

Fixed submission:
if __name__ == '__main__':
    s = input()
    K = int(input())

    subs = []
    for i in range(len(s)):
      for j in range(K):
            try:
                subs.append(s[i:i+j+1])
            except:
                break
    subs = set(subs)
    print(sorted(list(subs))[K-1])

Buggy python submission (verdict: Time Limit Exceeded):
if __name__ == '__main__':
    s = input()
    K = int(input())

    subs = []
    for i in range(len(s)):
        for j in range(len(s)):
            try:
                subs.append(s[i:i+j+1])
            except:
                break
    subs = set(subs)
    print(sorted(list(subs))[K-1])

Fixed submission:
if __name__ == '__main__':
    s = input()
    K = int(input())

    subs = []
    for i in range(len(s)):
      for j in range(K):
            try:
                subs.append(s[i:i+j+1])
            except:
                break
    subs = set(subs)
    print(sorted(list(subs))[K-1])
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__':
    N = int(input())
    S = set(input().split(' '))

    if len(S) == 3:
        print('Three')
    else:
        print('Four')

Fixed submission:
if __name__ =='__main__':
    N = int(input())

    print(N // 3)

Buggy python submission (verdict: Runtime Error):
import java.util.*;

public class Main {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());

        System.out.println(N / 3);
    }

}


Fixed submission:
if __name__ =='__main__':
    N = int(input())

    print(N // 3)
Buggy python submission (verdict: Runtime Error):
import numpy as np

def solve(posi):
    INF = 100000000000
    d = np.zeros((H, W))
    for i in range(H):
        for j in range(W):
            d[i][j] = INF
    que = [posi]
    d[posi[0],posi[1]] = 0

    move = np.array([[1,0], [-1,0], [0,1], [0,-1]])
    while len(que):
        p = que.pop(0)
        if np.allclose(posi, np.array([H-1,W-1])):
            break

        for dir in move:
            new_p = p + dir
            if 0 <= new_p[0] and new_p[0] < H and 0 <= new_p[1] and new_p[1] < W:
                if d[new_p[0],new_p[1]] == INF and maze[new_p[0]][new_p[1]] != '#':
                    que.append(new_p)
                    d[new_p[0],new_p[1]] = d[p[0], p[1]] + 1

    if d[H-1][W-1] == INF:
        return -1
    return d[H-1][W-1]

if __name__=='__main__':
    H, W  = map(int, input().split(' '))
    maze = []
    for i in range(H):
        maze.append(list(input()))
    counter = 0
    for i in range(H):
        for j in range(W):
            if maze[i][j] == '.':
                counter += 1

    posi = np.array([0,0])
    print(int(counter - solve(posi) - 1))

Fixed submission:
if __name__=='__main__':
    N = int(input())
    A = int(input())

    a = N//500 * 500

    if N-a <= A:
        print('Yes')
    else:
        print('No')
Buggy python submission (verdict: Runtime Error):
M = int(input())
if M == M.upper():
  print("A")
else:
  print("a")

Fixed submission:
N = input()
print('A' if N.isupper() else 'a')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a :
    print(0)

else:
    for i in range(n):
        ans *= a[i]
    print([ans,-1][ans>10**18])


Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a :
    ans = 0

else:
    for i in range(n):
        ans *= a[i]
        if ans >10**18:
            ans = -1
            break
            
print(ans)

Buggy python submission (verdict: Runtime Error):
input()
a = eval(input().replace(' ','*'))
if a <= 10**18:
    print(a)
else:
    print(-1)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a :
    ans = 0

else:
    for i in range(n):
        ans *= a[i]
        if ans >10**18:
            ans = -1
            break
            
print(ans)

Buggy python submission (verdict: Runtime Error):
input()
a = eval(input().replace(' ','*'))
print([a,-1][a>10**18])

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a :
    ans = 0

else:
    for i in range(n):
        ans *= a[i]
        if ans >10**18:
            ans = -1
            break
            
print(ans)

Buggy python submission (verdict: Runtime Error):
input()
a = eval(input().replace(' ','*'))
print([a,-1][a>=10**18])

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
if 0 in a :
    ans = 0

else:
    for i in range(n):
        ans *= a[i]
        if ans >10**18:
            ans = -1
            break
            
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
import collections 
for i in range(1,n+1):
    print(collections.Counter(a)[i])

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
import collections 
c = collections.Counter(a)
for i in range(1,n+1):
    print(c[i])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
for i in range(1,n+1):
    print(a.count(i))

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
import collections 
c = collections.Counter(a)
for i in range(1,n+1):
    print(c[i])
Buggy python submission (verdict: Time Limit Exceeded):
from math import gcd
K = int(input())
ans = 0

for i in range(K):
    for j in range(K):
        for k in range(K):
            ans += gcd(gcd(i+1,j+1),k+1)
print(ans)        

Fixed submission:
from math import gcd
K = int(input())
ans = 0

for i in range(K):
    for j in range(K):
        for k in range(K):
            ans += gcd(gcd(i+1,j+1),k+1)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k = map(int,input().split())
for i in range(k):
    a -= 1
    if a == 0 :
        b -= 1
if a > 0 :
    print(a,b)
else:
    print(0,b)

Fixed submission:
a,b,k = map(int,input().split())
if a > k:
    print(a-k,b)
elif a <= k and a+b > k:
    print(0,a+b-k)
else:
    print(0,0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = n-1
for i in range(1,n//2+1):
    if n%i == 0:
        c = i+n//i-2
        if ans > c:
            ans = c
print(ans)

Fixed submission:
n = int(input())
ans = n-1
for i in range(1,int(n**0.5)+1):
    if n%i == 0:
        ans = min(ans,i+n//i-2)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = n-1
for i in range(1,n//2+1):
    if n%i == 0:
        ans = min(ans,i+n//i-2)
print(ans)

Fixed submission:
n = int(input())
ans = n-1
for i in range(1,int(n**0.5)+1):
    if n%i == 0:
        ans = min(ans,i+n//i-2)
print(ans)
Buggy python submission (verdict: Runtime Error):
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
    
    else:
        x = 10-a%10
        ans += a + x
        t.append(x)
    
ans -= max(t)
print(ans)

Fixed submission:
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
        t.append(0)
    
    else:
        x = 10-a%10
        ans += a + x
        t.append(x)
    
ans -= max(t)
print(ans)

Buggy python submission (verdict: Runtime Error):
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
    
    else:
         x = 10-a%10
         ans += a + (x)
         t.append(x)
    
ans -= max(t)
print(ans)

Fixed submission:
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
        t.append(0)
    
    else:
        x = 10-a%10
        ans += a + x
        t.append(x)
    
ans -= max(t)
print(ans)

Buggy python submission (verdict: Runtime Error):
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
    
    else:
         x = 10-a%10
         ans += a + (x)
         t.append(x)
    
print(t)
ans -= max(t)
print(ans)

Fixed submission:
t = []
ans = 0
for i in range(5):
    a = int(input())
    if a%10 == 0:
        ans += a
        t.append(0)
    
    else:
        x = 10-a%10
        ans += a + x
        t.append(x)
    
ans -= max(t)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k = map(int,input().split())
n = b-a+1
ok = 0
print(a)
while a < b:
    ok += 1
    a += 1
    if k/2 >= n:
        print(a)
    else:
        if ok < k or ok >= n-k:
            print(a)
        
    

Fixed submission:
a,b,k = map(int,input().split())
if k >= (b-a+1)/2:
    for i in range(a,b+1):
        print(i)
        
else:
    for j in range(a,a+k):
        print(j)
    for l in range(b-k+1,b+1):
        print(l)

Buggy python submission (verdict: Time Limit Exceeded):
a,b,k = map(int,input().split())
ok = 0
for i in range(a,b+1):
    ok += 1
    if k/2 >= b-a+1:
        print(i)
    else:
        if ok < k+1 or ok > b-a+1-k:
            print(i)

Fixed submission:
a,b,k = map(int,input().split())
if k >= (b-a+1)/2:
    for i in range(a,b+1):
        print(i)
        
else:
    for j in range(a,a+k):
        print(j)
    for l in range(b-k+1,b+1):
        print(l)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())

if a*b%2 == 0 :
  print(even)
  
else :
  print(odd)

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

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

print(sum(i in i range(1,N+1) if A<=sum(map(int,str(i)))<=B))


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

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

print(sum(i in i range(1,N+1)
         if A<=sum(map(int,str(i))<=B))

Fixed submission:
a,b,c,d = map(int,input().split())
if a+b > c+d:
    print('Left')
elif a+b == c+d:
    print('Balanced')
else:
    print('Right')
Buggy python submission (verdict: Runtime Error):
N,A,B=map(int,input().split())

print(sum(i in i range(1,N+1) if A<=sum(map(int,str(i)))<=B))


Fixed submission:
N,A,B=map(int,input().split())
print(sum(i for i in range(1,N+1) if A<=sum(map(int,str(i)))<=B))

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

print(sum(i in i range(1,N+1)
         if A<=sum(map(int,str(i)))<=B))


Fixed submission:
N,A,B=map(int,input().split())
print(sum(i for i in range(1,N+1) if A<=sum(map(int,str(i)))<=B))

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

print(sum(i in i range(1,N+1)
         if A<=sum(map(int,str(i)<=B)))

Fixed submission:
N,A,B=map(int,input().split())
print(sum(i for i in range(1,N+1) if A<=sum(map(int,str(i)))<=B))
Buggy python submission (verdict: Time Limit Exceeded):
input()
A = list(map(int,input().split()))
count=0

while all(a%2==0 for a in A):
  count+=1
  
print(count)

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

while all(a%2==0 for a in A):
  A=[a/2 for a in A]
  count+=1
  
print(count)
Buggy python submission (verdict: Runtime Error):
input()
A = list(map(int,input().split()))

if A.count(5) == 2 and A.count(7) == 1 :
  print("YES")
  
else :
  print("NO")

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

if A.count(5) == 2 and A.count(7) == 1 :
  print("YES")
  
else :
  print("NO")
Buggy python submission (verdict: Runtime Error):
import re
if len(re.finall('[A-Z]', input()) == 0:
       print('a')
else:
       print('A')

Fixed submission:
n = input()
if n.isupper() == True:
  print('A')
else:
  print('a')
Buggy python submission (verdict: Runtime Error):
a,b,c,d = input().split()
if int(d) < int(a):
    print(int(d))
elif int(d) < int(a) + int(b):
    print(int(a) + (int(d) - int(a))* 0)
else:
    res = int(a) - (int(d)-(int(a)+ int(b)))
    print(res)
~                

Fixed submission:
a,b,c,d = input().split()
if int(d) < int(a):
    print(int(d))
elif int(d) < int(a) + int(b):
    print(int(a) + (int(d) - int(a))* 0)
else:
    res = int(a) - (int(d)-(int(a)+ int(b)))
    print(res)
Buggy python submission (verdict: Runtime Error):
a = input().split(" ")
b = input().split(" ").sort()
sum = 0
for i in a[1]:
    sum += i
print(sum)

Fixed submission:
a = input().split(" ")
b = input().split(" ")
c = []
for i in b:
    c.append(int(i))

c.sort()
sum = 0
for i in c[0:int(a[1])]:
    sum += int(i)
print(sum)
Buggy python submission (verdict: Runtime Error):
test = input()
for test in 6
 print(test)

Fixed submission:
test = input()
if test[2] == test[3]:
  if test[4] == test[5]:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
import math
test = input()
five_hundred = math.floor(test / 500) * 1000
five_happy = math.floor((test - five_hundred*500)/5) * 5
print(five_hundred + five_happy)

Fixed submission:
import math
numeric = int(input())
result = math.floor(numeric / 500)*1000
intermediate = numeric - math.floor(numeric / 500)*500
result = result + math.floor(intermediate / 5)*5
print(result)

Buggy python submission (verdict: Runtime Error):
import math
test = input()
five_hundred = math.floor(test / 500) * 1000
five_happy = math.floor((test - five_hundred*500)/5) * 5


Fixed submission:
import math
numeric = int(input())
result = math.floor(numeric / 500)*1000
intermediate = numeric - math.floor(numeric / 500)*500
result = result + math.floor(intermediate / 5)*5
print(result)
Buggy python submission (verdict: Runtime Error):
x = input()

if x.islower():
	an = x.upper()
else:
    an = x.lower()

 print(an)

Fixed submission:
a = input()

if a.islower():
  print('a')
else:
  print('A')
Buggy python submission (verdict: Runtime Error):
n = input()
name = ""

while(True):
  i = n % 26
  n = "abcdefghijklmnopqrstuvwxyz"[i]
  name = n + name
  
  n = (n-i) / 26
  if(n==0):
    break
    
print(name)

Fixed submission:
n = int(input())
name = ""
 
while(True):
  i = n % 26
  c = "zabcdefghijklmnopqrstuvwxyz"[i]
  name = c + name
  
  if(i==0):
    i=26
  n = int((n-i) / 26)
  if(n==0):
    break
    
print(name)
Buggy python submission (verdict: Runtime Error):
a =list( map(int, input.split()) )
a = sum(a)
if(a>=22):
  print("bust")
else:
  print("win")

Fixed submission:
a =list( map(int, input().split()) )
a = sum(a)
if(a>=22):
  print("bust")
else:
  print("win")

Buggy python submission (verdict: Runtime Error):
a =list( map(int, input.split()) )
a = sum(a)
if(a>=22):
  print("bust")
else:
  print("win")


Fixed submission:
a =list( map(int, input().split()) )
a = sum(a)
if(a>=22):
  print("bust")
else:
  print("win")
Buggy python submission (verdict: Runtime Error):
s = input()
cnt = 0
white(True):
  if(len(s)<=1):
    break

  if(s[0] != s[-1]):
    cnt+=1
  s = s[1:-1]

  
print(cnt)
    

Fixed submission:
s = input()
cnt = 0

while(True):
  if(len(s)<=1):
    break
 
  if(s[0] != s[-1]):
    cnt+=1
  s = s[1:-1]
 
  
print(cnt)
Buggy python submission (verdict: Runtime Error):
n = input()
hs = list(map(int,input().split(" ")))

step = 0
while(True):
  
  start = None
  stop = None
  
  for i,h in enumerate(hs):

    
    if(h>0 and start is None):
      start = i
    if(h==0 and start is not None and stop is None):
      stop = i
     	
  if(stop is None):
    stop =  len(hs)
    
  for i in range(start, stop):
    hs[i] -= 1
    
  step += 1
  
  if(sum(hs) == 0):
    break
    
print(step)
      
  

Fixed submission:
n = input()
hs = list(map(int,input().split(" ")))

step = 0
while(True):
  
  if(sum(hs) == 0):
    break
  
  start = None
  stop = None
  
  for i,h in enumerate(hs):

    if(h>0 and start is None):
      start = i
    if(h==0 and start is not None and stop is None):
      stop = i
     	
  if(start is not None and stop is None):
    stop = len(hs)
    
  for i in range(start, stop):
    hs[i] -= 1
    
  step += 1
  
print(step)