Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a%2==0 or b%2==0:
  print('Even')
else:
  print('Odd')

Fixed submission:
a,b=map(int,input().split())
if a%2==0 or b%2==0:
    print('Even')
else:
    print('Odd')

Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a%2==0 or a%2==0:
  print('Even')
else:
  print('Odd')

Fixed submission:
a,b=map(int,input().split())
if a%2==0 or b%2==0:
    print('Even')
else:
    print('Odd')
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

n = int(input())
a = list(map(int, input().split()))

ans = 0
for i, j in itertools.combinations(a,2):
    ans = (ans + i*j)%(1e9+7)


print(int(ans))

Fixed submission:
mod = 1000000007
n = int(input())
a = list(map(int, input().split()))
ans = 0
a_sum = sum(a) 
a_total = a_sum*a_sum
lat = 0
for i in a:
    lat = lat + i*i
ans = (a_total - lat) // 2
ans = ans%mod
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque
h, w = map(int, input().split())
ch,cw = map(int, input().split())
dh,dw = map(int, input().split())

#mp[h][w]
mp = [[0]*w for _ in range(h)]
for i in range(h):
    tmp = input()
    for j in range(w):
        mp[i][j] = tmp[j]

#for i in range(h):
#    print(mp[i])


#can reach with 0
q = deque()
dx1 = (-1, 0, 1, 0)
dy1 = (0,-1,0,1)
dx2 = (-2,-2,-2,-2,-2,-1,-1,-1,-1,0,0,1,1,1,1,2,2,2,2,2)
dy2 = (-2,-1,0,1,2,-2,-1,1,2,-2,2,-2,-1,1,2,-2,-1,0,1,2)
q.append((ch-1,cw-1))

q2 = deque()

mpc = [[0]*w for _ in range(h)]

mpc[ch-1][cw-1] = 1
while q:
    x, y = q.popleft()
    for i in range(4): 
        nx = x+dx1[i]
        ny = y+dy1[i]
        if nx < 0 or nx >= h:
            continue
        if ny < 0 or ny >= w:
            continue
        if mp[nx][ny] == '.' and mpc[nx][ny] != mpc[x][y]:           
            mpc[nx][ny] = mpc[x][y]
            q.appendleft((nx,ny))

    for i in range(len(dx2)):
        nx = x+dx2[i]
        ny = y+dy2[i]
        if nx < 0 or nx >= h:
            continue
        if ny < 0 or ny >= w:
            continue
        if mp[nx][ny] == '.' and mpc[nx][ny] == 0:       
            mpc[nx][ny] = mpc[x][y] + 1
            q.append((nx,ny))
    
#for i in range(h):
#    print(mpc[i])

print(mpc[dh-1][dw-1]-1)



Fixed submission:
from collections import deque
h, w = map(int, input().split())
ch,cw = map(int, input().split())
dh,dw = map(int, input().split())

#mp[h][w]
mp = [[0]*w for _ in range(h)]
for i in range(h):
    tmp = input()
    for j in range(w):
        mp[i][j] = tmp[j]

#for i in range(h):
#    print(mp[i])


#can reach with 0
q = deque()
dx1 = (-1, 0, 1, 0)
dy1 = (0,-1,0,1)
dx2 = (-2,-2,-2,-2,-2,-1,-1,-1,-1,0,0,1,1,1,1,2,2,2,2,2)
dy2 = (-2,-1,0,1,2,-2,-1,1,2,-2,2,-2,-1,1,2,-2,-1,0,1,2)
q.append((ch-1,cw-1))

q2 = deque()

mpc = [[0]*w for _ in range(h)]

mpc[ch-1][cw-1] = 1
while q:
    x, y = q.popleft()
    for i in range(4): 
        nx = x+dx1[i]
        ny = y+dy1[i]
        if nx < 0 or nx >= h:
            continue
        if ny < 0 or ny >= w:
            continue
        if mp[nx][ny] == '.' and mpc[nx][ny] != mpc[x][y]:           
            mpc[nx][ny] = mpc[x][y]
            q.appendleft((nx,ny))

    for i in range(len(dx2)):
        nx = x+dx2[i]
        ny = y+dy2[i]
        if nx < 0 or nx >= h:
            continue
        if ny < 0 or ny >= w:
            continue
        if mp[nx][ny] == '.' and mpc[nx][ny] == 0:       
            mpc[nx][ny] = mpc[x][y] + 1
            q.append((nx,ny))
    
