Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
AA = sorted([ a - i - 1 for i,a in enumerate(A) ])
C = []
for i,a in enumerate(AA):
    if i == 0:
        C.append(a)
    else:
        C.append(C[-1] + a)
ans = ""
#print(C)
for b in AA:
    sample = 0
    num = 0
    for i,a in enumerate(AA):
        if b <= a:
            num = i -1 
            break
        else:
            num = i
    if num == -1:
        sample = C[-1]  - b * (N - 2 * (num + 1))
    else:
        sample = C[-1] - 2 * C[num] - b * (N - 2 * (num + 1))
    if ans == "":
        ans = sample
    if ans > sample:
        ans = sample
if ans == "":
    ans = 0
print(ans)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
AA = sorted([ a - i - 1 for i,a in enumerate(A) ])
C = []
for i,a in enumerate(AA):
    if i == 0:
        C.append(a)
    else:
        C.append(C[-1] + a)
ans = ""
#print(C)
for i,b in enumerate(AA):
    sample = 0
    num = i-1
    if num == -1:
        sample = C[-1]  - b * (N - 2 * (num + 1))
    else:
        sample = C[-1] - 2 * C[num] - b * (N - 2 * (num + 1))
    if ans == "":
        ans = sample
    if ans > sample:
        ans = sample
if ans == "":
    ans = 0
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
AA = sorted([ a - i - 1 for i,a in enumerate(A) ])
C = []
for i,a in enumerate(AA):
    if i == 0:
        C.append(a)
    else:
        C.append(C[-1] + a)
ans = ""
#print(C)
for b in range(AA[0],AA[-1]):
    sample = 0
    num = 0
    for i,a in enumerate(AA):
        if b <= a:
            num = i -1 
            break
        else:
            num = i
    if num == -1:
        sample = C[-1]  - b * (N - 2 * (num + 1))
    else:
        sample = C[-1] - 2 * C[num] - b * (N - 2 * (num + 1))
    if ans == "":
        ans = sample
    if ans > sample:
        ans = sample
if ans == "":
    ans = 0
print(ans)


Fixed submission:
N = int(input())
A = list(map(int,input().split()))
AA = sorted([ a - i - 1 for i,a in enumerate(A) ])
C = []
for i,a in enumerate(AA):
    if i == 0:
        C.append(a)
    else:
        C.append(C[-1] + a)
ans = ""
#print(C)
for i,b in enumerate(AA):
    sample = 0
    num = i-1
    if num == -1:
        sample = C[-1]  - b * (N - 2 * (num + 1))
    else:
        sample = C[-1] - 2 * C[num] - b * (N - 2 * (num + 1))
    if ans == "":
        ans = sample
    if ans > sample:
        ans = sample
if ans == "":
    ans = 0
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
#N = 5
#A = list(map(int,"3 2 4 1 2".split()))
AA = [0  for x in range(N)]
for i,a in enumerate(A):
    AA[i] = sum(A[:i]) + a
ans = 99999999999999999
ed = 2
st = 0
_bc = AA[-1]
_de = AA[-1]
for i in range(1,N-2):
    for j in range(st,i):
        B = AA[j]
        C = AA[i] - AA[j]
        if abs(B -C) <= _bc:
            _bc = abs(B -C)
        else:
            st = j -1
            _bc = abs(2 * AA[j-1] - AA[i+1])
            B = AA[j-1]
            C = AA[i] - AA[j-1]
            break
    for k in range(ed,N-1):
        D = AA[k] - AA[i]
        E = AA[-1] - AA[k]
        if _de >= abs(D-E):
            _de = abs(D-E)
        else:
            ed = k 
            _de = abs(2 * AA[k-1] - AA[i+1] -AA[-1])
            D = AA[k-1] - AA[i]
            E = AA[-1] - AA[k-1]
            break
    sample = max([abs(B-C),abs(B-D),abs(B-E),abs(C-D),abs(C-E),abs(D-E)])
    if ans > sample:
        ans = sample
        #print(ans)
print(ans)


Fixed submission:
from bisect import bisect
N = int(input())
A = list(map(int,input().split()))
#N = 10
#A = list(map(int,"10 71 84 33 6 47 23 25 52 64".split()))
AA = [0  for x in range(N)]
for i,a in enumerate(A):
    AA[i] = AA[i-1] + a
