Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys
import math
N, H = map(int, input().split())

a = []
b = []
num_attack = 0

for _ in range(N):
	a_i, b_i = map(int, input().split())
	a.append(a_i)
	b.append(b_i)
max_a = max(a)
Strong_b = [b_i for b_i in b if b_i > max_a]

if sum(Strong_b) >= H:

	while H > 0:

		H -= max(Strong_b)
		max_index = Strong_b.index(max(Strong_b))
		Strong_b[max_index] = 0
		num_attack += 1	
		
	print(num_attack)
	sys.exit()

H -= sum(Strong_b)
num_attack = len(Strong_b) + math.ceil(H/max_a)
print(num_attack)


Fixed submission:
import sys
import math
N, H = map(int, input().split())

a = []
b = []
num_attack = 0

for _ in range(N):
	a_i, b_i = map(int, input().split())
	a.append(a_i)
	b.append(b_i)
max_a = max(a)
Strong_b = [b_i for b_i in b if b_i > max_a]

if sum(Strong_b) >= H:
	Strong_b = sorted(Strong_b, reverse = True)
	for i in range(N):
		H -= Strong_b[i]
		if H <= 0:
			print(i+1)
			sys.exit()

H -= sum(Strong_b)
num_attack = len(Strong_b) + math.ceil(H/max_a)
print(num_attack)

Buggy python submission (verdict: Time Limit Exceeded):
N, H = map(int, input().split())

a = []
b = []
num_attack = 0

for _ in range(N):
	a_i, b_i = map(int, input().split())
	a.append(a_i)
	b.append(b_i)

Strong_b = [b_i for b_i in b if b_i > max(a)]

while sum(Strong_b) < H :
	H -= max(a)
	num_attack += 1

while H > 0 :
	H -= max(Strong_b)
	max_index = Strong_b.index(max(Strong_b))
	Strong_b[max_index] = 0
	num_attack += 1			 

print(num_attack)


Fixed submission:
import sys
import math
N, H = map(int, input().split())

a = []
b = []
num_attack = 0

for _ in range(N):
	a_i, b_i = map(int, input().split())
	a.append(a_i)
	b.append(b_i)
max_a = max(a)
Strong_b = [b_i for b_i in b if b_i > max_a]

if sum(Strong_b) >= H:
	Strong_b = sorted(Strong_b, reverse = True)
	for i in range(N):
		H -= Strong_b[i]
		if H <= 0:
			print(i+1)
			sys.exit()

H -= sum(Strong_b)
num_attack = len(Strong_b) + math.ceil(H/max_a)
print(num_attack)
Buggy python submission (verdict: Runtime Error):
N = int(input())
N = str(N)

a = int(N[-3])
b = int(N[-2])
c = int(N[-1])
x = 100*a + 10*b + c
ans = 1000 - x
if ans == 1000:
    ans = 0
print(ans)

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

if len(N) == 2:
    b = int(N[-2])
    c = int(N[-1])
    x = 10*b + c
elif len(N) == 1:
    c = int(N[-1])
    x = c
else:
    a = int(N[-3])
    b = int(N[-2])
    c = int(N[-1])
    x = 100*a + 10*b + c
ans = 1000 - x
if ans == 1000:
    ans = 0
print(ans)
Buggy python submission (verdict: Runtime Error):
A, B, H, M = map(float, input().split())

m_theta = (M/60.0)*2*pi
h_theta = 1/12.0*(H + M/60.0) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)


Fixed submission:
import math
from math import cos,pi,sqrt,radians

A, B, H, M = map(float, input().split())

m_theta = (M/60.0)*2*pi
h_theta = 1/12.0*(H + M/60.0) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)

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

m_theta = (M/60)*2*pi
h_theta = 1/12*(H + M/60) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)


Fixed submission:
import math
from math import cos,pi,sqrt,radians

A, B, H, M = map(float, input().split())

m_theta = (M/60.0)*2*pi
h_theta = 1/12.0*(H + M/60.0) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)
Buggy python submission (verdict: Runtime Error):
from itertools import combinations_with_replacement

def main():
    N, M, Q = map(int, input().split())
    qs = [list(map(int,input().split())) for _ in range(Q)]
    seq = [i for i in range(1,M+1)]
    C = combinations_with_replacement(seq, N)
    max_score = 0

    for A in C:
        A = sorted(A)
        score = 0
        for q in qs:
            if A[q[1]-1] - A[q[0]-1] == q[2]:
                score += q[3]
        max_score = max(score, max_score)
    print(max_score)

