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

dp = [[0]*(W+1) for i in range(N+1)]

#print(dp)

for i in range(N):
    w, v = map(int,input().split())
    for j in range(W+1):
        if j - w >= 0:
            dp[i+1][j] = max(dp[i][j],dp[i][j-w]+v)
        else:
            dp[i+1][j] = dp[i][j]


print(dp[-1][-1])







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

dp = [[0]*(W+1) for i in range(N+1)]

#print(dp)

for i in range(N):
    w, v = map(int,input().split())
    for j in range(W+1):
        if j - w >= 0:
            dp[i+1][j] = max(dp[i][j],dp[i][j-w]+v)
        else:
            dp[i+1][j] = dp[i][j]


print(dp[-1][-1])
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int,input().split())

dp = [[10**12]*((10**3)*N+1) for i in range(N+1)]
dp[0][0] = 0
v_sum = 0
for i in range(N):
    w, v = map(int,input().split())
    v_sum += v
    for j in range((10**3)*N+1):
        if j > v_sum:
            break
        if j - v >= 0:
            dp[i+1][j] = min(dp[i][j],dp[i][j-v]+w)#諸悪の根源
        else:
            dp[i+1][j] =dp[i][j]

for i in range(len(dp[-1])):
    if 0 < dp[-1][i]<= M:
        ans = i
    else:
        pass

print(ans)





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

dp = [[10**12]*((10**3)*N+1) for i in range(N+1)]
dp[0][0] = 0
v_sum = 0
for i in range(N):
    w, v = map(int,input().split())
    v_sum += v
    for j in range((10**3)*N+1):
        if j > v_sum:
            break
        if j - v >= 0:
            dp[i+1][j] = min(dp[i][j],dp[i][j-v]+w)#諸悪の根源
        else:
            dp[i+1][j] =dp[i][j]

for i in range(len(dp[-1])):
    if 0 < dp[-1][i]<= M:
        ans = i
    else:
        pass

print(ans)

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

dp = [[0]*(101) for i in range(N+1)]

for i in range(N):
    w, v = map(int,input().split())
    for j in range(10000):
        if j - v >= 0:
            dp[i+1][j] = max(dp[i][j],dp[i][j-v] + w)
        else:
            dp[i+1][j] = dp[i][j]


print(dp)

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

dp = [[10**12]*((10**3)*N+1) for i in range(N+1)]
dp[0][0] = 0
v_sum = 0
for i in range(N):
    w, v = map(int,input().split())
    v_sum += v
    for j in range((10**3)*N+1):
        if j > v_sum:
            break
        if j - v >= 0:
            dp[i+1][j] = min(dp[i][j],dp[i][j-v]+w)#諸悪の根源
        else:
            dp[i+1][j] =dp[i][j]

for i in range(len(dp[-1])):
    if 0 < dp[-1][i]<= M:
        ans = i
    else:
        pass

print(ans)

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

dp = [[0]*(W+1) for i in range(N+1)]


for i in range(N):
    w, v = map(int,input().split())
    for j in range(W+1):
        if j - w >= 0:
            dp[i+1][j] = max(dp[i][j],dp[i][j-w]+v)
        else:
            dp[i+1][j] = dp[i][j]


print(dp[-1][-1])







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

dp = [[10**12]*((10**3)*N+1) for i in range(N+1)]
dp[0][0] = 0
v_sum = 0
for i in range(N):
    w, v = map(int,input().split())
    v_sum += v
    for j in range((10**3)*N+1):
        if j > v_sum:
            break
        if j - v >= 0:
            dp[i+1][j] = min(dp[i][j],dp[i][j-v]+w)#諸悪の根源
        else:
            dp[i+1][j] =dp[i][j]

for i in range(len(dp[-1])):
    if 0 < dp[-1][i]<= M:
        ans = i
    else:
        pass

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int,input()
t, a = map(int,input().split())
dic_oA = {}
dic_lA = {}
H = list(map(int,input().split()))
kome = 0
for i in H:
    T = t -i*6/1000
    kome += 1        
    if T >= a:
        dic_oA[kome] = T
    else:
        dic_lA[kome] = T
if len(dic_oA) == 0:
    print(max(dic_lA,key=dic_lA.get))
elif len(dic_lA) == 0:
    print(min(dic_oA,key=dic_oA.get))

sa_o = min(dic_oA.values())- a
sa_l = a - max(dic_lA.values())

if sa_o > sa_l:
    print(max(dic_lA,key=dic_lA.get))
else:
    print(min(dic_oA,key=dic_oA.get))