#for i in range(h):
#    print(mpc[i])

print(mpc[dh-1][dw-1]-1)
Buggy python submission (verdict: Time Limit Exceeded):
h,w,m = map(int, input().split())
bh = []
bw = []
l_num = [0]*h
c_num = [0]*w
for i in range(m):
    i1, i2 = map(int, input().split())
    bh.append(i1)
    bw.append(i2)
    l_num[i1-1] = l_num[i1-1] + 1
    c_num[i2-1] = c_num[i2-1] + 1

#print(l_num,c_num)

l_candi = [i for i, v in enumerate(l_num) if v == max(l_num)]
c_candi = [i for i, v in enumerate(c_num) if v == max(c_num)]

#print(l_candi,c_candi)

t = 0
for k in range(m):
    if bh[k]-1 in l_candi and bw[k]-1 in c_candi:
        t = t + 1

if t < len(l_candi)*len(c_candi):
    print(max(l_num)+max(c_num))
else:
    print(max(l_num)+max(c_num)-1)

Fixed submission:
h,w,m = map(int, input().split())
bh = []
bw = []
l_num = [0]*h
c_num = [0]*w
for i in range(m):
    i1, i2 = map(int, input().split())
    bh.append(i1)
    bw.append(i2)
    l_num[i1-1] = l_num[i1-1] + 1
    c_num[i2-1] = c_num[i2-1] + 1

#print(l_num,c_num)

max_l_num = max(l_num)
max_c_num = max(c_num)
l_candi = [i for i, v in enumerate(l_num) if v == max_l_num]
c_candi = [i for i, v in enumerate(c_num) if v == max_c_num]

#print(l_candi,c_candi)

t = 0
for k in range(m):
    if l_num[bh[k]-1] == max_l_num and c_num[bw[k]-1] == max_c_num:
        t = t + 1

if t < len(l_candi)*len(c_candi):
    print(max_l_num+max_c_num)
else:
    print(max_l_num+max_c_num-1)

Buggy python submission (verdict: Time Limit Exceeded):
h,w,m = map(int, input().split())
bh = []
bw = []
l_num = [0]*h
c_num = [0]*w
for i in range(m):
    i1, i2 = map(int, input().split())
    bh.append(i1)
    bw.append(i2)
    l_num[i1-1] = l_num[i1-1] + 1
    c_num[i2-1] = c_num[i2-1] + 1

#print(l_num,c_num)

l_candi = [i for i, v in enumerate(l_num) if v == max(l_num)]
c_candi = [i for i, v in enumerate(c_num) if v == max(c_num)]

#print(l_candi,c_candi)

t = 0
for k in range(m):
    if bh[k]-1 in l_candi and bw[k]-1 in c_candi:
        t = t + 1

if t < len(l_candi)*len(c_candi):
    print(max(l_num)+max(c_num))
else:
    print(max(l_num)+max(c_num)-1)


Fixed submission:
h,w,m = map(int, input().split())
bh = []
bw = []
l_num = [0]*h
c_num = [0]*w
for i in range(m):
    i1, i2 = map(int, input().split())
    bh.append(i1)
    bw.append(i2)
    l_num[i1-1] = l_num[i1-1] + 1
    c_num[i2-1] = c_num[i2-1] + 1

#print(l_num,c_num)

max_l_num = max(l_num)
max_c_num = max(c_num)
l_candi = [i for i, v in enumerate(l_num) if v == max_l_num]
c_candi = [i for i, v in enumerate(c_num) if v == max_c_num]

#print(l_candi,c_candi)

t = 0
for k in range(m):
    if l_num[bh[k]-1] == max_l_num and c_num[bw[k]-1] == max_c_num:
        t = t + 1