if __name__ == '__main__':
    main()

Fixed submission:
K = int(input())
A,B = map(int,input().split())
i = 0

while True:
    if A <= K*i <=B:
        print('OK')
        break
    elif B < K*i:
        print('NG')
        break
    else:
        i += 1
Buggy python submission (verdict: Runtime Error):
f = open('C/C.txt','r')
sys.stdin = f

N = int(input())
l = []
for i in range(N):
    l.append(input())

c = collections.Counter(l)
print(len(c))

Fixed submission:
import collections
N = int(input())
l = []
for i in range(N):
    l.append(input())

c = collections.Counter(l)
print(len(c))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(i) for i in input().split()]
for j in range(1,N+1):
    print(A.count(j))

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
a = [0] * N

for i in A:
    a[i-1] += 1

for j in range(N):
    print(a[j])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(i) for i in input().split()]
for j in range(1,N+1):
    print(A.count(j))

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
a = [0] * N

for i in A:
    a[i-1] += 1

for j in range(N):
    print(a[j])

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = []
for i in map(int,input().split()):
    l.append(i)
for j in range(1,N+1):
    print(l.count(j))

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
a = [0] * N

for i in A:
    a[i-1] += 1

for j in range(N):
    print(a[j])
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

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

K = int(input())
ans = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            ans += gcd(a,b,c)
print(ans)

Fixed submission:
from math import gcd
K = int(input())
ans = 0
for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            ans += gcd(gcd(b,c),a)
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int,input().split())
2 A = list(map(int,input().split()))
3 S = sum(A)
4 cnt = 0
5 for a in A:
6 if a >= S / (4*M):
7 cnt += 1
8 if cnt >= M:
9 print("Yes")
10 else:
11 print("No")

Fixed submission:
N, M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
cnt = 0
for a in A:
  if a >= S / (4*M):
    cnt += 1
if cnt >= M:
  print("Yes")
else:
	print("No")
Buggy python submission (verdict: Time Limit Exceeded):
#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))

p1 = 1
p2 = 0


for i in range(K):
    p1 *= a[i]
    

for i in range(N-K):
    p2 = p1/a[i]*a[K+i]
    if p2 > p1:
        print("Yes")
    else:
        print("No")
    p1 = p2

Fixed submission:
#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))

for i in range(N-K):
    
    if a[i] < a[i+K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))
p = []
p1 = 1

for i in range(K):
    p1 *= a[i]
p.append(p1)
for i in range(N-K):
    pn = p[i]/a[i]*a[K+i]
    p.append(pn)


for i in range(N-K):
    if p[i+1] > p[i]:
        print("Yes")
    else:
        print("No")

Fixed submission:
#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))

for i in range(N-K):
    
    if a[i] < a[i+K]:
        print("Yes")
    else:
        print("No")

Buggy python submission (verdict: Time Limit Exceeded):
#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))
p = []


for i in range(N-K+1):
    p_tmp = 1
    for j in range(K):
        p_tmp *= a[i+j]
    
    p.append(p_tmp)
    
        
#print(p)
for i in range(N-K):
    if p[i+1] > p[i]:
        print("Yes")
    else:
        print("No")

Fixed submission:
#Problem C

N,K = map(int, input().split())
a = list(map(int,input().split()))

for i in range(N-K):
    
    if a[i] < a[i+K]:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
import bisect
X,N = map(int, input().split())


if N == 0:
    print(X)
    exit()
    
p = list(map(int,input().split()))

p.sort()
gen = list(range(-1,101))

for i in p:
    gen.remove(i)

index = bisect.bisect(gen,X)

ans = 100000
ans2 = 100000
a = [gen[index-1],gen[index],gen[index+1]]

for i in range(3):
    if ans >= abs(a[i]-X):
        ans = abs(a[i]-X)
        ans2 = a[i]
    else:
        pass
print(ans2)

        
    
    

Fixed submission:
import bisect
X,N = map(int, input().split())


if N == 0:
    print(X)
    exit()


p = list(map(int,input().split()))

p.sort()
gen = list(range(-5,120))

for i in p:
    gen.remove(i)

index = bisect.bisect(gen,X)

ans = 100000
ans2 = 100000

a = [gen[index-1],gen[index],gen[index+1]]

for i in range(3):
    check = abs(a[i]-X)
    if ans > check:
        ans = check
        ans2 = a[i]
    
print(ans2)
Buggy python submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
dis = abs(B-A)
mob = abs(V-W)


if V-W <= 0
    print("No")
