Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from math import factorial

n, m = map(int, input().split())


def combinations_count(n, r):
    ''' 組み合わせ '''
    return factorial(n) // (factorial(n - r) * factorial(r))


n_cmb = combinations_count(n, 2)
m_cmb = combinations_count(m, 2)

print(n_cmb + m_cmb)

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

n_cmb = n * (n - 1) / 2
m_cmb = m * (m - 1) / 2
print(int(n_cmb + m_cmb))

Buggy python submission (verdict: Runtime Error):
from operator import mul
from functools import reduce

n, m = map(int, input().split())


def cmb(n, r):
    r = min(n-r, r)
    if r == 0:
        return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1, r + 1))
    return over // under


a = cmb(n, 2)
b = cmb(m, 2)

print(a + b)

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

n_cmb = n * (n - 1) / 2
m_cmb = m * (m - 1) / 2
print(int(n_cmb + m_cmb))

Buggy python submission (verdict: Runtime Error):
from scipy.special import comb

n, m = map(int, input().split())

a = comb(n, 2, exact=True)
b = comb(m, 2, exact=True)
print(a + b)

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

n_cmb = n * (n - 1) / 2
m_cmb = m * (m - 1) / 2
print(int(n_cmb + m_cmb))
Buggy python submission (verdict: Runtime Error):
h, w = map(int, input().split())

if h * w % 2 == 0:
    ans = h * w / 2
else:
    ans = h * w // 2 + 1

if h == 1 or w == 1:
    ans = 1

print(int(ans))


Fixed submission:
num = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
k = int(input())
print(num[k-1])
Buggy python submission (verdict: Runtime Error):
import math

a, b, c = map(int, input().split())

if a + b + 2 * math.sqrt(a * b) < c:
    ans = 'Yes'
else:
    ans = 'No'

if math.isclose(math.sqrt(a) + math.sqrt(b), math.sqrt(c)):
    ans = 'Yes'

print(ans)


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

if 4 * a * b < (c - a - b) ** 2 and 0 <= c - a - b:
    ans = 'Yes'
else:
    ans = 'No'

print(ans)
Buggy python submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = []

for i in range((n // (a + b)) + 1):
    ans += a * 'b' + b * 'r'

print(ans[:n].count('b'))

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

ans = n // (a + b) * a
rem = n % (a + b)
ans += min(a, rem)  # ansとremを比較することでnの位置よって処理を変えられる

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int, input().split())
ans = []

def add_ball(a, b):
    ball_list = []
    for i in range(a):
        ball_list.append('b')
        if len(ball_list) == n:
            return ball_list
    for j in range(b):
        ball_list.append('r')
        if len(ball_list) == n:
            return ball_list
    return ball_list


for i in range((n // (a + b)) + 1):
    ball_list = add_ball(a, b)
    ans += ball_list

print(ans[:n].count('b'))

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

ans = n // (a + b) * a
rem = n % (a + b)
ans += min(a, rem)  # ansとremを比較することでnの位置よって処理を変えられる

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, a, b = map(int, input().split())
ans = []

def add_ball(a, b):
    ball_list = []
    for i in range(a):
        ball_list.append('b')
    for j in range(b):
        ball_list.append('r')
    return ball_list


for i in range((n // (a + b)) + 1):
    ball_list = add_ball(a, b)
    ans += ball_list

print(ans[:n].count('b'))


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

ans = n // (a + b) * a
rem = n % (a + b)
ans += min(a, rem)  # ansとremを比較することでnの位置よって処理を変えられる

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for i in sorted(k for k in d if d[k] == max(d.values())):
    print(i)

Fixed submission:
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

m = max(d.values())
for i in sorted(k for k in d if d[k] == m):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

d = {}
for i in range(n):
    s = str(input())
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for i in sorted(k for k in d if d[k] == max(d.values())):
    print(i)

Fixed submission:
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

m = max(d.values())
for i in sorted(k for k in d if d[k] == m):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
s = [str(input()) for _ in range(n)]

c = collections.Counter(s)

for i in sorted(k for k in c if c[k] == max(c.values())):
    print(i)

Fixed submission:
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

m = max(d.values())
for i in sorted(k for k in d if d[k] == m):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
s = [str(input()) for _ in range(n)]
ans = []

c = collections.Counter(s)
for i in c:
    if c[i] == max(c.values()):
        ans.append(i)
ans.sort()

for i in ans:
    print(i)

Fixed submission:
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

m = max(d.values())
for i in sorted(k for k in d if d[k] == m):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
s = [str(input()) for _ in range(n)]
ans = []

c = collections.Counter(s)
for k, v in sorted(c.items()):
    if v == max(c.values()):
        print(k)

Fixed submission:
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

m = max(d.values())
for i in sorted(k for k in d if d[k] == m):
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import collections

n = int(input())
s = [str(input()) for _ in range(n)]

c = collections.Counter(s)
keys = [k for k, v in c.items() if v == max(c.values())]

for i in sorted(keys):
    print(i)

Fixed submission:
n = int(input())

d = {}
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

m = max(d.values())
for i in sorted(k for k in d if d[k] == m):
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
h = list(map(int, input().split()))

h = sorted(h, reverse=True)

try:
    for i in range(k):
        h.pop(0)
except IndexError:
    pass

print(sum(h) if h != 0 else 0)

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

h = sorted(h, reverse=True)

del h[:k]

print(sum(h) if h != 0 else 0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(1, n):
    a = min(p[:i])
    if a > p[i]:
        cnt += 1
print(cnt + 1)

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

cnt = 0
p_min = p[0]
for i in range(n):
    p_min = min(p_min, p[i])
    if p_min == p[i]:
        cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(1, n):
    if min(p[:i]) > p[i]:
        cnt += 1
print(cnt + 1)

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

cnt = 0
p_min = p[0]
for i in range(n):
    p_min = min(p_min, p[i])
    if p_min == p[i]:
        cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int, input().split()))

cnt = 0
for i in range(1, n):
    if min(p[:i]) > p[i]:
        cnt += 1
print(cnt + 1)

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

cnt = 0
p_min = p[0]
for i in range(n):
    p_min = min(p_min, p[i])
    if p_min == p[i]:
        cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


a_div = make_divisors(a)
b_div = make_divisors(b)
div_list = a_div + b_div

ans = [x for x in set(div_list) if div_list.count(x) > 1]

print(sorted(ans[-k]))

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


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors


a_div = make_divisors(a)
b_div = make_divisors(b)
div_list = a_div + b_div

ans = sorted([x for x in set(div_list) if div_list.count(x) > 1])

print(ans[-k])
Buggy python submission (verdict: Runtime Error):
n, x = list(map(int, input()))
m = [i for i in int(input())]
rem_donut = x - sum(m)
add_donut = rem_donut // min(m)
print(add_donut + n)

Fixed submission:
n, x = map(int, input().split())
m = [int(input()) for i in range(n)]
rem_donut = x - sum(m)
add_donut = rem_donut // min(m)
print(add_donut + n)
Buggy python submission (verdict: Runtime Error):
n = int(input())
blu_list = [str(input()) for _ in range(n)]
m = int(input())
red_list = [str(input()) for _ in range(m)]

blu_set_list = list(set(blu_list))
red_set_list = list(set(red_list))
set_list = blu_set_list + red_set_list

blu_cnt = []
red_cnt = []
ans = []

for i in set_list:
    blu_cnt.append(blu_list.count(i))
    red_cnt.append(red_list.count(i))

for i in range(len(blu_list)):
    ans.append(blu_cnt[i] - red_cnt[i])

print(max(ans))

Fixed submission:
n = int(input())
blu_list = [str(input()) for _ in range(n)]
m = int(input())
red_list = [str(input()) for _ in range(m)]

blu_set_list = list(set(blu_list))
red_set_list = list(set(red_list))
set_list = blu_set_list + red_set_list

blu_cnt = []
red_cnt = []
ans = []

for i in set_list:
    blu_cnt.append(blu_list.count(i))
    red_cnt.append(red_list.count(i))

for i in range(len(set_list)):
    ans.append(blu_cnt[i] - red_cnt[i])

print(max(ans) if max(ans) > 0 else 0)

Buggy python submission (verdict: Runtime Error):
n = int(input())
blu_list = [str(input()) for _ in range(n)]
m = int(input())
red_list = [str(input()) for _ in range(m)]

blu_set_list = list(set(blu_list))
red_set_list = list(set(red_list))
set_list = blu_set_list + red_set_list

blu_cnt = []
red_cnt = []
ans = []

for i in set_list:
    blu_cnt.append(blu_list.count(i))
    red_cnt.append(red_list.count(i))

for i in range(len(blu_list)):
    ans.append(blu_cnt[i] - red_cnt[i])

print(max(ans) if max(ans) > 0 else 0)

Fixed submission:
n = int(input())
blu_list = [str(input()) for _ in range(n)]
m = int(input())
red_list = [str(input()) for _ in range(m)]

blu_set_list = list(set(blu_list))
red_set_list = list(set(red_list))
set_list = blu_set_list + red_set_list

blu_cnt = []
red_cnt = []
ans = []

for i in set_list:
    blu_cnt.append(blu_list.count(i))
    red_cnt.append(red_list.count(i))

for i in range(len(set_list)):
    ans.append(blu_cnt[i] - red_cnt[i])

print(max(ans) if max(ans) > 0 else 0)

Buggy python submission (verdict: Runtime Error):
n = int(input())
blu_list = [str(input()) for _ in range(n)]
m = int(input())
red_list = [str(input()) for _ in range(m)]

blu_set_list = list(set(blu_list))
red_set_list = list(set(red_list))
set_list = blu_set_list + red_set_list

blu_cnt = []
red_cnt = []
ans = []

for i in set_list:
    blu_cnt.append(blu_list.count(i))
    red_cnt.append(red_list.count(i))

for i in range(len(blu_list)):
    ans.append(blu_cnt[i] - red_cnt[i])

print(max(ans) if max(ans) > 0 else 0)

Fixed submission:
n = int(input())
blu_list = [str(input()) for _ in range(n)]
m = int(input())
red_list = [str(input()) for _ in range(m)]

blu_set_list = list(set(blu_list))
red_set_list = list(set(red_list))
set_list = blu_set_list + red_set_list

blu_cnt = []
red_cnt = []
ans = []

for i in set_list:
    blu_cnt.append(blu_list.count(i))
    red_cnt.append(red_list.count(i))

for i in range(len(set_list)):
    ans.append(blu_cnt[i] - red_cnt[i])

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

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

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

Fixed submission:
a, b = map(int, input().split())
if (a * b) % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
num_list = list(map(int, input().split()))
cnt = 0
cnt_list = []
ans = 0

for i in set(num_list):
    for j in num_list:
        if i == j:
            cnt += 1
    cnt_list.append(cnt)
    cnt = 0

dic = dict(zip(set(num_list), cnt_list))
dic_sorted = sorted(dic.items(), key=lambda x: x[1])
del_num = dic_sorted[:len(dic_sorted)-k]

for i in del_num:
    ans += i[1]

print(ans)


Fixed submission:
import collections

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

list_a = list(collections.Counter(a).values())
dic = dict(zip(collections.Counter(a), list_a))
dic_sorted = sorted(dic.items(), key=lambda x: x[1])
del_num = dic_sorted[:len(dic_sorted)-k]

for i in del_num:
    ans += i[1]

print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = []
for i in range(1,n+1):
    cnt = 0
    while i % 2 == 0:
        i //= 2
        cnt += 1
        a.append(cnt)
print(2**max(a))


Fixed submission:
n = int(input())
a = [0]
for i in range(1,n+1):
    cnt = 0
    while i % 2 == 0:
        i //= 2
        cnt += 1
        a.append(cnt)
print(2**max(a))
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x + y + z == s:
                cnt += 1
print(cnt)

Fixed submission:
k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    for y in range(k+1):
        if 0 <= s-x-y <= k:
            cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
cnt = 0
for i in range(k+1):
    for j in range(k+1):
        for k in range(k+1):
            if i + j + k == s:
                cnt += 1
print(cnt)

Fixed submission:
k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    for y in range(k+1):
        if 0 <= s-x-y <= k:
            cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int, input().split())
cnt = 0
for i in range(k+1):
    for j in range(k+1):
        for k in range(k+1):
            if i + j + k == s:
                cnt += 1
print(cnt)

Fixed submission:
k, s = map(int, input().split())
cnt = 0
for x in range(k+1):
    for y in range(k+1):
        if 0 <= s-x-y <= k:
            cnt += 1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int, input().split())

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

C = [1]
i = 0

while True:
    C.append(A[i])
    i = A[i]-1
    if i == 0:
        C.pop(len(C)-1)
        break
        
r = K % len(C)


print(C[r])

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

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

C = [1]
D = {1}
i = 0
C1 = []
C2 = []
while True:
    if A[i] not in D:
        C.append(A[i])
        D.add(A[i])
        i = A[i]-1
    else:
        index = C.index(A[i])
        C1 = C[:index]
        C2 = C[index:]
        break

        
if K <= len(C1)-1:
    print(C1[K])
else:
    r = (K-len(C1))%len(C2)
    print(C2[r])
Buggy python submission (verdict: Runtime Error):
import math

N = int(input())

X = []
Y = []
for i in range(N):
    x,y = map(int, input().split())
    X[i] = x
    Y[i] = y

D = 0
for i in range(N):
    for j in range(N):
        if i < j:
            a = (X[i]-X[j])**2
            b = (Y[i]-Y[j])**2
            c = math.sqrt(a+b)
            D += c
print((2*D)/2)

Fixed submission:
import math

N = int(input())

X = [0 for i in range(N)]
Y = [0 for i in range(N)]
for i in range(N):
    x,y = map(int, input().split())
    X[i] = x
    Y[i] = y

D = 0
for i in range(N):
    for j in range(N):
        if i < j:
            a = (X[i]-X[j])**2
            b = (Y[i]-Y[j])**2
            c = math.sqrt(a+b)
            D += c
print((2*D)/N)
Buggy python submission (verdict: Runtime Error):
b = str(input())

if b == A:
    print('T')
elif b == T:
    print(A)
elif b == G:
    print(C)
elif b == C:
    print(G)

Fixed submission:
b = str(input())

if b == 'A':
    print('T')
elif b == 'T':
    print('A')
elif b == 'G':
    print('C')
elif b == 'C':
    print('G')
Buggy python submission (verdict: Runtime Error):
N =int(input())
A = list(map(int, input().split()))

#２整数の最大公約数を求める

def gcd(x,y): 
    while y != 0:
        x , y = y , x % y 
    return x



#N 整数の最大公約数を求める
#A = [A[0],...,A[N]] とする

def gcd(A):
    ans = A[0]
    for i in range(1,N) #range(1,N)= 1,2,...,N-1
        ans = gcd(ans, A[i])
    return ans
print(gcd(A))

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

#２整数の最大公約数を求める

def gcd2(x,y): 
    while y != 0:
        x , y = y , x % y 
    return x



#N 整数の最大公約数を求める
#A = [A[0],...,A[N]] とする

def gcd(A):
    ans = A[0]
    for i in range(1,N): #range(1,N)= 1,2,...,N-1
        ans = gcd2(ans, A[i])
    return ans
print(gcd(A))

Buggy python submission (verdict: Runtime Error):
import math
from functools import reduce

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

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

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

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

#２整数の最大公約数を求める

def gcd2(x,y): 
    while y != 0:
        x , y = y , x % y 
    return x



#N 整数の最大公約数を求める
#A = [A[0],...,A[N]] とする

def gcd(A):
    ans = A[0]
    for i in range(1,N): #range(1,N)= 1,2,...,N-1
        ans = gcd2(ans, A[i])
    return ans
print(gcd(A))

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

def judge(A):
    
    count = 0
    for i in range(N):
        if A[i] >= 1:
            count += 1
    if count == 1:
        return 1
    else: return 0
    

while judge(A) == 0:
    A.sort()

    for i in range(N):
        if i >=1:
            A[i] = A[i]%A[0]

for i in range(N):
    if A[i] >= 1:
        print(A[i])

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

#２整数の最大公約数を求める

def gcd2(x,y): 
    while y != 0:
        x , y = y , x % y 
    return x



#N 整数の最大公約数を求める
#A = [A[0],...,A[N]] とする

def gcd(A):
    ans = A[0]
    for i in range(1,N): #range(1,N)= 1,2,...,N-1
        ans = gcd2(ans, A[i])
    return ans
print(gcd(A))
Buggy python submission (verdict: Runtime Error):
S = str(input())
K = int(input())

ans = 1
index = 0
for j in range(len(S)):
    if S[j] != '1':
        ans = int(s[j])
        index = j
        break

if ans == 1:
    print(ans)
elif index < K-1:
    print(ans)
else:
    print(1)
        

Fixed submission:
S = str(input())
K = int(input())

ans = 1
index = 0
for j in range(len(S)):
    if S[j] != '1':
        ans = int(S[j])
        index = j
        break

if ans == 1:
    print(ans)
elif index > K-1:
    print(1)
else:
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,C,K = map(int, input().split())

if abs(A-B) > 10**(18):
    print("Unfair")
else:
    for i in range(K):
        a = B+C
        b = A+C
        c = A+B
        A = a
        B = b
        C = c
print(A-B)

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

if abs(A-B) > 10**(18):
    print("Unfair")
elif K%2 == 0:print(A-B)
elif K%2 == 1:print(B-A)

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

for i in range(K):
    a = B+C
    b = A+C
    c = A+B
    A = a
    B = b
    C = c
print(A-B)

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

if abs(A-B) > 10**(18):
    print("Unfair")
elif K%2 == 0:print(A-B)
elif K%2 == 1:print(B-A)
Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0
for i in range(N):
	a1.append(int(input()))
for i in range(N):
	a2.append(int(input()))


for i in range(N-1):
	for j in range(i):
		t += a1[j]
	for k in range(N-1-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)

Fixed submission:
#-*- coding:utf-8 -*-
x = int(input())
a = int(input())
b = int(input())

print((x-a)-b*((x-a)//b))

Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
x,a,b= int(input())

print((x-a)-b*((x-a)//b))

Fixed submission:
#-*- coding:utf-8 -*-
x = int(input())
a = int(input())
b = int(input())

print((x-a)-b*((x-a)//b))

Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
x = input()
a = input()
b = input()

print((x-a)-b*((x-a)//b))

Fixed submission:
#-*- coding:utf-8 -*-
x = int(input())
a = int(input())
b = int(input())

print((x-a)-b*((x-a)//b))

Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
x = input()
a = input()
b = input()

print((x-a)//b)

Fixed submission:
#-*- coding:utf-8 -*-
x = int(input())
a = int(input())
b = int(input())

print((x-a)-b*((x-a)//b))
Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0

a1 = [int(input()) for i in range(N)]
a2 = [int(input()) for i in range(N)]


for i in range(N-1):
	for j in range(i):
		t += a1[j]
	for k in range(N-1-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)

Fixed submission:
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0

a1 = list(map(int,input().split()))
a2 = list(map(int,input().split()))



for i in range(N):
	for j in range(i+1):
		t += a1[j]
	for k in range(N-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)

Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0
for i in range(N):
	a1.append(int(input()))
for i in range(N):
	a2.append(int(input()))


for i in range(N-1):
	for j in range(i):
		t += a1[j]
	for k in range(N-1-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)

Fixed submission:
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0

a1 = list(map(int,input().split()))
a2 = list(map(int,input().split()))



for i in range(N):
	for j in range(i+1):
		t += a1[j]
	for k in range(N-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)

Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
N = int(input())
a1,a2 = []
s,t = 0
for i in range(N):
	a1.append(int(input()))
for i in range(N):
	a2.append(int(input()))


for i in range(N-1):
	for j in range(i):
		t += a1[j]
	for k in range(N-1-i):
		t += a2[i+k]
	if t > s:
	    s = t
print s

Fixed submission:
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0

a1 = list(map(int,input().split()))
a2 = list(map(int,input().split()))



for i in range(N):
	for j in range(i+1):
		t += a1[j]
	for k in range(N-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)

Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
N = int(input())
a1,a2 = []
s,t = 0
for i in range(N):
	a1.append(input())
for i in range(N):
	a2.append(input())


for i in range(N-1):
	for j in range(i):
		t += a1[j]
	for k in range(N-1-i):
		t += a2[i+k]
	if t > s:
	    s = t
print s

Fixed submission:
#-*- coding:utf-8 -*-
N = int(input())
a1 = []
a2 = []
s,t = 0,0

a1 = list(map(int,input().split()))
a2 = list(map(int,input().split()))



for i in range(N):
	for j in range(i+1):
		t += a1[j]
	for k in range(N-i):
		t += a2[i+k]
	if t > s:
	    s = t
	t = 0
print(s)
Buggy python submission (verdict: Runtime Error):
#-*- coding:utf-8 -*-
a,b = int(input()),int(input())

if a*b %2 == 0:
    print("Even")
else: print("Odd")

Fixed submission:
#-*- coding:utf-8 -*-
a = list(map(int,input().split()))


if a[0]*a[1] %2 == 0:
    print("Even")
else: print("Odd")