if t < len(l_candi)*len(c_candi):
    print(max_l_num+max_c_num)
else:
    print(max_l_num+max_c_num-1)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())

if k % 2 ==0:
    print(-1)
else:
    ans = 1
    tempmod = 0
    while True:
        tempmod = (tempmod + 7*pow(10, ans-1, k)) % k
        if tempmod == 0:
            print(ans)
            exit()
        else:
            ans = ans + 1


Fixed submission:
k = int(input())

if k % 2 ==0 or k % 5 == 0:
    print(-1)
else:
    ans = 1
    tempmod = 0
    while True:
        tempmod = (tempmod + 7*pow(10, ans-1, k)) % k
        if tempmod == 0:
            print(ans)
            exit()
        else:
            ans = ans + 1
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(1,11):
    if n <= pow(26,i):
        d = i
        break
    n = n - pow(26,i)
d = d - 1 
n = n - 1
ans =''
for i in range(d):
    tmp = divmod(n,pow(26,d-i))
    ans = ans+ chr(97+tmp[0])
    n = tmp[1]
print(ans + chr(97+n))

Fixed submission:
n = int(input())
for i in range(1,12):
    if n <= pow(26,i):
        d = i
        break
    n = n - pow(26,i)
d = d - 1 
n = n - 1
ans =''
for i in range(d):
    tmp = divmod(n,pow(26,d-i))
    ans = ans+ chr(97+tmp[0])
    n = tmp[1]
print(ans + chr(97+n))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
allxor = 0
for i in range(n):
    allxor = allxor^a[i]
ans = ''
for i in range(n):
    ans= ans +str(allxor^a[i])+' '
print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
allxor = 0
ans = [0]*n
for i in range(n):
    allxor = allxor^a[i]
for i in range(n):
    ans[i] = allxor^a[i]
ansstr = " ".join(map(str,ans))
print(ansstr)
Buggy python submission (verdict: Time Limit Exceeded):
MOD = 10**9 + 7
N = 2 * 10**6 + 10  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod MOD)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod MOD)
inv = [0, 1]  

def nCr(n, r, mod):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % mod
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % MOD)
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
    factinv.append((factinv[-1] * inv[-1]) % MOD)

k = int(input())
s = len(input())

ans = 0
for i in range(k+1):
    ansp =  pow(26,i,MOD) * pow(25,k-i,MOD) * nCr(s+k-1-i,s-1,MOD) % MOD 
    ans = (ans + ansp) % MOD
print(ans)


Fixed submission:
MOD = 10**9 + 7
N = 2 * 10**6 + 10  # N は必要分だけ用意する
fact = [1, 1]  # fact[n] = (n! mod MOD)
factinv = [1, 1]  # factinv[n] = ((n!)^(-1) mod MOD)
inv = [0, 1]  

def nCr(n, r, mod):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n-r] % mod
 
for i in range(2, N + 1):
    fact.append((fact[-1] * i) % MOD)
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
    factinv.append((factinv[-1] * inv[-1]) % MOD)

k = int(input())
s = len(input())

ans = 0
for i in range(k+1):
    ansp =  pow(26,i,MOD) * pow(25,k-i,MOD) * nCr(s+k-1-i,s-1,MOD) % MOD 
    ans = (ans + ansp) % MOD
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

n = int(input())
a = list(map(int, input().split()))
a.sort(reverse=True)
d = deque(a)

cnt = 0
while len(d) > 0:
    dd = d.pop()
    flg = 0
    for i in reversed(range(len(d))):
        if d[i] == dd:
            del d[i]
            flg = 1
        elif d[i] % dd == 0:
            del d[i]
    if flg == 0:
        cnt = cnt + 1


print(cnt)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
a.sort()
a_max=max(a)

check = [0]*(a_max+1)

for i in a:
    if check[i] != 0:
        check[i] = 2
        continue
    if check[i] == 0:
        check[i] = 1
        for j in range(1,a_max//i):
            check[(j+1)*i] = 2

print(check.count(1))
Buggy python submission (verdict: Runtime Error):
x = input().split()
a = float(x[0])
b = float(x[1]))
ans = int(a*b)
print(ans)