else:
    if dis - T*mob <= 0:
        print("Yes")
    else:
        print("No")

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a, v=map(int, input().split())
b, w=map(int, input().split())
t=int(input())
 
dis =abs(a-b)
mob =v-w
 
if speed<=0:
    print("No")
else:
    if distance/speed <=t:
        print("Yes")
    else:
        print("No")


Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")

Buggy python submission (verdict: Runtime Error):
a, v=map(int, input().split())
b, w=map(int, input().split())
t=int(input())
 
dis =abs(a-b)
mob =v-w
 
if speed<=0:
    print("No")
else:
    if distance/speed <=T:
        print("Yes")
    else:
        print("No")

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")

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

if A+(V*T) >= B +(W*T):
    print("Yes"):
else:
    print("No")

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")

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

dis = B-A
mob = W-V

if A == B:
    print("Yes")
else:
    if dis % mob != 0:
        print("No")
    else:
        if dis + (mob*T) <= 0:
            print("Yes")
        else:
            print("No")

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")

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

dis = B-A
mob = W-V

if A == B:
    print("Yes")
else:
    if dis % mob != 0:
            print("No")
    else:
            if dis + (mob*T) <= 0:
                print("Yes")
            else:
                print("No")

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

print(a*b)

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

print(a*b)
Buggy python submission (verdict: Runtime Error):
from decimal import *
 
a = list(input().rstrip().split(" "))
 
A,B =Decimal(int(a[0])),float(a[1])
 
if A > 100:
    C = int(B*100)
    
    ans2 = (A-100)*C
    ans3 = int(ans2/100)
    ans = C + ans3
else:
    ans = int(A*B)
    
print(ans)

Fixed submission:
a, b = map(float, input().split())
a = int(a)
b = int(b * 1000)
print((a*b)//1000)

Buggy python submission (verdict: Runtime Error):
from decimal import *

a = list(input().rstrip().split(" "))

A,B =Decimal(int(a[0])),float(a[1])

if A > 10**6:
    C = int(B*100)
    ans1 = int(100*B)
    ans2 = (A-100)*C
    ans3 = ans2/100
    ans = int(ans1 + ans3)
else:
    ans = int(A*B)
    
print(ans)

Fixed submission:
a, b = map(float, input().split())
a = int(a)
b = int(b * 1000)
print((a*b)//1000)

Buggy python submission (verdict: Runtime Error):
from decimal import *

a = list(input().rstrip().split(" "))

A,B =Decimal(int(a[0])),float(a[1])

if A > 1**6:
    C = int(B*100)
    ans1 = int(100*B)
    ans2 = (A-100)*C
    ans3 = int(ans2/100)
    ans = ans1 + ans3
else:
    ans = int(A*B)
    
print(ans)

Fixed submission:
a, b = map(float, input().split())
a = int(a)
b = int(b * 1000)
print((a*b)//1000)
Buggy python submission (verdict: Time Limit Exceeded):
a, b,c,K = map(int, input().split())
ans = 0

for i in range(K):
    if a > 0:
        ans += 1
        a -= 1
        continue   
    if b > 0:
        b -= 1
        continue         
    if c > 0:
        b -= 1
        ans -= 1
        continue     


print(ans)

Fixed submission:
a, b,c,K = map(int, input().split())
ans = 0

if a >= K:
    ans = K
    
    
elif a+b >= K :
    ans = a
    

else:
    ans = a - (K-a-b)
    

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = list(map(int,input().split()))


mydict = {}
for i in range(N):
    mydict = {i:0}


for i in range(N):
    if a[i] > N:
        mydict[a[i]] += 1 
        N -= 1

for i in range(1:N):
    print(mydict[a[i]])

    

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

mydict = {}
for i in range(N):
    mydict[i] = 0


for i in range(len(a)):
    if M-a[i] <= N:
        mydict[a[i]-1] += 1 
        N -= 1
        M -= a[i]

for i in range(W):
    print(mydict[i])
Buggy python submission (verdict: Runtime Error):
coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Fixed submission:
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N+1):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Buggy python submission (verdict: Runtime Error):
oding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Fixed submission:
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N+1):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N):
    if ( i % 3 != 0):
        if (i % 5! = 0):
           sum += i
 
print(sum)

Fixed submission:
#coding: utf-8
 
N  = int(input())
sum = 0
 
for i in range(N+1):
    if ( i % 3 != 0):
        if (i % 5 != 0):
           sum += i
 
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
 
N  = int(input())
sum = 0
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
for i in range (N):
    for j in range(N):
        for k in range(N):
            sum += gcd(*[i+1, j+1, k+1])
 