ans = 99999999999999999
ed = 2
st = 0
_bc = AA[-1]
_de = AA[-1]

for i in range(1, N-1):
    med = AA[i] / 2
    j = bisect(AA, med)
    if abs(AA[j-1] - med) < abs(AA[j] - med):
        j = j-1
    rmed = (AA[-1] + AA[i]) / 2
    k = bisect(AA, rmed)
    if abs(AA[k-1] - rmed) < abs(AA[k] - rmed):
        k = k-1
    m = min(AA[j], AA[i] - AA[j], AA[k] - AA[i], AA[-1] - AA[k])
    M = max(AA[j], AA[i] - AA[j], AA[k] - AA[i], AA[-1] - AA[k])
    ans = min(ans, M - m)
print(ans)
Buggy python submission (verdict: Runtime Error):
A,M = list(map(int,input().split()))
x = [0 in range(A)]
y = [0 in range(A)]
z = [0 in range(A)]
w = [0 in range(A)]
ans = 0
for i in range(A):
    x[i],y[i],z[i] = list(map(int,input().split()))
for a in [1,-1]:
    for b in [1,-1]:
        for c in [1,-1]:
            tx = [ a * i for i in range(x)]
            ty = [b * i for i in range(y)]
            tz = [ c * i for i in range(z)]
            for i in range(A):
                w[i] = tx[i] + ty[i] + tz[i]
            tw = sum(sorted(w)[::-1][:M])
            if tw > ans:
                ans = tw
print(ans)


Fixed submission:
A,M = list(map(int,input().split()))
ans = 0
x = []
y = []
z = []
w = [0 for i in range(A)]
for i in range(A):
    a,b,c = list(map(int,input().split()))
    x.append(a)
    y.append(b)
    z.append(c)
for aa in [1,-1]:
    for bb in [1,-1]:
        for cc in [1,-1]:
            #print(a)
            #print(x)
            tx = [ aa * j for j in x]
            ty = [ bb * j for j in y]
            tz = [ cc * j for j in z]
            for j in range(A):
                w[j] = tx[j] + ty[j] + tz[j]
            tw = sum(sorted(w)[::-1][:M])
            if tw > ans:
                ans = tw
print(ans)
Buggy python submission (verdict: Runtime Error):
N,C = list(map(int,input().split()))
D = [ list(map(int,input().split()))  for i in range(C)]
c = [ list(map(int,input().split()))  for i in range(N)]

sep = {0:[0 for i in range(C)],1:[0 for i in range(C)],2:[0 for i in range(C)]}
for i,cx in enumerate(c):
    for j,cy in enumerate(cx):
        if len(c) == 2 and (i + j) % 3 == 2:
            sep[(i + j) % 3 - 1][cy -1] += 1
        else:
            sep[(i + j) % 3][cy - 1] += 1
minimums = [[],[],[]]
for key,values in sep.items():
    for i in range(C):
        m0 = 0
        am0 = 0
        m1 = 0
        am1 = 1
        deposit = 0
        for j,value in enumerate(values):
            deposit += D[j][i] * valuea
        sep[key].append(deposit)
min0 = min(sep[0])
min1 = min(sep[1])
min2 = min(sep[2])

print(min1 + min2 + min0)


Fixed submission:
N = int(input())            
if N > 999:                 
    print("ABD")            
else:                       
    print("ABC")

Buggy python submission (verdict: Runtime Error):
N = int(input())            
if N > 999:                 
    print("ABD")            
else:                       
    pritn("ABC")            


Fixed submission:
N = int(input())            
if N > 999:                 
    print("ABD")            
else:                       
    print("ABC")
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
ma = max(A)
xma = 1
for i in range(20):
    xma = xma  * 2
    if xma >= ma:
        break
ans = 0
a = 0
max_flag = False
for l in range(N):
    a = A[l]
    x = A[l]
    if max_flag:
       ma = max(A[l:N])
       xma = 1
       for i in range(20):
           xma = xma  * 2
           if xma >= ma:
               break
    if ma == A[l]:
        max_flag =True
    for j in range(l+1,N):
        a += A[j]
        x = x ^ A[j]
        if a == x:
            ans += 1
        elif a >= xma:
            break