Fixed submission:
from decimal import *
getcontext().prec = 18
x = input().split()

aa = Decimal(x[0])*Decimal(x[1])

print(int(aa))
Buggy python submission (verdict: Time Limit Exceeded):
n, s = map(int, input().split())
a  = list(map(int, input().split()))
MOD = 998244353

dp = [[0]*(s+1) for _ in range(n+1)]
dp[0][0] = 1

for i in range(n):
    for j in range(s+1):
        dp[i+1][j] = dp[i+1][j] + dp[i][j] * 2
        dp[i+1][j] = dp[i+1][j] % MOD
        if j + a[i] <= s:
            dp[i+1][j+a[i]] = dp[i+1][j+a[i]] + dp[i][j]
            dp[i+1][j+a[i]] = dp[i+1][j+a[i]] % MOD

print(dp[n][s])


Fixed submission:
n, s = map(int, input().split())
a  = list(map(int, input().split()))
MOD = 998244353
 
dp = [[0]*(s+1) for _ in range(n+1)]
dp[0][0] = 1
 
for i in range(n):
    for j in range(s+1):
        dp[i+1][j] = dp[i+1][j] + dp[i][j] * 2
        dp[i+1][j] = dp[i+1][j] % MOD
        if j + a[i] <= s:
            dp[i+1][j+a[i]] = dp[i+1][j+a[i]] + dp[i][j]
            dp[i+1][j+a[i]] = dp[i+1][j+a[i]] % MOD
 
print(dp[n][s])
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
V = [0]*(N+1)
flug = 0
Lsum= sum(A)

V[0] = 1
for i in range(N):
    V[i+1] = (V[i]*2 - A[i+1])
    if V[i+1] <= 0 and i != N-1 :
        flug = 1
    if V[i+1] < 0 and i == N-1 :
        flug = 1
    Lsum = Lsum - A[i+1]
    if V[i+1] > Lsum :
        V[i+1] = Lsum

ans = sum(V)+sum(A)
if A[0] != 0:
    ans = -1
if flug == 1:
   ans = -1
if N == 0:
    ans = -1

print(ans)

Fixed submission:
H1, M1, H2, M2, K = map(int,input().split())

time1 = 60*H1 + M1
time2 = 60*H2 + M2

ans = time2 - K - time1
if ans < 0:
    ans = 0

print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
V = [[] for _ in range(N+1)]

for i in range(N):
    if i == 0:
        V[0] = 1
        continue
    V[i] = (V[i-1]*2 - A[i])
V[N]=0

for i in range(N):
    j = N - i -1
    if V[j] > A[j+1] + V[j+1]:
        V[j] = A[j+1] + V[j+1]
 
ans = sum(V)+sum(A)

if A[0] != 0:
    ans = -1

if min(V[:N-1]) <= 0:
    ans = -1

print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
V = [0]*(N+1)
flug = 0
Lsum= sum(A)
 
V[0] = 1
for i in range(N):
    V[i+1] = (V[i]*2 - A[i+1])
    if V[i+1] < 0 :
        flug = 1
    Lsum = Lsum - A[i+1]
    if V[i+1] > Lsum :
        V[i+1] = Lsum
 
ans = sum(V)+sum(A)
if A[0] != 0 or A[N] == 0:
    ans = -1
if flug == 1:
   ans = -1
if N == 0 and A[0] != 1:
    ans = -1
elif N == 0 and A[0] == 1:
    ans = 1
 
print(ans)
Buggy python submission (verdict: Runtime Error):
import math
from collections import deque

N = int(input())

a = []
b = []
for i in range(N):
    i1, i2 = map(int, input().split())
    g = math.gcd(i1,i2)
    if g == 0:
        a.append(i1)
        b.append(i2)
        continue
    x = i1 // g
    y = i2 // g
    if x < 0:
        x = - x
        y = - y 
    a.append(x)
    b.append(y)