print(sum)


Fixed submission:
# coding: utf-8
 
N  = int(input())
sum = 0
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
for i in range (N):
    for j in range(N):
        for k in range(N):
            sum += gcd(*[i+1, j+1, k+1])
 
print(sum)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
N  = int(input())
sum_pre = 0
sum = 1
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
 
for x in range(N):  
    for i in range (N):
        for j in range(N):
            for k in range(N):
                sum_pre += gcd(*[i, j, k])
     sum += sum_pre
 
print(sum)

Fixed submission:
# coding: utf-8
 
N  = int(input())
sum = 0
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
for i in range (N):
    for j in range(N):
        for k in range(N):
            sum += gcd(*[i+1, j+1, k+1])
 
print(sum)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
N  = int(input())
sum_pre = 0
sum = 1
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
def gcd_list(numbers):
    return reduce(math.gcd, numbers)

for x in range(N):  
    for i in range (N):
        for j in range(N):
            for k in range(N):
                sum_pre += gcd([i, j, k])
     sum += sum_pre

print(sum)


Fixed submission:
# coding: utf-8
 
N  = int(input())
sum = 0
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
for i in range (N):
    for j in range(N):
        for k in range(N):
            sum += gcd(*[i+1, j+1, k+1])
 
print(sum)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
N  = int(input())
sum = 0

import math
from functools import reduce

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

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

for i in range (N):
    for j in range(N):
        for k in range(N):
            sum += gcd([i, j, k])

print(sum)

Fixed submission:
# coding: utf-8
 
N  = int(input())
sum = 0
 
import math
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
 
for i in range (N):
    for j in range(N):
        for k in range(N):
            sum += gcd(*[i+1, j+1, k+1])
 
print(sum)
Buggy python submission (verdict: Runtime Error):
# coding: utf-8

a=list(map(int,input().split()))
#読み込み
N = a[0]
M = a[1]
b=list(map(int,input().split()))
#総得票数
Sum_vote = sum(b)
list.sort(b, reverse=True)

if b[M] < (Sum_vote / 4 * M):
    print("No")
else :
    print("Yes")

Fixed submission:
# coding: utf-8
 
a=list(map(int,input().split()))
#読み込み
N = a[0]
M = a[1]
 
b=list(map(int,input().split()))
#総得票数
Sum_vote = sum(b)
list.sort(b, reverse=True)

if b[M-1] < (Sum_vote /( 4 * M)):
    print("No")
else :
    print("Yes")
Buggy python submission (verdict: Runtime Error):
S = []
N = int(input())

for i in range(10):
    for j in range(10):
        S.append(i*j)

if N in S:
    print("Yes")
else:
    print("No)

Fixed submission:
S = []
N = int(input())
 
for i in range(10):
    for j in range(10):
        S.append(i*j)
 
if N in S:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
 
a,b=list(map(int,input().split()))
 
mouse_tot = a
mouse_cnt = 1
wa = a-1
 
while True:
    if mouse_tot == b:
        break
    elif mouse_tot < b:
        mouse_tot += wa
        mouse_cnt += 1
 
print(mouse_cnt)

Fixed submission:
# coding: utf-8
 
a,b=list(map(int,input().split()))
 
mouse_tot = 1
mouse_cnt = 0
add_mouse = a-1
 
while mouse_tot <  b:
    mouse_tot += add_mouse
    mouse_cnt += 1
 
if b==0:
    mouse_cnt = 0
 
print(mouse_cnt)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
 
a,b=list(map(int,input().split()))
 
mouse_tot = a
mouse_cnt = 1
wa = a-1
 
while True:
    if mouse_tot = b:
        break
    elif mouse_tot < b:
        mouse_tot += wa
        mouse_cnt += 1
 
print(mouse_cnt)

Fixed submission:
# coding: utf-8
 
a,b=list(map(int,input().split()))
 
mouse_tot = 1
mouse_cnt = 0
add_mouse = a-1
 
while mouse_tot <  b:
    mouse_tot += add_mouse
    mouse_cnt += 1
 
if b==0:
    mouse_cnt = 0
 
print(mouse_cnt)
Buggy python submission (verdict: Runtime Error):
N,k = map(int, input().split())
a =  list(map(int,input().split()))
b = [0, abs(a[1]-a[0])]
c = []
for i in range(2,N):
    for j in range(k):
        c[j] = b[i-j]+abs(a[i]-a[i-j]),b[i-j]+abs(a[i]-a[i-j]))
    b.append(min(c))
    

print(b[-1])

