Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
N = int(input())
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))

m = np.zeros((2, N)).astype(int)
m[0][0] = A1[0]
m[1][0] = A2[0] + A1[0] 

for i in range(1, N):
    m[0][i] = A1[i]+m[0][i-1]
    m[1][i] = max(A2[i]+m[1][i-1], A2[i]+m[0][i])
    
print(m[1][N-1])

Fixed submission:
import numpy as np

N = int(input())
A1 = list(map(int, input().split()))
A2 = list(map(int, input().split()))

m = np.zeros((2, N)).astype(int)
m[0][0] = A1[0]
m[1][0] = A2[0] + A1[0] 

for i in range(1, N):
    m[0][i] = A1[i]+m[0][i-1]
    m[1][i] = max(A2[i]+m[1][i-1], A2[i]+m[0][i])
    
print(m[1][N-1])
Buggy python submission (verdict: Runtime Error):
n = [str(i) for i in range(10)]
flag = False
for i in range(A):
    if S[i] not in n:
        flag = True
        
if S[A] != '-':
    flag = True
    
for i in range(A+1, A+B+1):
    if S[i] not in n:
        flag = True
        
if flag:
    print('No')
else:
    print('Yes')

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

n = [str(i) for i in range(10)]
flag = False
for i in range(A):
    if S[i] not in n:
        flag = True
        
if S[A] != '-':
    flag = True
    
for i in range(A+1, A+B+1):
    if S[i] not in n:
        flag = True
        
if flag:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
l = []

for _ in range(N):
    a = int(input())
    if a not in l:
        l.append(a)
    else:
        del l[l.index(a)]
        
print(len(l))

Fixed submission:
from collections import Counter

N = int(input())
a = []
for _ in range(N):
    a.append(int(input()))
    
a = Counter(a)
ans = 0
for value in a.values():
    if value % 2 == 1:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import Counter

N = int(input())
A = list(map(int, input().split()))
A = Counter(A)

p = []
l = []
for k, v in A.items():
    if v >= 4:
        p.append(k)
    if v >= 2:
        l.append(k)
if len(l) >= 2:
    p.sort()
    l.sort()
    print(max(l[-1] * l[-2], p[-1]**2))
else:
    print(0)

Fixed submission:
from collections import Counter

N = int(input())
A = list(map(int, input().split()))
A = Counter(A)

p = []
l = []
for k, v in A.items():
    if v >= 4:
        p.append(k)
    if v >= 2:
        l.append(k)

ans = 0
if len(p) >= 1:
    p.sort()
    ans = p[-1]**2
if len(l) >= 2:
    l.sort()
    ans = max(l[-1] * l[-2], ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(N):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)

Fixed submission:
N, M = map(int, input().split())
a, b = [], []
for _ in range(N):
    A, B = map(int, input().split())
    a.append(A)
    b.append(B)
    
c, d = [], []
for _ in range(M):
    C, D = map(int, input().split())
    c.append(C)
    d.append(D)
    
for A, B in zip(a, b):
    ans = 0
    mn = 10**9
    for i, (C, D) in enumerate(zip(c, d)):
        s = abs(A - C) + abs(B - D)
        if mn > s:
            ans = i
            mn = s
            
    print(ans+1)
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