P = {}
for i in range(N):
    if b[i] < 0:
        tmp = b[i]
        b[i] = a[i]
        a[i] = - tmp
        sgn = 1
    elif a[i] == 0:
        a[i] = b[i]
        b[i] = 0
        sgn = 1
    else :
        sgn = 0

    if (a[i],b[i]) in P:
        P[(a[i],b[i])][sgn]=P[(a[i],b[i])][sgn] + 1
    elif sgn == 0 :
        P[(a[i],b[i])]=[1,0]
    else :
        P[(a[i],b[i])]=[0,1]
        

MOD = 1000000007
a1 = 1 
ans0=0
for k in P:
    if k == (0,0):
        ans0 = P[k][0]
    else:
        a1 = a1*(pow(2,P[k][0],MOD)+pow(2,P[k][1],MOD) - 1) % MOD

if ans0 != 0:
    ans = ans0 + a1 -1
else:
    ans = a1 -1
print(ans%MOD)



Fixed submission:
N = int(input()) % 10

if (N == 3):
    print('bon')
elif (N == 0 or N == 1 or N == 6 or N == 8):
    print('pon')
else :
    print('hon')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

a_p = [0]*n
a_m = [0]*n
ans = 0

for i in range(n):
    a_p[i] = a[i] + i+1
    a_m[i] = i+1 -a[i]

ans = 0
for i in range(n):
    for j in range(i+1,n):
        if a_p[i] == a_m[j]:
            ans = ans + 1

print(ans)

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

ans = 0
dp = dict()

for i in range(n):
    a_p = a[i] + i+1
    a_m = i+1 -a[i]
    if a_p in dp:
        dp[a_p] = dp[a_p] + 1
    else:
        dp[a_p] = 1
    if a_m in dp:
        ans = ans + dp[a_m]


print(ans)
Buggy python submission (verdict: Runtime Error):
a = 1000000007

n = input()

not0 = 1
not0and9 = 1
all = 1
for i in range(n):
  not0and9 = (not0and9 * 8) % a
  not0 = (not0 * 9) % a
  all = (all * 10) % a;
  
print((all + not0and9 - 2 * not9) % a) 

Fixed submission:
a = 1000000007
 
n = int(input())
 
not0 = 1
not0and9 = 1
all = 1
for i in range(n):
  not0and9 = (not0and9 * 8) % a
  not0 = (not0 * 9) % a
  all = (all * 10) % a;
  
print((all + not0and9 - 2 * not0) % a)
Buggy python submission (verdict: Runtime Error):
S = str(input())
T = str(input())
ans = 10000
for i in range(len(S)-len(T)+1):
    c = S[i:] 
    cnt = 0
    for j in range(len(T)):
        if str(T[j]) != str(c[j]):
            cnt += 1
    if cnt = 0:
        ans = 0
    elif  ans > cnt and cnt >=1:
        ans = cnt
print (ans)

Fixed submission:
D, T, S =map(int, input().split())
if T >= D/S:
    print ("Yes")
else:
    print ("No")

Buggy python submission (verdict: Runtime Error):
S = str(input())
T = str(input())
ans = 10000
for i in range(len(S)-len(T)+1):
    c = S[i:] 
    cnt = 0
    for j in range(len(T)):
        if str(T[j]) != str(c[j]):
            cnt += 1
    if cnt = 0:
        ans = 0
    if  ans > cnt and cnt >=1:
        ans = cnt
print (ans)

Fixed submission:
D, T, S =map(int, input().split())
if T >= D/S:
    print ("Yes")
else:
    print ("No")
Buggy python submission (verdict: Runtime Error):
#B-making trinagle
#while文を入れる場所がわからなかった
#import bisectってなんやねん
N = int(input())
A = list(map(int, input().split()))
A = sorted(A)
cnt = 0

def judge():
    if m == a + b:
        return "ok!"
    elif m >= a  b:
        return "high"
    else:
        return "low"

while True:
for i in range(N-2):
    a = list[i]
    for j in range(i + 1, N-1):
        b = list[j]
        if a == b:
            return True
        else:
            m = i + j
            while True:
            def judge(c)

cnt = m - j
print (cnt)

Fixed submission:
N = int(input())
A = map(int, input().split())
A = sorted(A, reverse = False)
count = 0