Fixed submission:
N,K=map(int,input().split())
h=list(map(int,input().split()))
cost=[0,abs(h[1]-h[0])]

for i in range(2,N):
    cand=10**10
    for j in range(K):
        if j==i:
            break
        cand=min(cand,cost[i-j-1]+abs(h[i]-h[i-j-1]))
    cost.append(cand)
print(cost[-1])
Buggy python submission (verdict: Runtime Error):
#for _ in range(int(input())):
def zeroPad(numberString, zeros, left = True):
    """Return the string with zeros added to the left or right."""
    for i in range(zeros):
        if left:
            numberString = '0' + numberString
        else:
            numberString = numberString + '0'
    return numberString
def karatsubaMultiplication(x ,y):
    """Multiply two integers using Karatsuba's algorithm."""
    #convert to strings for easy access to digits
    x = str(x)
    y = str(y)
    #base case for recursion
    if len(x) == 1 and len(y) == 1:
        return int(x) * int(y)
    if len(x) < len(y):
        x = zeroPad(x, len(y) - len(x))
    elif len(y) < len(x):
        y = zeroPad(y, len(x) - len(y))
    n = len(x)
    j = n//2
    #for odd digit integers
    if (n % 2) != 0:
        j += 1    
    BZeroPadding = n - j
    AZeroPadding = BZeroPadding * 2
    a = int(x[:j])
    b = int(x[j:])
    c = int(y[:j])
    d = int(y[j:])
    #recursively calculate
    ac = karatsubaMultiplication(a, c)
    bd = karatsubaMultiplication(b, d)
    k = karatsubaMultiplication(a + b, c + d)
    A = int(zeroPad(str(ac), AZeroPadding, False))
    B = int(zeroPad(str(k - ac - bd), BZeroPadding, False))
    return A + B + bd
n,k=map(int,input().split())
x=[int(x) for x in input().split()]
ans=[1]*n
ans[0]=x[0]
for i in range(1,k):
  ans[i]=ans[i-1]*x[i]
c=0
for i in range(k,n):
  ans[i]=karatsubaMultiplication(ans[i-1],x[i])/x[c]
  if ans[i]>ans[i-1]:
    print('Yes')
  else:print('No')
  c+=1


Fixed submission:
#for _ in range(int(input())):
n=int(input())
if n>=400 and n<=599:print(8)
elif n>=600 and n<=799:print(7)
elif n>=800 and n<=999:print(6)
elif n>=1000 and n<=1199:print(5)
elif n>=1200 and n<=1399:print(4)
elif n>=1400 and n<=1599:print(3)
elif n>=1600 and n<=1799:print(2)
elif n>=1800 and n<=1999:print(1)
Buggy python submission (verdict: Runtime Error):
n,m,k=map(int,input().split())
x=[int(x) for x in input().split()]
y=[int(x) for x in input().split()]
c=0
cost=0
f,t=0,0
x.sort()
y.sort()
for i in range(n):
    if i<n and cost<k and cost+x[i]<=k and f==0:
        cost+=x[i]
        c+=1
    else:f=1
    if i<m and  cost<k and cost+y[i]<=k and t==0:
        cost+=y[i]
        c+=1
    else:t=1
i+=1
if m>n and t==0:
    while(i<(m)):
        if cost+y[i]<=k and cost<k:
            cost+=y[i]
            c+=1
        i+=1
c1=0
cost=0
for i in range(n):
    if cost+x[i]<=k:
        cost+=x[i]
        c1+=1
c2=0
cost=0
for i in range(m):
    if cost+y[i]<=k:
        cost+=y[i]
        c2+=1
print(max(c1,c2,c))



Fixed submission:
n=int(input())
print(n+n**2+n**3)
Buggy python submission (verdict: Runtime Error):
n=int(input())
d={1:'a',2:'b',3:'c',4:'d',5:'e',6:'f',7:'g',8:'h',9:'i',10:'j',11:'k',12:'l',13:'m',14:'n',15:'o',16:'p',
17:'q',18:'r',19:'s',20:'t',21:'u',22:'v',23:'w',24:'x',25:'y',26:'z'}

x=n
s=''

while(x%26!=0):
    if x//26!=0:
            f=x%26
            x=x//26
    else:break
    s+=d[f]
f=x%26
s+=d[f]
print(s[::-1])

Fixed submission:
n=int(input())
d='abcdefghijklmnopqrstuvwxyz'
x=n
s=''
n-=1
while(n>=0):
    s+=d[n%26]
    n=n//26
    n-=1
print(s[::-1])