Fixed submission:
n = int,input()
t, a = map(int,input().split())
dic_oA = {}
dic_lA = {}
H = list(map(int,input().split()))
kome = 0

for i in H:
    T = t -i*6/1000
    kome += 1        
    if T >= a:
        dic_oA[kome] = T
    else:
        dic_lA[kome] = T

if len(dic_oA) == 0:
    print(max(dic_lA,key=dic_lA.get))
elif len(dic_lA) == 0:
    print(min(dic_oA,key=dic_oA.get))
else:
    sa_o = min(dic_oA.values())- a
    sa_l = a - max(dic_lA.values())
    if sa_o > sa_l:
        print(max(dic_lA,key=dic_lA.get))
    else:
        print(min(dic_oA,key=dic_oA.get))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
ans = 0
for j in B:
    OK = -1
    NG = N
    while abs(OK-NG) > 1:
        mid = (OK + NG) // 2
        print(mid)
        if A[mid] < j:
            OK = mid
        else:
            NG = mid
    A_ko = mid
        
    left_f = -1
    right_t = N+1
    while abs(left-right) > 1:
        mid = (left + right) // 2
        if C[mid] > j:
            left_f = mid
        else:
            right_t = mid
C_ko = mid 
ans += A_ko*C_ko
print(ans)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
ans = 0
for j in B:
    OK = -1
    NG = N
    while abs(OK-NG) > 1:
        mid = (OK + NG) // 2
        if A[mid] < j:
            OK = mid
        else:
            NG = mid
    A_ko = OK
    #print(OK)
        
    NG = -1
    OK = N
    while abs(NG-OK) > 1:
        mid = (NG + OK) // 2
        if C[mid] > j:
            OK = mid
        else:
            NG = mid
    
    C_ko = N - OK
    #print(C_ko)
    ans += (A_ko+1)*C_ko

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int,input()
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
count = 0
for i in A:
    for j in B:
        if j > i:
            for K in C:
                if K > j:
                    count += 1 
        else:
            pass

print(count)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
B.sort()
C.sort()
ans = 0
for j in B:
    OK = -1
    NG = N
    while abs(OK-NG) > 1:
        mid = (OK + NG) // 2
        if A[mid] < j:
            OK = mid
        else:
            NG = mid
    A_ko = OK
    #print(OK)
        
    NG = -1
    OK = N
    while abs(NG-OK) > 1:
        mid = (NG + OK) // 2
        if C[mid] > j:
            OK = mid
        else:
            NG = mid
    
    C_ko = N - OK
    #print(C_ko)
    ans += (A_ko+1)*C_ko

print(ans)
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
S_t = 1
for i in range(N):
    t = int(input())
    S_t =  S_t * t // math.gcd(S_t,t)

print(S_t)

Fixed submission:
import fractions
N = int(input())
S_t = 1
for i in range(N):
    t = int(input())
    S_t = S_t * t // fractions.gcd(S_t,t)

print(S_t)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int,input().split())
ans = 1
if abs(n-m) == 0:
    for i in range(1,n+1):
       ans *= i
    ans = 2*(ans**2)
    print(ans%(10**9+7))
    


elif abs(n-m) == 1:
    for i in range(1,min(n+1,m+1)):
        ans *= i
    ans = max(n,m)*(ans**2)
    print(ans%(10**9+7))


else:
    print(0)

Fixed submission:
n, m = map(int,input().split())
ans = 1
if abs(n-m) == 0:
    for i in range(1,n+1):
       ans *= i
       ans = ans%(10**9+7)
    ans = 2*(ans**2)
    print(ans%(10**9+7))
    


elif abs(n-m) == 1:
    for i in range(1,min(n+1,m+1)):
        ans *= i
        ans = ans%(10**9+7)
    ans = max(n,m)*(ans**2)
    print(ans%(10**9+7))


else:
    print(0)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
ans = 1
re = 0
for i in range(N-1):
    if A[i+1] > A[i]:
        dire = '<'
        break
    if A[i+1] < A[i]:
        dire = '>'
        break
    else:
        dire = '='
if dire != '=':
    for i in range(2,N,1):
        #print()
        
        if re == 0:
            if dire == '>':

                if A[i] <= A[i-1] <= A[i-2]:
                    re = 0
                    dire =  '>'

                else:
                    ans += 1
                    re = 1
                    dire = '<'
            elif dire == '<':
                if A[i-2] <= A[i-1] <= A[i]:
                    re = 0
                    dire = '<'
                else:
                    ans += 1
                    dire = '>'
                    re = 1
        else:
            re = 0

            



print(ans)