print(ans + N)


Fixed submission:
N = int(input())
S = input()
a = [0 for i in range(N)]
for i in S[1:]:
    if i == "E":
        a[0] += 1
for i,s in enumerate(S[:-1]):
    if S[i] == "E" and S[i+1] == "E":
        a[i+1] = a[i] - 1
    if S[i] == "E" and S[i+1] == "W":
        a[i+1] = a[i]
    if S[i] == "W" and S[i+1] == "E":
        a[i+1] = a[i]
    if S[i] == "W" and S[i+1] == "W":
        a[i+1] = a[i] + 1

print(min(a))
Buggy python submission (verdict: Runtime Error):
N = int(input())
dic = {}
nums = []
for i in range(N):
    num = int(input())
    dic[num] = i+1
    nums.append(num)
ans = 0
for i in range(N):
    if nums[i] <= nums[-1]:
        break
#ans += i
base = nums[i]
print(base)
init_num = base
# baseの位置 > base+1の所できる.
move = 0
while base <= nums[-1]:
    old_i = i
    i = dic[base + 1]
    if old_i > i:
        break
    base += 1
    move += 1
#import IPython;IPython.embed()
#if base != nums[-1]:
#    ans += 1
ans += init_num - 1
ans += N - base
#ans += N - nums[-1]
print(ans)


"""
戦略的には
1. a_0 > a_nの時,どちらかをずらす.
a_nを前に持っていくか,a_0を後ろに持っていくか...
どっちでも変わらない.
"""

Fixed submission:
N = int(input())
dic = {}
nums = []
for i in range(N):
    num = int(input())
    dic[num] = i+1
    nums.append(num)
ans = 0
l = 0
for i in range(N-1):
    if dic[i+2] < dic[i+1]:
        ans = max(ans, l)
        l = 0
    else:
        l += 1
ans = max(ans, l)
print(N-ans-1)

Buggy python submission (verdict: Runtime Error):
import numpy as np
n = int(input())
p = [ int(input()) for i in range(n)]
pmin = -1
pmax = n
for i,j in enumerate(p):
    if i + 1 == j:
        continue
    else:
        pmin = i
        break
for i,j in enumerate(p[::-1]):
    if n - i  == j:
        continue
    else:
        pmax = n - i -1
        break


nppma  = np.array(p[:pmax + 1 ],dtype="int32")
nppmi = np.array(p[pmin  :],dtype="int32")
#print(nppmi)
#print(nppma)
nmax = nppma.argmax()
nmin = nppmi.argmin()
#print(nppmi[:nmin])
#print(nppma[nmax +1:])
ansmin =  n  + 1 - np.min(nppmi[:nmin])
ansmax = np.max(nppma[nmax + 1:])
print(min(ansmin,ansmax))


Fixed submission:
N = int(input())
dic = {}
nums = []
for i in range(N):
    num = int(input())
    dic[num] = i+1
    nums.append(num)
ans = 0
l = 0
for i in range(N-1):
    if dic[i+2] < dic[i+1]:
        ans = max(ans, l)
        l = 0
    else:
        l += 1
ans = max(ans, l)
print(N-ans-1)
Buggy python submission (verdict: Runtime Error):
 a,b = list(map(int,input().split()))     
 if a > b:                                
     print(a - 1)                         
 else:                                    
     print(a)c:w                          


Fixed submission:
a,b = list(map(int,input().split())) 
if a > b:                            
    print(a - 1)                     
else:                                
    print(a)
Buggy python submission (verdict: Runtime Error):
inp = input()
inp_len = len(inp)
chars = map(ord,list(inp))
dic = {}
an = ""
if inp == "zyxwvutsrqponmlkjihgfedcba":
    print(-1)
    exit()
if inp_len == 26:
    for i in range(25):
        if ord(inp[-1 - i]) > ord(inp[-2 - i]):
            an = inp[:-2-i]
            ls = inp[-2-i]
            q=[k for k in list(inp)[ls:] if k>inp[ls]]
            for char in map(ord,list(inp[-1-i:])):
                dic[char] = "exist"
            break
    for j in range(26):
        if  97 + j in dic and 97+ j  >  ord(ls):
            an =  an + chr(97+j)
            break