for i in range(N-2):
    for j in range(i+1, N-1):
        for k in range(j+1, N):
            if (A[i] != A[j] != A[k]) and (A[k] < A[i] + A[j]):
                count += 1

print (count)
Buggy python submission (verdict: Runtime Error):
N,D=input().split() 
N=int(N)
D=int(D)
count = 0

list = []
for i in range(N):
    a, b=input().split()
    list.append((int(a),int(b)))

for n in range(N):
    distance=((list[u][0]) ** 2 + (list[u][1]) ** 2)
    if distance <= D:
        count += 1

print (count)

Fixed submission:
#B-distance
N, D = map(int, input().split())
count = 0

for i in range(N):
    x, y = map(int, input().split())
    if (x*x + y*y <= D*D):
        count += 1
print (count)
Buggy python submission (verdict: Runtime Error):
a, b= map(int(input().split())
print (a*b)



Fixed submission:
a, b= map(int, input().split())
print (a*b)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
A = sorted(A, reverse = False)
cnt = 1

for i in range(N):
    if 0 in A:
        print (0)
        exit()
    else:
        cnt *= A[i]
        if cnt > 10 ** 18:
            print (-1)
            exit ()
print (cnt)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
A = sorted(A, reverse = False)
cnt = 1


if 0 in A:
    print (0)
    exit()
else:
    for i in range(N):
        cnt *= A[i]
        if cnt > 10 ** 18:
            print (-1)
            exit ()
print (cnt)
Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M =map(int, input().split())
Hs = H*30 + M*0.5
Ms = 6*M
shita = Hs-Ms
shita = abs(shita)
if  shita >= 180:
    shita = 360 - shita
shita = math.radians(shita)
C = A*A + B*B - 2*A*B*(math.cos(shita))
print (math.sqrt(C))

Fixed submission:
N = int(input())
N = N % 10
if N in (2, 4, 5, 7, 9):
    print ("hon")
elif N in (0, 1, 6, 8):
    print ("pon")
elif N == 3:
    print ("bon")

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M =map(int, input().split())
Hs = H*30 + M/2
Ms = 6*M
shita = Hs-Ms
print (shita)
shita = abs(shita)
if  shita >= 180:
    shita = shita - 180
shita = math.radians(shita)
C = A*A + B*B - 2*A*B*(math.cos(shita))
print (math.sqrt(C))

Fixed submission:
N = int(input())
N = N % 10
if N in (2, 4, 5, 7, 9):
    print ("hon")
elif N in (0, 1, 6, 8):
    print ("pon")
elif N == 3:
    print ("bon")

Buggy python submission (verdict: Runtime Error):
N = int(input())
N = N % 10
if N in (2, 4, 5, 7, 9):
    print ("hon")
elif N in (0, 1, 6, 7):
    print ("pon")
elif N in (3):
    print ("bon")


Fixed submission:
N = int(input())
N = N % 10
if N in (2, 4, 5, 7, 9):
    print ("hon")
elif N in (0, 1, 6, 8):
    print ("pon")
elif N == 3:
    print ("bon")
Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M =map(int, input().split())
Hs = H/ 12 + 6*M
Ms = H/12 + M/2
shita = Hs-Ms
shita = abs(shita)
if  shita >= 180:
    shita = 180 - shita
shita = math.radians(shita)
C = A*A + B*B - 2*A*B*math.cos(shtia)
print (C ** 0.5)

Fixed submission:
import math
A, B, H, M =map(int, input().split())
Hs = H*30 + M*0.5
Ms = 6*M
shita = Hs-Ms
shita = abs(shita)
if  shita >= 180:
    shita = 360 - shita
shita = math.radians(shita)
C = A*A + B*B - 2*A*B*(math.cos(shita))
print (math.sqrt(C))
Buggy python submission (verdict: Runtime Error):
Aij= [int(input().split()) for l in range(3)]
N=int(input())
b= [int(input()) for i in range(N)]
for j in range(3):
    for k in range(3):
        for n in range(N):
            if int(Aij[j][k])==b[n]:
                Aij[j][k]="0"


if (Aij[0][0] == Aij[0][1] == Aij[0][2] == "0") or (Aij[1][0] == Aij[1][1] == Aij[1][2] == "0") or (Aij[2][0] == Aij[2][1] == Aij[2][2] == "0"):
    print('Yes')
elif Aij[0][0]=='0' and Aij[0][1]=='0' and Aij[0][2]=='0':
    print('Yes')
elif Aij[1][0]=='0' and Aij[1][1]=='0' and Aij[1][2]=='0':
    print('Yes')
elif Aij[2][0]=='0' and Aij[2][1]=='0' and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][0]=='0'and Aij[1][1]=='0'and Aij[2][2]=='0':
    print('Yes')