Fixed submission:
N = int(input())
A = list(map(int,input().split()))
ans = 1
re = 0

for i in range(2,N,1):
    #print(re)
    if re == 0:
        if A[i-2] >= A[i-1] >= A[i]:
            re = 0
            if A[i-1] == A[i]:
                A[i-1] = A[i-2]
            
        elif A[i-2] <= A[i-1] <= A[i]:
            re = 0
            if A[i-1] == A[i]:
                A[i-1] = A[i-2]
            
        else:
            ans +=1
            re = 1
    else:
        re = 0



print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())

def shiki(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

anli = [0] * 10100


for x in range(1,150):
    if shiki(x,1,1) > N:
        break

    for y in range(1, x+1):
        if shiki(x,y,1) > N:
            break

        for z in range(1, y+1):
            if x == y and y == z:
                anli[shiki(x,y,z)] += 1
            elif x==y or y==z or z==x:
                anli[shiki(x,y,z)] += 3
            else:
                anli[shiki(x,y,z)] += 6
            if shiki(x,y,z) > N:
                break

for i in range(1,N+1):
    print(anli[i])


Fixed submission:
N = int(input())

def shiki(x,y,z):
    return x**2 + y**2 + z**2 + x*y + y*z + z*x

anli = [0] * 10100


for x in range(1,150):
    if shiki(x,1,1) > N:
        break

    for y in range(1, x+1):
        if shiki(x,y,1) > N:
            break

        for z in range(1, y+1):
            
            if shiki(x,y,z) > N:
                break
            if x == y and y == z:
                anli[shiki(x,y,z)] += 1
            elif x==y or y==z or z==x:
                anli[shiki(x,y,z)] += 3
            else:
                anli[shiki(x,y,z)] += 6

for i in range(1,N+1):
    print(anli[i])
Buggy python submission (verdict: Time Limit Exceeded):
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ruiA = [0]
ruiB = [0]
for i in range(N):
    ruiA.append(ruiA[-1] + A[i])
for i in range(M):
    ruiB.append(ruiB[-1] + B[i])

MAX = 0
i = 0

for j in range(M, -1, -1):
    if ruiA[i] + ruiB[j] <= K:
        MAX = max(MAX, i+j)
        best = j
        break
    

for i in range(1, N+1):
    for j in range(best, -1, -1):
        if ruiA[i] + ruiB[j] <= K:
            MAX = max(MAX, i+j)
            break


print(MAX)


Fixed submission:
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ruiA = [0]
ruiB = [0]
for i in range(N):
    ruiA.append(ruiA[-1] + A[i])
for i in range(M):
    ruiB.append(ruiB[-1] + B[i])

MAX = 0
j = M

for i in range(N+1):
    if ruiA[i] > K:
        break
    while ruiA[i] + ruiB[j] > K:
        j -= 1
    MAX = max(MAX, i+j)

print(MAX)

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

ruiA = [0]
ruiB = [0]
for i in range(N):
    ruiA.append(ruiA[-1] + A[i])
for i in range(M):
    ruiB.append(ruiB[-1] + B[i])

MAX = 0
i = 0
for j in range(M, -1, -1):
    if ruiA[i] + ruiB[j] <= K:
        MAX = max(MAX, i+j)
        best = j
    break
    
for i in range(1, N+1):
    for j in range(best, -1, -1):
        if ruiA[i] + ruiB[j] <= K:
            MAX = max(MAX, i+j)
        break


print(MAX)


Fixed submission:
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ruiA = [0]
ruiB = [0]
for i in range(N):
    ruiA.append(ruiA[-1] + A[i])
for i in range(M):
    ruiB.append(ruiB[-1] + B[i])

MAX = 0
j = M

for i in range(N+1):
    if ruiA[i] > K:
        break
    while ruiA[i] + ruiB[j] > K:
        j -= 1
    MAX = max(MAX, i+j)

print(MAX)

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

ruiA = [0]
ruiB = [0]
for i in range(N):
    ruiA.append(ruiA[-1] + A[i])
for i in range(M):
    ruiB.append(ruiB[-1] + B[i])

MAX = 0
for i in range(N+1):
    for j in range(M+1):
        if ruiA[i] + ruiB[j] <= K and i + j > MAX:
            MAX = i + j

print(MAX)


Fixed submission:
N, M, K = list(map(int, input().split()))
A = list(map(int, input().split()))
B = list(map(int, input().split()))

ruiA = [0]
ruiB = [0]
for i in range(N):
    ruiA.append(ruiA[-1] + A[i])
for i in range(M):
    ruiB.append(ruiB[-1] + B[i])

MAX = 0
j = M

for i in range(N+1):
    if ruiA[i] > K:
        break
    while ruiA[i] + ruiB[j] > K:
        j -= 1
    MAX = max(MAX, i+j)

print(MAX)
Buggy python submission (verdict: Time Limit Exceeded):

S = list(input())
Q = int(input())
l = []
for i in range(Q):
  l.append(list(input().split()))
    
flag = 1 #1ならふつう, -1なら逆


for i in range(Q):
    if l[i][0] == "1":
        flag *= -1
    elif flag == 1:
        if l[i][1] == "1":
            S = list(l[i][2]) + S
            
        else:
            S = S + list(l[i][2])
            
    else:
        if l[i][1] == "2":
            S = list(l[i][2]) + S
            
        else:
            S = S + list(l[i][2])
            
if flag == 1:
    print("".join(S))
else:
    S.reverse()
    print("".join(S))

Fixed submission:
from collections import deque

S = deque(list(input()))
Q = int(input())
l = []
for i in range(Q):
  l.append(list(input().split()))
    
flag = 1 #1ならふつう, -1なら逆


for i in range(Q):
    if l[i][0] == "1":
        flag *= -1
    elif flag == 1:
        if l[i][1] == "1":
            S.appendleft(l[i][2])
            
        else:
            S.append(l[i][2])
            
    else:
        if l[i][1] == "2":
            S.appendleft(l[i][2])
            
        else:
            S.append(l[i][2])


if flag == 1:
    print("".join(S))
else:
    S.reverse()
    print("".join(S))

Buggy python submission (verdict: Time Limit Exceeded):

S = list(input())
Q = int(input())
l = []
for i in range(Q):
  l.append(list(input().split()))
    
for i in range(Q):
    if l[i][0] == "1":
        S.reverse()
    else:
        if l[i][1] == "1":
            S = list(l[i][2]) + S
            
        else:
            S = S + list(l[i][2])
            
print("".join(S))

Fixed submission:
from collections import deque

S = deque(list(input()))
Q = int(input())
l = []
for i in range(Q):
  l.append(list(input().split()))
    
flag = 1 #1ならふつう, -1なら逆


for i in range(Q):
    if l[i][0] == "1":
        flag *= -1
    elif flag == 1:
        if l[i][1] == "1":
            S.appendleft(l[i][2])
            
        else:
            S.append(l[i][2])
            
    else:
        if l[i][1] == "2":
            S.appendleft(l[i][2])
            
        else:
            S.append(l[i][2])


if flag == 1:
    print("".join(S))
else:
    S.reverse()
    print("".join(S))
Buggy python submission (verdict: Runtime Error):
a, b, c = list(map(int, input().split()))

hoge = {a, b, c}

if len(hoge) == 2:
  print(Yes)
else:
  print(No)

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

hoge = {a, b, c}

if len(hoge) == 2:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = [input() for x in range(N)]
S.sort()

T = [[S[0]]]
for i in S[1:N]:
  if i == T[-1][-1]:
    T[-1].append(i)
  else:
    T.append([i])
T.sort(key=lambda x: len(x))
U = []

U.append(T[-1][0])
c = -2
while len(T[-1]) == len(T[c]):
  U.append(T[c][0])
  c -= 1
  
U.sort()
for x in U:
  print(x)


Fixed submission:
N = int(input())
S = [input() for x in range(N)]
S.sort()

T = [[S[0]]]
for i in S[1:N]:
  if i == T[-1][-1]:
    T[-1].append(i)
  else:
    T.append([i])
T.sort(key=lambda x: len(x))
U = []

for i in T[::-1]:
  if len(i) == len(T[-1]):
    U.append(i[0])
  else:
    break

U.sort()
for x in U:
  print(x)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = list(map(int, input().split()))
p = list(map(int, input().split()))

def kitai(n):
    return (1+n) /2

temp = 0

for i in range(N-K+1):
    add = 0
    for j in range(K):
        add += kitai(p[i+j])
    if temp < add:
        temp = add
        
        
print(temp)

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

def kitai(n):
    return (1+n) /2

temp = 0
S = [0]

for i in range(N):
    S.append(S[-1] + kitai(p[i]))
    
    
temp = 0

for i in range(N-K+1):      
    add = S[i+K] - S[i]
    if add > temp:
        temp = add
    
print(temp)
Buggy python submission (verdict: Runtime Error):
S, T = list(input().split())

count = 0

for i in range(3):
  if S[i] == T[i]:
    count += 1
    
print(count)

Fixed submission:
S = input()
T = input()

count = 0

for i in range(3):
  if S[i] == T[i]:
    count += 1
    
print(count)

Buggy python submission (verdict: Runtime Error):
S, T = list(input().split())

count = 0

for i in range(3):
  if S[i] == T[i]: count += 1
    
print(count)

Fixed submission:
S = input()
T = input()

count = 0

for i in range(3):
  if S[i] == T[i]:
    count += 1
    
print(count)
Buggy python submission (verdict: Runtime Error):
A, B = list(map(int, input().split()))

while 1:
  if (A-1)*i + 1 >= B:
    print(i)
    quit()

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

i = -1
while 1:
  i += 1
  if (A-1)*i + 1 >= B:
    print(i)
    quit()
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

bun = 0
for i in range(N):
  bun += 1/A[i]
  
ans = 1/ans
print(ans)

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

bun = 0
for i in range(N):
  bun += 1/A[i]
  
ans = 1/bun
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(input()) for x in range(N)]
As = sorted(A)