else:
    for char in chars:
        dic[char] = "exist"
    for i in range(26):
        if not (97 + i) in dic:
            an =  inp + chr(97+i)
            break
print(an)

Fixed submission:
import sys
 
 
alph="abcdefghijklmnopqrstuvwxyz"
allis=list(alph)
S=input()
if(S=="zyxwvutsrqponmlkjihgfedcba"):
    print(-1)
    sys.exit()
 
for i in alph:
    if(i not in S):
        print(S+i)
        sys.exit()
        
l=-1
for i in range(len(S)-1)[::-1]:
    if(ord(S[i])<ord(S[i+1])):
        l=i
        break
        
x=sorted(S[i+1:])
for i in x:
    if(i>S[l]):
        print(S[:l]+i)
        sys.exit()
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N < 5002:
    if N % 2  == 0:
        sans = [6 * i  + 3 for i in range(N-2)]
        ans = sans + [2,4]
    if N % 2 == 1:
        sans = [6 * i  + 3 for i in range(N-3)]
        ans = sans + [2,4,6]
    if N == 3:
        ans = [2,3,25]
else:
    sans = [6 * i  + 3 for i in range(5000)]
    nis = [2 * i + 2 for i in range(N - 5000 )]
    else:
        if (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 1:
            nis[-1] += 2
        elif    (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 2:
            nis[-1] += 2
            nis[-2] += 2
    ans = sans + nis
ans = map(str,ans)
print(" ".join(ans))  

Fixed submission:
N = int(input())
if N < 5002:
    if N % 2  == 0:
        sans = [6 * i  + 3 for i in range(N-2)]
        ans = sans + [2,4]
    if N % 2 == 1:
        sans = [6 * i  + 3 for i in range(N-3)]
        ans = sans + [2,4,6]
    if N == 3:
        ans = [2,3,25]
else:
    sans = [6 * i  + 3 for i in range(5000)]
    nis = [2 * i + 2 for i in range(N - 5000 )]
    if (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 1:
        nis[-1] += 2
    elif    (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 2:
        nis[-1] += 2
        nis[-2] += 2
    ans = sans + nis
ans = map(str,ans)
print(" ".join(ans))

Buggy python submission (verdict: Runtime Error):
N = int(input())
if N < 5002:
    if N % 2  == 0:
        sans = [6 * i  + 3 for i in range(N-2)]
        ans = sans + [2,4]
    if N % 2 == 1:
        sans = [6 * i  + 3 for i in range(N-3)]
        ans = sans + [2,4,6]
    if N == 3:
        ans = [2,3,25]
else:
    sans = [6 * i  + 3 for i in range(4999)]
    nis = [2 * i + 2 for i in range(N - 50000 )]
    if N == 20000:
        nis[-1] = 5
    else:
        if (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 1:
            nis[-1] += 2
        elif    (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 2:
            nis[-1] += 2
            nis[-2] += 2
    ans = sans + nis
print(ans)        

Fixed submission:
N = int(input())
if N < 5002:
    if N % 2  == 0:
        sans = [6 * i  + 3 for i in range(N-2)]
        ans = sans + [2,4]
    if N % 2 == 1:
        sans = [6 * i  + 3 for i in range(N-3)]
        ans = sans + [2,4,6]
    if N == 3:
        ans = [2,3,25]
else:
    sans = [6 * i  + 3 for i in range(5000)]
    nis = [2 * i + 2 for i in range(N - 5000 )]
    if (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 1:
        nis[-1] += 2
    elif    (len(nis) * (nis[0] + nis[-1]) //2) % 3 == 2:
        nis[-1] += 2
        nis[-2] += 2
    ans = sans + nis
ans = map(str,ans)
print(" ".join(ans))
Buggy python submission (verdict: Runtime Error):
N = int(input())
D,X= list(map(int,input().split()))
A = [int(input()) for i  in range(N)]
nums = [ (D-1)//a + 1 for a in A]

print(sum(nums) + X)


Fixed submission:
#a b = map(int,input().split())
a = [ int(input()) for i in range(4)]
#print(a)
print(min(a[:2]) + min(a[2:]))
Buggy python submission (verdict: Runtime Error):
N,N = list(map(int,input().split()))
if N == 1 and M == 1:
    print(1)
elif N == 1 or M == 1:
    print(max([N,M]) -2)
else:
    print( N * M + 4 - 2*(N+M))


Fixed submission:
N,M = list(map(int,input().split()))
if N == 1 and M == 1:
    print(1)
elif N == 1 or M == 1:
    print(max([N,M]) -2)
else:
    print( N * M + 4 - 2*(N+M))
Buggy python submission (verdict: Runtime Error):
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

N=int(input())
A=list(map(int, input().split()))
L = 1
for a in A:
    L = lcm(L, a)

ans = 0
for a in A:
    ans = ans + L/a

MOD = 1000000007
print(int(ans)%MOD)


Fixed submission:
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

N=int(input())
A=list(map(int, input().split()))
L = 1
for a in A:
    L = lcm(L, a)

ans = 0
for a in A:
    ans = ans + L//a

MOD = 1000000007
print(int(ans)%MOD)

Buggy python submission (verdict: Runtime Error):
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

N=int(input())
A=list(map(int, input().split()))
L = 1
for a in A:
    L = lcm(L, a)

ans = 0
for a in A:
    ans = ans + L/a

MOD = 1000000007
print(int(ans)%MOD)


Fixed submission:
#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

N=int(input())
A=list(map(int, input().split()))
L = 1
for a in A:
    L = lcm(L, a)

ans = 0
for a in A:
    ans = ans + L//a

MOD = 1000000007
print(int(ans)%MOD)
Buggy python submission (verdict: Runtime Error):
y = [int(input()) for _ in range(5)]
k = int(input())
if y[4] - y[0] > k:
	print(":(")
	exit(1)
for i in range(4):
	if y[i + 1] - y[i] > k:
		print(":(")
		exit(1)
print("Yay!")

Fixed submission:
y = [int(input()) for _ in range(5)]
k = int(input())
if y[4] - y[0] > k:
	print(":(")
	exit(0)
for i in range(4):
	if y[i + 1] - y[i] > k:
		print(":(")
		exit(0)
print("Yay!")

Buggy python submission (verdict: Runtime Error):
y = [int(input()) for _ in range(5)]
k = int(input())
for _i, i in enumerate(y):
	for _j in range(_i + 1,4):
		if _j == 5:
			break
		if y[_j] - i > k:
			print(":(")
			exit(1)
print("Yay!")


Fixed submission:
y = [int(input()) for _ in range(5)]
k = int(input())
if y[4] - y[0] > k:
	print(":(")
	exit(0)
for i in range(4):
	if y[i + 1] - y[i] > k:
		print(":(")
		exit(0)
print("Yay!")
Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=''
whileN>0:
  N-=1
  ans+=chr(ord('a')+N%26)
  N//=26
print(ans[::-1])

Fixed submission:
N=int(input())
ans=''
while N>0:
  N-=1
  ans+=chr(ord('a')+N%26)
  N//=26
print(ans[::-1])

Buggy python submission (verdict: Runtime Error):
N=int(input())
ans=''
whileN>0:
  N-=15
  ans+=chr(ord('a')+N%26)
  N//=26
print(ans[::-1])

Fixed submission:
N=int(input())
ans=''
while N>0:
  N-=1
  ans+=chr(ord('a')+N%26)
  N//=26
print(ans[::-1])
Buggy python submission (verdict: Runtime Error):
#include <bits/stdc++.h>
using namespace std;

// Loops
#define _overload3(_1, _2, _3, name, ...) name
#define _rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define _rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a) - 1; i >= int(b); --i)

#define rep(...) _overload3(__VA_ARGS__, repi, _rep, )(__VA_ARGS__)
#define rrep(...) _overload3(__VA_ARGS__, rrepi, _rrep, )(__VA_ARGS__)
#define each(xi, x) for (auto &&xi : x)
// Note: we can use rep(i,N) or rep(i,from,to)

// typedef
template <class T> using vec = vector<T>;
using ll = long long;
using vi = vec<ll>;
using vvi = vec<vi>;
using vvvi = vec<vvi>;
using pii = pair<ll, ll>;

// Constants

// Shorter repr for frequently used terms
#define pb push_back
#define mp make_pair

// Algorithms
#define all(x) (x).begin(), (x).end()
#define uniq(v) v.erase(unique(all(v)), v.end())
#define perm(c)                                                                \
  sort(all(c));                                                                \
  for (bool c##p = 1; c##p; c##p = next_permutation(all(c)))

template <class T> pair<T, size_t> max(vector<T> &x) {
  auto it = max_element(all(x));
  return mp(*it, it - x.begin());
}
template <class T> pair<T, size_t> min(vector<T> &x) {
  auto it = min_element(all(x));
  return mp(*it, it - x.begin());
}

template <class T> inline bool chmax(T &maxval, const T &newval) {
  if (maxval < newval) {
    maxval = newval;
    return 1;
  }
  return 0;
}
template <class T> inline bool chmin(T &minval, const T &newval) {
  if (minval > newval) {
    minval = newval;
    return 1;
  }
  return 0;
}

// Utilities
// Grid world utilities
int dx[4] = {0, 1, 0, -1};
int dy[4] = {1, 0, -1, 0};
#define inside(H, W, y, x) 0 <= (x) && (x) < (W) && 0 <= (y) && (y) < (H)

// Debug
#ifdef LOCAL
#include "dump.hpp"
#define debug(x) cerr << #x << ": " << x << '\n'
#else
#define dump(...)
#define debug(x)
#endif

// Yes or No
void yesno(bool ok, string yes = "Yes", string no = "No") {
  cout << (ok ? yes : no) << endl;
}

// Paste snippets here!!

//

void solve(long long X) {
  ll yen = 100;
  ll ret = 0;
  while(yen<X){
    yen += yen / 100LL;
    ret++;
  }
  cout << ret << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false); // Magic for faster cin
  cout.precision(12);
  long long X;
  std::cin >> X;
  solve(X);
  return 0;
}


Fixed submission:
X = int(input())

yen = 100
ret = 0
while yen<X:
  yen = 101*yen//100
  ret += 1
print(ret)
Buggy python submission (verdict: Runtime Error):
D = int(input())
c = [int(i) for i in input().split()]
s = []
for i in range(D):
    s.append([int(j) for j in input().split()])

for i, s_i in enumerate(s):
    print(s.index(max(s_i)))

Fixed submission:
# -*- coding: utf-8 -*-

import random

D = int(input())
c = [int(i) for i in input().split()]
s = []
for i in range(D):
    s.append([int(j) for j in input().split()])

for i in range(D):
    print(random.randint(1, 26))
Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
T, A = [int(i) for i in input().split()]

diff_min = 999999999
diff_i = 0
H = [int(i) for i in input().split()]
for i, n in enumerate(H):
    diff = math.abs(A - (T - 0.006*n))
    if diff < diff_min:
        diff = diff_min
        diff_i = i + 1

print(diff_i)


Fixed submission:
import math

N = int(input())
T, A = [int(i) for i in input().split()]

diff_min = 999999999
diff_i = 0
H = [int(i) for i in input().split()]
for i, n in enumerate(H):
    diff = math.fabs(A - (T - 0.006*n))
    if diff < diff_min:
        diff_min = diff
        diff_i = i + 1

print(diff_i)
Buggy python submission (verdict: Runtime Error):
s = input()
s.sort()
t= input()
t.sort()
t = ''.join(reversed(list(t)))

if s < t:
    print('Yes')
else:
    print('No')

Fixed submission:
s = list(input())
s.sort()
s = ''.join(s)
t= list(input())
t.sort()
t = ''.join(reversed(list(t)))

if s < t:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
min = 0
max = 0

for i in range(N):
    if 2**i <= N:
        min = i
    else:
        break

print(min)


N = int(input())
min = 0
max = 0

for i in range(N):
    if 2**i <= N:
        min = i
    else:
        break

print(min)




Fixed submission:
N = int(input())
min = 0
max = 0

for i in range(N):
    if 2**i <= N:
        min = 2**i
    else:
        break

print(min)
Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input().strip())

ans = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            ans += math.gcd(a, math.gcd(b,c))

print(ans)

Fixed submission:
import math

K = int(input().strip())

ans = 0
for a in range(1,K+1):
    tmp = 0
    for b in range(1,K+1):
        for c in range(b + 1,K+1):
            tmp += math.gcd(a, math.gcd(b,c))
    tmp *= 2
    for b in range(1, K + 1):
        tmp += math.gcd(a, b)
    ans += tmp

print(ans)