M = M - 1 if M%2==1 else M
mx = 0
for i in range(M//2):
    mx = max(min(N+i, (M-2*i)//2), mx)

print(mx)

Fixed submission:
N, M = map(int, input().split())
print(min(N, M//2)+max(0, (M-2*N)//4))
Buggy python submission (verdict: Runtime Error):
import numpy as np

N = int(input())
A = np.zeros(N).astype(int)
B = np.zeros(N).astype(int)

for i in range(N):
    A[i], B[i] = map(int, input().split())

ans = 0
for i in reversed(range(N)):
  	A[i] = A[i] + ans
    if A[i] % B[i] == 0:
        continue
    elif B[i] - A[i] > 0:
        ans += B[i] - A[i]
    else:
        ans += B[i] - (A[i] % B[i])
    
print(ans)

Fixed submission:
import numpy as np

N = int(input())
A = np.zeros(N).astype(int)
B = np.zeros(N).astype(int)

for i in range(N):
    A[i], B[i] = map(int, input().split())

ans = 0
for i in reversed(range(N)):
    A[i] = A[i] + ans
    if A[i] % B[i] == 0:
        continue
    elif B[i] - A[i] > 0:
        ans += B[i] - A[i]
    else:
        ans += B[i] - (A[i] % B[i])
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

N = int(input())
A = np.zeros(N).astype(int)
B = np.zeros(N).astype(int)

for i in range(N):
    A[i], B[i] = map(int, input().split())

ans = 0
for i in reversed(range(N)):
    if A[i] % B[i] == 0:
        continue
    elif B[i] - A[i] > 0:
        ans += B[i] - A[i]
        A += B[i] - A[i]
    else:
        ans += B[i] - (A[i] % B[i])
        A += B[i] - (A[i] % B[i])
    
print(ans)

Fixed submission:
import numpy as np

N = int(input())
A = np.zeros(N).astype(int)
B = np.zeros(N).astype(int)

for i in range(N):
    A[i], B[i] = map(int, input().split())

ans = 0
for i in reversed(range(N)):
    A[i] = A[i] + ans
    if A[i] % B[i] == 0:
        continue
    elif B[i] - A[i] > 0:
        ans += B[i] - A[i]
    else:
        ans += B[i] - (A[i] % B[i])
    
print(ans)
Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())

def f(x):
    return 10**10 if x < 0 else x

print(min(f(y-x), f(y+x)+1, f(-y-x)+1, f(-y+x2)))

Fixed submission:
x, y = map(int, input().split())

f = lambda x: 10**10 if x < 0 else x

print(min(f(y-x), f(y+x)+1, f(-y-x)+1, f(-y+x)+2))

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())
mn = 10**9

f = lambda x: mn if x < 0 else x

print(min(f(y-x), f(y+x)+1, f(-y-x)+1, f(-y+x2)))

Fixed submission:
x, y = map(int, input().split())

f = lambda x: 10**10 if x < 0 else x

print(min(f(y-x), f(y+x)+1, f(-y-x)+1, f(-y+x)+2))
Buggy python submission (verdict: Time Limit Exceeded):
def solve():
    a, b, x = map(int, input().split())
    
    ans = 0
    for i in range(a, b+1):
        if i % x == 0:
            ans += 1
            
    return ans

print(solve())

Fixed submission:
def solve():
    a, b, x = map(int, input().split())
    
    if a != 0:
        return b//x - (a-1)//x
    else:
        return b//x + 1

print(solve())
Buggy python submission (verdict: Runtime Error):
def solve():
    N = int(input())
    score = 0
    for i in range(1, n+1):
        score += i
        if score >= n:
            break
    x = score - n
    res = list(range(1, x)) + list(range(x+1, i+1))
    return '\n'.join(map(str, res))
    
print(solve())

Fixed submission:
def solve():
    N = int(input())
    score = 0
    for i in range(1, N+1):
        score += i
        if score >= N:
            break
    x = score - N
    res = list(range(1, x)) + list(range(x+1, i+1))
    return '\n'.join(map(str, res))
    
print(solve())
Buggy python submission (verdict: Runtime Error):
def solve():
    N, M = map(int, input().split())
    
    num = []
    red = []
    for i in range(N+1):
        num.append(1)
        red.append(0)
    red[1] = 1
    
    for _ range(M):
        x, y = map(int, input().split())
        if red[x] == 1:
            red[y] = 1
        num[x] -= 1
        num[y] += 1
        if num[x] == 0:
            red[x] = 0
    
    return sum(red)

print(solve())

Fixed submission:
def solve():
    N, M = map(int, input().split())
    
    num = []
    red = []
    for i in range(N+1):
        num.append(1)
        red.append(0)
    red[1] = 1
    
    for _ in range(M):
        x, y = map(int, input().split())
        if red[x] == 1:
            red[y] = 1
        num[x] -= 1
        num[y] += 1
        if num[x] == 0:
            red[x] = 0
    
    return sum(red)

print(solve())
Buggy python submission (verdict: Runtime Error):
N, L = map(int, input().split())
S = [input() for _ in range(N)]
print(''.join(S.sort())

Fixed submission:
N, L = map(int, input().split())
S = [input() for _ in range(N)]
S.sort()
print(''.join(S))
Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = map(int, input().split())

C = N // (A + B) + (0 if N % (A + B) == 0 else 1)

blue = 0
total = 0

while total < N:
    addition = min(N - total, A + B)
    total += addition
    blue += min(addition, A)

print(blue)

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

C = N // (A + B)
D = N % (A + B)

R = C * A + min(A, D)
print(R)

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

C = N // (A + B) + (0 if N % (A + B) == 0 else 1)

blue = 0
total = 0
for n in range(C):
    addition = min(N - total, A + B)
    total += addition
    blue += min(addition, A)

print(blue)

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

C = N // (A + B)
D = N % (A + B)

R = C * A + min(A, D)
print(R)

Buggy python submission (verdict: Runtime Error):
from collections import Counter

N, A, B = map(int, input().split())

C = N // (A + B) + (0 if N % (A + B) == 0 else 1)

L = []
Co = Counter()
for n in range(C):
    L += ['b'] * A + ['r'] * B

Co = Counter(L[:N])

print(Co['b'])

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

C = N // (A + B)
D = N % (A + B)

R = C * A + min(A, D)
print(R)
Buggy python submission (verdict: Runtime Error):
# from functools import reduce

N = int(input())
AL = list(map(int, input().split()))

R = reduce(lambda x, y: x and y, [n % 3 == 0 or n % 5 == 0 for n in AL if n % 2 == 0])

if R:
    print('APPROVED')
else:
    print('DENIED')



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

if len(set([A, B, C])) == 2:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
from functools import reduce

N = int(input())
AL = list(map(int, input().split()))

R = reduce(lambda x, y: x and y, [n % 3 == 0 or n % 5 == 0 for n in AL if n % 2 == 0])

if R:
    print('APPROVED')
else:
    print('DENIED')



Fixed submission:
# from functools import reduce

N = int(input())
AL = list(map(int, input().split()))

R = True
for b in [n % 3 == 0 or n % 5 == 0 for n in AL if n % 2 == 0]:
    R = R and b

if R:
    print('APPROVED')
else:
    print('DENIED')
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
P = map(int, input().split())

PP = [(1 + pp) / 2 for pp in P]

mm = -1
for i in range(N - K + 1):
    mm = max(sum(PP[i:i+K]), mm)

print(mm)


Fixed submission:
import numpy

N, K = map(int, input().split())
P = map(int, input().split())

PP = [(1 + pp) / 2 for pp in P]

S = numpy.cumsum(PP).tolist()

r = -1
for i, ss in enumerate(S[K-1:]):
    r = ss if i == 0 else max(r, ss - S[i - 1])

print(r)
Buggy python submission (verdict: Runtime Error):
H = int(input())

def func(h):
    if h == 1:
        return 1
    else:
        return func(h // 2) * 2 + 1

r = func(H)
print(r)



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

R1 = H // A
R2 = 1 if H % A > 0 else 0
print(R1 + R2)
Buggy python submission (verdict: Time Limit Exceeded):
H = int(input())

def func(h):
    if h == 1:
        return 1
    else:
        return func(h // 2) + func(h // 2) + 1

r = func(H)
print(r)

Fixed submission:
H = int(input())

def func(h):
    if h == 1:
        return 1
    else:
        return func(h // 2) * 2 + 1

r = func(H)
print(r)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, D = map(int, input().split())

c = 0
for n in range(A, B + 1):
    if n % C != 0 and n % D != 0:
        c += 1

print(c)

Fixed submission:
import fractions

A, B, C, D = map(int, input().split())
LCM = C * D // fractions.gcd(C, D)

R = (B - A) + 1
R1 = (A - 1) // C + (A - 1) // D - ((A-1) // LCM)
R2 = B // C + B // D - (B // LCM)

RR = R - (R2 - R1)

print(RR)
Buggy python submission (verdict: Runtime Error):
LL = list(map(int, input().split())).sort()
R = LL[0] * LL[1] // 2
print(R)


Fixed submission:
LL = list(map(int, input().split()))
LL.sort()
R = LL[0] * LL[1] // 2
print(R)
Buggy python submission (verdict: Runtime Error):
from collections import deque

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

C = 0
while True:
    if len([n for n in A if n > 0 and n % 2 == 0]) == 0:
        break
    # 最大の偶数を探す
    odds3 = [n * 3 for n in A if n % 2 != 0]
    evens = sorted([n for n in A if n % 2 == 0])
    evens3 = [n * 3 for n in evens[:-1]]
    evens2 = [n // 2 for n in [evens[-1]]]
    A = odds3 + evens3 + evens2
    C += 1
print(C)


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

if A <= 8 and B <= 8:
    print('Yay!')
else:
    print(':(')
Buggy python submission (verdict: Runtime Error):
from itertools import product

H, W = map(int, input().split())

s = []
for i in range(H):
    s.append(list(input()))

for h, w in [(h, w) for h, w in product(range(H), range(W)) if s[h][w] != '.']:
    R = False
    if h > 0 and s[h - 1][w] == '#':
        # 上
        R = True
    if h < H - 1 and s[h + 1][w] == '#':
        # 下
        R = True
    if w > 0 and s[h][w - 1] == '#':
        # 左
        R = True
    if w < W - 1 and s[h][w + 1] == '#':
        # 右
        R = True

    if not R:
        print('No')
        exit()

print('Yes')

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

r = a - 1 if b < a else a

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

A.append(0)
for i in range(N):
    b, s = 0, 0
    for j, a in enumerate(A):
        if i != j:
            s += abs(b - a)
            b = a
    print(s)


Fixed submission:
from collections import deque
N = int(input())
A = [0] + list(map(int, input().split())) + [0]

total = 0
for i in range(1, N + 2):
    total += abs(A[i - 1] - A[i])

visited = []
for i in range(1, N + 1):
    a = abs(A[i - 1] - A[i + 1])
    b = abs(A[i] - A[i - 1]) + abs(A[i] - A[i + 1])
    visited.append(total + (a - b))

for v in visited:
    print(v)
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ss = list(s)
tt = list(input())

ss.sort()
tt.sort(reverse=True)

s1 = ''.join(ss)
t1 = ''.join(tt)

if s1 < t1:
    print('Yes')
else:
    print('No')

Fixed submission:
s = input()
t = input()

ss = list(s)
tt = list(t)

ss.sort()
tt.sort(reverse=True)

s1 = ''.join(ss)
t1 = ''.join(tt)

if s1 < t1:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input())
print('error' if A + B >= 10 else A + B)

Fixed submission:
A, B = map(int, input().split())
print('error' if A + B >= 10 else A + B)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import deque

N = int(input())

S = []
for _ in range(N):
    S.append(int(input()))

Q = deque([(0, 0)])

R = 0
while Q:
    i, pt = Q.popleft()
    if i == N and pt % 10 != 0:
        R = max(pt, R)
    if i < N:
        Q.append((i + 1, pt + S[i]))
        Q.append((i + 1, pt))

print(R)
    


Fixed submission:
from collections import deque

N = int(input())

S = []
for _ in range(N):
    S.append(int(input()))

SA = sum(S)

if SA % 10 == 0:
    SS = [s for s in S if s % 10 != 0]
    if len(SS) > 0:
        SA -= min(SS)
    else:
        SA = 0

print(SA)
Buggy python submission (verdict: Runtime Error):
s = input()
print(s.replase(',', ' '))


Fixed submission:
s = input()
print(s.replace(',', ' '))
Buggy python submission (verdict: Runtime Error):
SA = list(input())
SB = list(input())
SC = list(input())

D = {'a': SA, 'b': SB, 'c': SC}
now = 'a'

while D[now]:
    now = D[now].pop()

print(now)


Fixed submission:
a = int(input())
b = int(input())
h = int(input())
print((a + b) * h // 2)
Buggy python submission (verdict: Runtime Error):
S = list(input())

L = []

for i, ch in enumerate(S):
    if ch != 'B':
        L.append(ch)
    elif len(L) > 0:
        del L[i - 1]

R = ''.join(L)
print(R)


Fixed submission:
S = list(input())

L = []

for i, ch in enumerate(S):
    if ch != 'B':
        L.append(ch)
    elif len(L) > 0:
        L = L[:-1]

print(''.join(L))

Buggy python submission (verdict: Runtime Error):
S = list(input())

R = []

for i, ch in enumerate(S):
    if ch != 'B':
        R.append(ch)
    elif len(R) > 0:
        del R[i - 1]


print(''.join(R))


Fixed submission:
S = list(input())

L = []

for i, ch in enumerate(S):
    if ch != 'B':
        L.append(ch)
    elif len(L) > 0:
        L = L[:-1]

print(''.join(L))
Buggy python submission (verdict: Runtime Error):
str1 = list(input())
str2 = list(input())
count = 0
for i in range(len(str1)):
  if str1[i] != str2[i]:
    count +=1
print(count)

Fixed submission:
num = int(input())
print(int(num + num**2 + num**3))
Buggy python submission (verdict: Runtime Error):
age, max_money = int(input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0")

Fixed submission:
age, max_money = map(int, input().split())
if age>= 13:
  print(max_money)
elif age>=6 and age<=12:
  print(max_money//2)
elif age<=5:
  print("0")
Buggy python submission (verdict: Runtime Error):
total, index = map(int, input().split())
string = list(map(str, input().split()))
string[index-1] = string[index-1].lower()
print(string)

Fixed submission:
n, k = map(int, input().split())
string = str(input())
arr = list(string)
arr[k-1] = arr[k-1].lower()
print(*arr, sep="")
Buggy python submission (verdict: Runtime Error):
N,M,K = map(int, input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))

a,b=[0],[0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans,j =0,M
for i in range(N+1):
    if a[i]>K:
        break
    while b[j]>K-a[i]:
        j-=i
    ans =max(ans,i+j)
print(ans)

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

a,b=[0],[0]
for i in range(N):
    a.append(a[i]+A[i])
for i in range(M):
    b.append(b[i]+B[i])

ans,j =0,M
for i in range(N+1):
    if a[i]>K:
        break
    while b[j]>K-a[i]:
        j-=1
    ans =max(ans,i+j)
print(ans)
Buggy python submission (verdict: Runtime Error):
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)


Fixed submission:
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy python submission (verdict: Runtime Error):
import numpy as np
from  numba import njit
from time import time

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)


Fixed submission:
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy python submission (verdict: Runtime Error):
import numpy as np
from time import time
def main():
    N = int(input())
# div=np.zeros(N+1,np.int64)
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    main()


Fixed submission:
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
# div=np.zeros(N+1,np.int64)
count=0
for n in range(1 ,N+1):
    for m in range(n,N+1,n):
        count+=m
print(count)


Fixed submission:
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)

Buggy python submission (verdict: Runtime Error):
import numpy as np
N = int(input())
div=np.zeros(N+1,np.int64)
for n in range(1 ,N+1):
    for m in range(n,N+1,n):
        div[m]+=m
print(div.sum())


Fixed submission:
from  numba import njit

@njit
def main(N):
    count=0
    for n in range(1 ,N+1):
        for m in range(n,N+1,n):
            count+=m
    print(count)
if __name__ == "__main__":
    N = int(input())
    main(N)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split)
if (a*b)%2:
    print("Odd")
else:
    print("Even")


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

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


Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
print(input.count("1"))


Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Runtime Error):
X = int(input())
# A>=0で考えられる
div_list = []
for a in range(1, int(X**0.5)+1):
    if X % a == 0:
        div_list.append((a, X//a))

#print(div_list)
for x, y in div_list:
    for a in range(int(X**0.5)+1):
        b = a - x
        #print(a, b)
        y_hat = a**4 + b*a**3 + b**2*a**2 + b**3*a + b**4
        #print(y_hat)
        if y_hat == y:
            print(a, b)
            exit()


Fixed submission:
S = str(input())
if S == 'ABC':
    print('ARC')
elif S == 'ARC':
    print('ABC')
Buggy python submission (verdict: Runtime Error):
x = map(int, input().split())
print(x[2],x[0],x[1])


Fixed submission:
x = [int(x) for x in input().split()]
print(x[2],x[0],x[1])
Buggy python submission (verdict: Runtime Error):
x,y = [int(x) for x in input().split()]
def c(m):
      if (m>=2):
            return m*(m-1)//2
      else:
            return 0
if (x<2 and y<2):
      print(s)
else:
      print(c(x)+c(y))


Fixed submission:
x,y = [int(x) for x in input().split()]
def c(m):
      if (m>=2):
            return m*(m-1)//2
      else:
            return 0
if (x<2 and y<2):
      print(0)
else:
      print(c(x)+c(y))
Buggy python submission (verdict: Runtime Error):
#x = [int(x) for x in input().split()]
x = int(input())
y = int(input())
z = [1,2,3]
del(z.index(x))
del(z.index(y))
print(z[0])

Fixed submission:
#x = [int(x) for x in input().split()]
x = int(input())
y = int(input())
z = [1,2,3]
del(z[z.index(x)])
del(z[z.index(y)])
print(z[0])
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a<10 && b<10):
      print(a*b)
else:
      print(-1)

Fixed submission:
a,b = map(int, input().split())
if (a<10 and b<10):
      print(a*b)
else:
      print(-1)
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c=0
for i in range(3):
      if (a[i]==b[i]):
            c+=1
print(c)

Fixed submission:
d = ['Sunny', 'Cloudy',"Rainy"]
a = input()
print(d[(d.index(a)+1)%3])
Buggy python submission (verdict: Runtime Error):
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
c = 0
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]<=y[1]):
            c+=1
print(c)


Fixed submission:
x,y = [int(x) for x in input().split()]

if (x<y):
  print(0)
else:
  print(10)
Buggy python submission (verdict: Runtime Error):
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
c = 0
d = 0
i=0
while (d<=y[1]):
      d = d+l[i]
      i+=1
if (i>y[0]+1):
      print(y[0]+1)
else:
      print(i)


Fixed submission:
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
c = 1
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]<=y[1]):
            c+=1
print(c)