for i in range(N):
    As.remove(A[i])
    print(As[-1])
    As.insert(i, A[i])
    


Fixed submission:
N = int(input())
A = [int(input()) for x in range(N)]
As = sorted(A)

for i in range(N):
    if As[-1] > A[i]:
        print(As[-1])
        
    elif As[-1] == A[i]:
        print(As[-2])
Buggy python submission (verdict: Runtime Error):
S = int(input())
flag = 0

for i in range(3):
  if S[i] == S[i+1]:
    flag = 1
    
if flag:
  print("Bad")
  
else:
  print("Good")

Fixed submission:
S = list(input())
flag = 0

for i in range(3):
  if S[i] == S[i+1]:
    flag = 1
    
if flag:
  print("Bad")
  
else:
  print("Good")
Buggy python submission (verdict: Runtime Error):
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

za = 0


for count in range(N):
  za += l[count]
  if za > X:
    break

print(count+1)

Fixed submission:
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

za = 0


for count in range(N):
  za += L[count]
  if za > X:
    break

else:
  count += 1
  
print(count+1)

Buggy python submission (verdict: Runtime Error):
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

za = 0
count = 1

while za <= X:
  count += 1
  za += L[count-2]
  
print(count-1)

Fixed submission:
N, X = list(map(int, input().split()))
L = list(map(int, input().split()))