elif Aij[0][2]=='0' and Aij[1][1]=='0'and Aij[2][0]=='0':
    print('Yes')
else:
    print('No')

Fixed submission:
A = [list(map(int, input().split())) for i in range(3)]
N = int(input())

for k in range(N):
    B = int(input())
    for l in range(3):
        for m in range(3):
            if A[l][m] == B:
                A[l][m] = 0

if (A[0][0] == A[0][1] == A[0][2] == 0) or (A[1][0] == A[1][1] == A[1][2] == 0) or (A[2][0] == A[2][1] == A[2][2] == 0):
    print ("Yes")
elif (A[0][0] == A[1][0] == A[2][0] == 0) or (A[0][1] == A[1][1] == A[2][1] == 0) or (A[0][2] == A[1][2] == A[2][2] == 0):
    print ("Yes")
elif (A[0][0] == A[1][1] == A[2][2] == 0) or (A[0][2] == A[1][1] == A[2][0] == 0):
    print ("Yes")
else:
    print ("No")
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())
a_arr = list(map(int, input().split()))

k_idx = K - 1
term_val_arr = []
ans_arr = []
for i in range(N - K + 1):
    val = 1
    if len(term_val_arr) == 0:
        for j in range(K):
            val *= a_arr[k_idx - j]
        term_val_arr.append(val)
    else:
        term_val_arr.append(a_arr[k_idx] * term_val_arr[i - 1] / a_arr[i-1])

    if i != 0:
        if term_val_arr[i - 1] < term_val_arr[i]:
            ans_arr.append('Yes')
        else:
            ans_arr.append('No')
    k_idx += 1
for i in ans_arr:
    print(i)

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

k_idx = K - 1
ans_arr = []
for i in range(N - K):
    if a_arr[i] < a_arr[k_idx + 1]:
        ans_arr.append('Yes')
    else:
        ans_arr.append('No')
    k_idx += 1
for i in ans_arr:
    print(i)

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

k_idx = K - 1
term_val_arr = []
ans_arr = []
for i in range(N - K + 1):
    val = 1
    for j in range(K):
        val *= a_arr[k_idx - j]
    term_val_arr.append(val)
    if i != 0:
        if term_val_arr[i - 1] < term_val_arr[i]:
            ans_arr.append('Yes')
        else:
            ans_arr.append('No')
    k_idx += 1
for i in ans_arr:
    print(i)

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

k_idx = K - 1
ans_arr = []
for i in range(N - K):
    if a_arr[i] < a_arr[k_idx + 1]:
        ans_arr.append('Yes')
    else:
        ans_arr.append('No')
    k_idx += 1
for i in ans_arr:
    print(i)

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

k_idx = K - 1
term_val_arr = []
for i in range(N - K + 1):
    val = 1
    for j in range(K):
        val *= a_arr[k_idx - j]
    term_val_arr.append(val)
    k_idx += 1

for i in range(N-K):
    if len(term_val_arr)-1 != i:
        if term_val_arr[i] < term_val_arr[i+1]:
            print('Yes')
        else:
            print('No')

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

k_idx = K - 1
ans_arr = []
for i in range(N - K):
    if a_arr[i] < a_arr[k_idx + 1]:
        ans_arr.append('Yes')
    else:
        ans_arr.append('No')
    k_idx += 1
for i in ans_arr:
    print(i)