za = 0


for count in range(N):
  za += L[count]
  if za > X:
    break

else:
  count += 1
  
print(count+1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = []
for x in range(N):
  s, p = input().split()
  A.sppend([s, -int(p), x+1])
  
A.sort()

for i in range(N):
  print(A[i][2])
  


Fixed submission:
N = int(input())
A = []
for x in range(N):
  s, p = input().split()
  A.append([s, -int(p), x+1])
  
A.sort()

for i in range(N):
  print(A[i][2])
Buggy python submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

if low == None: low = [0]

ans = sum(top) + min(low) - 10
print(ans)


Fixed submission:
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

if low == []: low = [10]
ans = sum(top) + min(low) - 10
print(ans)

Buggy python submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

ans = sum(top) + min(low) - 10
print(ans)


Fixed submission:
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

if low == []: low = [10]
ans = sum(top) + min(low) - 10
print(ans)

Buggy python submission (verdict: Runtime Error):
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

ans = sum(top) + min(low)
print(ans)


Fixed submission:
import math

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def roof(n):
    return math.ceil(n/10) * 10

def mod(n):
    return n % 10

low = map(mod, [A,B,C,D,E])
top = map(roof, [A,B,C,D,E])

low = [i for i in low if i != 0]

if low == []: low = [10]
ans = sum(top) + min(low) - 10
print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())

if N = 25:
    ans = 'Christmas'

elif N = 24:
    ans = 'Christmas Eve'

elif N = 23:
    ans = 'Christmas Eve Eve'

else:
    ans = 'Christmas Eve Eve Eve'

print(ans)

Fixed submission:
N = int(input())

if N == 25:
    ans = 'Christmas'

elif N == 24:
    ans = 'Christmas Eve'

elif N == 23:
    ans = 'Christmas Eve Eve'

else:
    ans = 'Christmas Eve Eve Eve'

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

print(A + B // 2)


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

print(X + Y // 2)
Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
a = []
for i in range(N):
    a.append(list(map(int, input().split())))

b = []

for i in range(N):
    if a[i][1] <= T:
        b.append(a[i][0])

print(min(b))


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

b = []
count = 0
for i in range(N):
    if a[i][1] <= T:
        b.append(a[i][0])
        count += 1
if count == 0:
    print('TLE')

else:
    print(min(b))