Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
for i in range(1000):
  print("Enter data: ", end="")
  inputstr = input().strip()
  if inputstr == "":
    break
  inputarray= inputstr.split(" ")
  n = int(inputarray[0])
  a = int(inputarray[1])
  b = int(inputarray[2])
  d1 = min(a,b)
  if a+b > n:
    d2 = abs(a+b-n)
  else:
    d2 = 0
  print (str(max(d1,d2)) + " " + str(min(d1,d2)))

Fixed submission:
inputstr = input().strip()
inputarray= inputstr.split(" ")
n = int(inputarray[0])
a = int(inputarray[1])
b = int(inputarray[2])
d1 = min(a,b)
if a+b > n:
  d2 = abs(a+b-n)
else:
  d2 = 0
print (str(max(d1,d2)) + " " + str(min(d1,d2)))
Buggy python submission (verdict: Runtime Error):
def data_input():
    a,b,c,d = input().split(' ')
    a = int(a)
    b = int(b)
    c = int(c)
    d = int(d)
    return (a,b,c,d)
def answer():
    a,b,c,d = data_input()
    s = '1974'
    return a in s and b in s and c in s and d in s
answer()

Fixed submission:
def data_input():
    a,b,c,d = input().split(' ')
    return (a,b,c,d)
def answer():
    a,b,c,d = data_input()
    s = '1974'
    s = s.replace(a,'').replace(b,'').replace(c,'').replace(d,'')
    if len(s) == 0:
        print('YES')
    else:
        print('NO')
answer()

Buggy python submission (verdict: Runtime Error):
def data_input():
    a,b,c,d = input().split(' ')
    a = int(a)
    b = int(b)
    c = int(c)
    d = int(d)
    return (a,b,c,d)

def answer():
    a,b,c,d = data_input()
    s = '1974'
    return if a in s and b in s and c in s and d in s

Fixed submission:
def data_input():
    a,b,c,d = input().split(' ')
    return (a,b,c,d)
def answer():
    a,b,c,d = data_input()
    s = '1974'
    s = s.replace(a,'').replace(b,'').replace(c,'').replace(d,'')
    if len(s) == 0:
        print('YES')
    else:
        print('NO')
answer()
Buggy python submission (verdict: Runtime Error):
a,b,c = input().split(' ')
if c>a+b:
  return a+b+1+b
return c+b

Fixed submission:
def main():
  a,b,c = input().split(' ')
  a = int(a)
  b = int(b)
  c = int(c)
  if c>a+b:
    print(a+b+1+b)
  else:
    print(c+b)

if __name__=="__main__":
  main()
Buggy python submission (verdict: Runtime Error):
def abc115_d():
    n, x = map(int, input().split())
    burger = "P"
    for i in range(n):
        burger = ("B" + burger + "P" + burger + "B")[:x]

    print(burger.count("P"))


abc115_d()

Fixed submission:
def abc115_d():
    n, x = map(int, input().split())
    l = [1] * 51
    p = [1] * 51
    for i in range(50):
        l[i + 1] = 2 * l[i] + 3
        p[i + 1] = p[i] * 2 + 1

    ans = 0
    while n:
        if x == l[n]:
            ans += p[n]
            break
        elif x > (l[n] // 2):
            ans += p[n - 1] + 1
            x -= (l[n - 1] + 2)
            n -= 1
        else:
            x -= 1
            n -= 1
    if x == 1:
        ans += 1

    print(ans)


abc115_d()

Buggy python submission (verdict: Runtime Error):
def abc115_d():
    n, x = map(int, input().split())
    burgers = ["P"] * (n+1)
    for i in range(n):
        burgers[i+1] = "B" + burgers[i] + "P" + burgers[i] + "B"

    print(burgers[n][:x].count("P"))


abc115_d()

Fixed submission:
def abc115_d():
    n, x = map(int, input().split())
    l = [1] * 51
    p = [1] * 51
    for i in range(50):
        l[i + 1] = 2 * l[i] + 3
        p[i + 1] = p[i] * 2 + 1

    ans = 0
    while n:
        if x == l[n]:
            ans += p[n]
            break
        elif x > (l[n] // 2):
            ans += p[n - 1] + 1
            x -= (l[n - 1] + 2)
            n -= 1
        else:
            x -= 1
            n -= 1
    if x == 1:
        ans += 1

    print(ans)


abc115_d()
Buggy python submission (verdict: Runtime Error):
def abc106_a():
    a, b = map(int, input().split())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

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

    return a * b - a - b + 1


print(abc106_a())

Buggy python submission (verdict: Runtime Error):
def abc106_a():
    a = int(input())
    b = int(input())

    return a * b - a - b + 1


print(abc106_a())

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

    return a * b - a - b + 1


print(abc106_a())
Buggy python submission (verdict: Runtime Error):
def abc106_c():
    s = input()
    k = int(input())

    if s[:k] == "1"*k:
        return 1
    else:
        return (s.replace("1", ""))[0]


print(abc106_c())

Fixed submission:
def abc106_c():
    s = input()
    k = int(input())

    if s[:k].replace("1", "") == "":
        return 1
    else:
        return (s.replace("1", ""))[0]


print(abc106_c())
Buggy python submission (verdict: Runtime Error):

def abc098_b():
    import numpy as np
    n = int(input())
    s = input()
    counts = []
    for i in range(1, n - 1):
        x = s[:i]
        y = s[i:]
        count = 0
        for let in set(x):
            if let in set(y):
                count += 1
        counts.append(count)
    return np.max(counts)


print(abc098_b())

Fixed submission:
def abc098_b():
    import numpy as np
    n = int(input())
    s = input()
    counts = []
    if len(s) == 2:
        return [0,1][s[0] == s[1]]
    for i in range(1, n - 1):
        x = s[:i]
        y = s[i:]
        count = 0
        for let in set(x):
            if let in set(y):
                count += 1
        counts.append(count)
    return np.max(counts)


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

def abc096_d():
    import numpy as np

    n= int(input())
    nums = np.array([2, 3, 5, 7] + [i for i in range(11, 55555, 2) if i % 3 > 0 and i % 5 > 0 and i % 7 > 0])
    primes = np.array([], dtype=int)

    for val in nums:
        mod = val % nums
        if np.sum(mod == 0) == 1:
            primes = np.append(primes, val)

    ans = np.random.choice(primes,n)
    return ans


print(abc096_d())

Fixed submission:
def abc096_dx():
    n = int(input())
    primes = [2, 3]

    for num in range(5, 55555, 2):
        is_prime = True
        for i in range(1, len(primes)):
            if primes[i] ** 2 > num:
                break
            if num % primes[i] == 0:
                is_prime = False
                break
        if is_prime:
            primes.append(num)

    ans = []
    for num in primes:
        if num % 5 == 1:
            ans.append(str(num))
        if len(ans) == n:
            break
    return " ".join(ans)
print(abc096_dx())
Buggy python submission (verdict: Time Limit Exceeded):
def abc094C():
    n = int(input())
    x = input().split()
    x = list(map(int, x))
    y = x.copy()
    y.sort()
    nums = y[int(n / 2 - 1): int(n / 2 + 1)]
    for i in range(n):
        y = x.copy()
        tf = nums[0] >= y[i]
        del y[i]
        y.sort()
        print(nums[tf])


abc094C()

Fixed submission:
def abc094C():
    n = int(input())
    x = input().split()
    x = list(map(int, x))
    y = x.copy()
    y.sort()
    nums = y[int(n / 2 - 1): int(n / 2 + 1)]
    for i in range(n):
        tf = nums[0] >= x[i]
        print(nums[tf])


abc094C()

Buggy python submission (verdict: Time Limit Exceeded):
def abc094C():
    n = int(input())
    x = input().split()
    x = list(map(int, x))
    for i in range(n):
        y = x.copy()
        del y[i]
        y.sort()
        print(y[int(n / 2)-1])


abc094C()

Fixed submission:
def abc094C():
    n = int(input())
    x = input().split()
    x = list(map(int, x))
    y = x.copy()
    y.sort()
    nums = y[int(n / 2 - 1): int(n / 2 + 1)]
    for i in range(n):
        tf = nums[0] >= x[i]
        print(nums[tf])


abc094C()
Buggy python submission (verdict: Time Limit Exceeded):
def abc092_c():
    n = int(input())
    a = list(map(int, input().split()))
    for i in range(n):
        tmp_a = a.copy()
        del tmp_a[i]
        money = abs(tmp_a[0]) + abs(tmp_a[-1])
        for j in range(n - 2):
            money += abs(tmp_a[j] - tmp_a[j + 1])
        print(money)


abc092_c()

Fixed submission:
def abc092_c():
    n = int(input())
    a = [0] + list(map(int, input().split())) + [0]
    money = 0
    for i in range(n + 1):
        money += abs(a[i] - a[i + 1])
    for i in range(1, n+1):
        print(money - abs(a[i] - a[i - 1]) - abs(a[i] - a[i + 1]) + abs(a[i + 1] - a[i - 1]))


abc092_c()
Buggy python submission (verdict: Runtime Error):
def ACBC_089_C():
    _num = int(input())
    _namelist = []
    _countM = 0
    _countA = 0
    _countR = 0
    _countC = 0
    _countH = 0

    for i in range(0, _num):
        _name = str(input())
        _namelist.append(_name)
        if _name[0] == "M":
            _countM += 1
        elif _name[0] == "A":
            _countA += 1
        elif _name[0] == "R":
            _countR += 1
        elif _name[0] == "C":
            _countC += 1
        elif _name[0] == "H":
            _countH += 1
    print(_countM * _countA * _countR + \
          _countM * _countA * _countC + \
          _countM * _countA * _countH + \
          _countM * _countR * _countC + \
          _countM * _countR * _countH + \
          _countM * _countC * _countH + \
          _countA * _countR * _countC + \
          _countA * _countR * _countH + \
          _countA * _countC * _countH + \
          _countR * _countC * _countH + \
          )

ACBC_089_C()

Fixed submission:
_num = int(input())
print(_num // 3)
Buggy python submission (verdict: Time Limit Exceeded):
_num = int(input())
_sumlist = []
for i in range(_num // 10, _num + 1):
    _sum = 0
    while i:
        _sum += i % 10
        i //= 10
    _sumlist.append(_sum)
print(max(_sumlist))

Fixed submission:
def digit_num(_num):
    _digit = 0
    while _num:
        _digit += 1
        _num //= 10
    return _digit


_num = int(input())
_digit = digit_num(_num)
_topdig = _num // 10 ** (_digit - 1)
_sumlist = [9 * (_digit - 1)]
if (_num - _topdig * 10 ** (_digit - 1)) == 10 ** (_digit - 1) - 1:
    _sumlist.append(_topdig + 9 * (_digit - 1))
else:
    _sumlist.append(_topdig - 1 + 9 * (_digit - 1))

print(max(_sumlist))

Buggy python submission (verdict: Runtime Error):
_num = int(input())
_sumlist = []
for i in range(num//10, _num + 1):
    _sum = 0
    while i:
        _sum += i % 10
        i //= 10
    _sumlist.append(_sum)
print(max(_sumlist))

Fixed submission:
def digit_num(_num):
    _digit = 0
    while _num:
        _digit += 1
        _num //= 10
    return _digit


_num = int(input())
_digit = digit_num(_num)
_topdig = _num // 10 ** (_digit - 1)
_sumlist = [9 * (_digit - 1)]
if (_num - _topdig * 10 ** (_digit - 1)) == 10 ** (_digit - 1) - 1:
    _sumlist.append(_topdig + 9 * (_digit - 1))
else:
    _sumlist.append(_topdig - 1 + 9 * (_digit - 1))

print(max(_sumlist))

Buggy python submission (verdict: Time Limit Exceeded):
_num = int(input())
_sumlist = []
for i in range(1, _num + 1):
    _sum = 0
    while i:
        _sum += i % 10
        i //= 10
    _sumlist.append(_sum)
print(max(_sumlist))

Fixed submission:
def digit_num(_num):
    _digit = 0
    while _num:
        _digit += 1
        _num //= 10
    return _digit


_num = int(input())
_digit = digit_num(_num)
_topdig = _num // 10 ** (_digit - 1)
_sumlist = [9 * (_digit - 1)]
if (_num - _topdig * 10 ** (_digit - 1)) == 10 ** (_digit - 1) - 1:
    _sumlist.append(_topdig + 9 * (_digit - 1))
else:
    _sumlist.append(_topdig - 1 + 9 * (_digit - 1))

print(max(_sumlist))
Buggy python submission (verdict: Time Limit Exceeded):
def abc082_c():
    _ = int(input())
    a = list(map(int, input().split()))
    ans = 0

    for val in set(a):
        num = a.count(val)
        if num >= val:
            ans += (num-val)
        else:
            ans += num

    print(ans)


abc082_c()

Fixed submission:
def abc082_c():
    from collections import Counter

    _ = int(input())
    a = list(map(int, input().split()))
    ans = 0
    a_count = Counter(a)

    for num in a_count:
        if num <= a_count[num]:
            ans += (a_count[num] - num)
        else:
            ans += a_count[num]

    print(ans)


abc082_c()
Buggy python submission (verdict: Runtime Error):
def abc070_c():
    from fractions import gcd
    n = int(input())
    t = [int(input()) for _ in range(n)]
    ans = 1
    for i in range(n):
        ans = int(ans * t[i] / gcd(ans, t[i]))

    print(ans)


abc070_c()

Fixed submission:
def abc070_c():
    from fractions import gcd
    n = int(input())
    t = [int(input()) for _ in range(n)]
    ans = t[0]
    for v in t:
        ans = ans * v // gcd(ans, v)

    print(ans)


abc070_c()

Buggy python submission (verdict: Runtime Error):
def abc070_c():
    from math import gcd
    n = int(input())
    t = [int(input()) for _ in range(n)]
    ans = 1
    for i in range(n):
        ans = int(ans * t[i] / gcd(ans, t[i]))

    print(ans)


abc070_c()

Fixed submission:
def abc070_c():
    from fractions import gcd
    n = int(input())
    t = [int(input()) for _ in range(n)]
    ans = t[0]
    for v in t:
        ans = ans * v // gcd(ans, v)

    print(ans)


abc070_c()
Buggy python submission (verdict: Time Limit Exceeded):
def abc068_c():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(m)]
    first_candidate = []
    second_candidate = []
    for i in range(m):
        if ab[i][0] == 1:
            first_candidate.append(ab[i][1])
        elif ab[i][1] == n:
            second_candidate.append(ab[i][0])
    for v in first_candidate:
        if v in second_candidate:
            print("POSSIBLE")
            return None
    print("IMPOSSIBLE")


abc068_c()

Fixed submission:
def abc068_c():
    from collections import Counter
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(m)]
    candidates = []

    for i in range(m):
        if ab[i][0] == 1:
            candidates.append(ab[i][1])
        elif ab[i][1] == n:
            candidates.append(ab[i][0])

    if max(Counter(candidates).values()) >= 2:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")


abc068_c()

Buggy python submission (verdict: Time Limit Exceeded):
def abc068_c():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(m)]
    first_index = []
    for i in range(m):
        if ab[i][0] == 1:
            first_index.append(ab[i][1])

    for i in range(m):
        if ab[i][0] in first_index and ab[i][1] == n:
            print("POSSIBLE")
            return 0
    print("IMPOSSIBLE")


abc068_c()

Fixed submission:
def abc068_c():
    from collections import Counter
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(m)]
    candidates = []

    for i in range(m):
        if ab[i][0] == 1:
            candidates.append(ab[i][1])
        elif ab[i][1] == n:
            candidates.append(ab[i][0])

    if max(Counter(candidates).values()) >= 2:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")


abc068_c()
Buggy python submission (verdict: Time Limit Exceeded):
def abc063_c():
    from itertools import combinations

    n = int(input())
    s = [int(input()) for _ in range(n)]
    score = 0
    for i in range(1, n + 1):
        for seq in combinations(s, i):
            if sum(seq) % 10 and sum(seq) > score:
                score = sum(seq)
    print(score)


abc063_c()

Fixed submission:
def abc063_c():
    from itertools import combinations
    import numpy as np
    n = int(input())
    s = np.array([int(input()) for _ in range(n)])
    score = 0
    if sum(s % 10) == 0:
        print(0)
    else:
        for i in range(n + 1, 0, -1):
            for seq in combinations(s, i):
                tmp = sum(seq)
                if tmp % 10 and tmp > score:
                    score = tmp
            if score:
                break
        print(score)


abc063_c()
Buggy python submission (verdict: Runtime Error):
def abc057_b():
    from math import inf
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(n)]
    cd = [list(map(int, input().split())) for _ in range(m)]

    for i in range(n):
        tmp_index = 0
        d = inf
        for j in range(m):
            tmp_d = abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - cd[j][1])
            if tmp_d < d:
                tmp_index = j
                d = tmp_d
        print(tmp_index + 1)


abc057_b()

Fixed submission:
def abc057_b():
    n, m = map(int, input().split())
    ab = [list(map(int, input().split())) for _ in range(n)]
    cd = [list(map(int, input().split())) for _ in range(m)]

    for i in range(n):
        tmp_index = 0
        d = 10 ** 9
        for j in range(m):
            tmp_d = abs(ab[i][0] - cd[j][0]) + abs(ab[i][1] - cd[j][1])
            if tmp_d < d:
                tmp_index = j
                d = tmp_d
        print(tmp_index + 1)


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

A_list = []
B_list = []
dif_list = []
for i in range(N):
    A, B = map(int, input().split())
    A_list.append(A)
    B_list.append(B)
    dif_list.append(B - A)

takahashi_score = 0
aoki_score = 0
for i in range(N):
    if len(dif_list) != 0:
        dish_index = dif_list.index(max(dif_list))
        score = A_list[dish_index]
        takahashi_score += score

        del A_list[dish_index]
        del B_list[dish_index]
        del dif_list[dish_index]

    if len(dif_list) != 0:
        dish_index = dif_list.index(max(dif_list))
        score = B_list[dish_index]
        aoki_score += score

        del A_list[dish_index]
        del B_list[dish_index]
        del dif_list[dish_index]

print(takahashi_score - aoki_score)


Fixed submission:
N = int(input())

A_list = []
B_list = []
dif_list = []
for i in range(N):
    A, B = map(int, input().split())
    A_list.append(A)
    B_list.append(B)
    dif_list.append(A + B)

my_list = [[dif, a, b] for dif, a, b in zip(dif_list, A_list, B_list)]
my_list.sort(reverse=True)

takahashi_score = 0
aoki_score = 0

for i, list_items in enumerate(my_list):
    a = list_items[1]
    b = list_items[2]
    if i % 2 == 0:
        takahashi_score += a
    else:
        aoki_score += b

print(takahashi_score - aoki_score)

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

N = int(input())

A_list = []
B_list = []
takahashi_list = []
aoki_list = []
for i in range(N):
    A, B = map(int, input().split())
    A_list.append(A)
    B_list.append(B)
    takahashi_list.append(B - A)
    aoki_list.append(B - A)

A_list = np.array(A_list)
B_list = np.array(B_list)
takahashi_list = np.array(takahashi_list)
aoki_list = np.array(aoki_list)

takahashi_score = 0
aoki_score = 0
for i in range(N):
    if len(takahashi_list) != 0:
        dish_index = takahashi_list.argmax()
        score = A_list[dish_index]
        takahashi_score += score

        A_list = np.delete(A_list, dish_index, 0)
        B_list = np.delete(B_list, dish_index, 0)
        takahashi_list = np.delete(takahashi_list, dish_index, 0)
        aoki_list = np.delete(aoki_list, dish_index, 0)

    if len(aoki_list) != 0:
        dish_index = aoki_list.argmax()
        score = B_list[dish_index]
        aoki_score += score

        A_list = np.delete(A_list, dish_index, 0)
        B_list = np.delete(B_list, dish_index, 0)
        takahashi_list = np.delete(takahashi_list, dish_index, 0)
        aoki_list = np.delete(aoki_list, dish_index, 0)

print(takahashi_score - aoki_score)


Fixed submission:
N = int(input())

A_list = []
B_list = []
dif_list = []
for i in range(N):
    A, B = map(int, input().split())
    A_list.append(A)
    B_list.append(B)
    dif_list.append(A + B)

my_list = [[dif, a, b] for dif, a, b in zip(dif_list, A_list, B_list)]
my_list.sort(reverse=True)

takahashi_score = 0
aoki_score = 0

for i, list_items in enumerate(my_list):
    a = list_items[1]
    b = list_items[2]
    if i % 2 == 0:
        takahashi_score += a
    else:
        aoki_score += b

print(takahashi_score - aoki_score)
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
t = [int(input()) for i in range(n)]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
l = t[0]
for x in range(n):
    l = lcm(l,t[x])
print(l)

Fixed submission:
import fractions
n = int(input())
t = [int(input()) for i in range(n)]
def lcm(x, y):
    return (x * y) //fractions.gcd(x, y)
l = t[0]
for x in range(n):
    l = lcm(l,t[x])
print(l)
Buggy python submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0 ,max(n.count(l[i])-m.count(l[i]) for i in range(l))))


Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Buggy python submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,n.count(l[i])-m.count(l[i]) for i in range(l)))


Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Buggy python submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,n.count(l[i])-m.count(l[i])) for i in range(l))


Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))

Buggy python submission (verdict: Runtime Error):
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=set(n)
print(max(0,n.count(l[i])-m.count(l[i])) for i in range(l))


Fixed submission:
n=[input() for _ in range(int(input()))]
m=[input() for _ in range(int(input()))]
l=list(set(n))
print(max(0,max(n.count(l[i])-m.count(l[i]) for i in range(len(l)))))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
print(sum(i==i[::-1] for i in map(str,range(a,b+1))))

Fixed submission:
a,b=map(int,input().split())
print(sum(i==i[::-1] for i in map(str,range(a,b+1))))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input())
print(sum(i=i[::-1] for i in map(str,range(a,b+1))))

Fixed submission:
a,b=map(int,input().split())
print(sum(i==i[::-1] for i in map(str,range(a,b+1))))
Buggy python submission (verdict: Runtime Error):
print(len(set([int(input()) for _ in range(input())])))

Fixed submission:
print(len(set([int(input()) for _ in range(int(input()))])))

Buggy python submission (verdict: Runtime Error):
print(len(set([int(input()) for _　in range(input())])))

Fixed submission:
print(len(set([int(input()) for _ in range(int(input()))])))

Buggy python submission (verdict: Runtime Error):
print(len(set([int(input()) for _　in range(input())])))

Fixed submission:
print(len(set([int(input()) for _ in range(int(input()))])))

Buggy python submission (verdict: Runtime Error):
len(set([int(input()) for _　in range(input())]))

Fixed submission:
print(len(set([int(input()) for _ in range(int(input()))])))
Buggy python submission (verdict: Runtime Error):
import math
print(math.factrial(int(input()))%(10**9+7))

Fixed submission:
import math
print(math.factorial(int(input()))%(10**9+7))

Buggy python submission (verdict: Runtime Error):
import math
print(math.factrial(int(input()))//(10**9+7))

Fixed submission:
import math
print(math.factorial(int(input()))%(10**9+7))
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = int(input())
X = int(input())
cnt = 0

for a in range(A + 1):
  for b in range(B + 1):
    for c in range(C + 1):
      if 500 * a + 100 * b + 50 * c == X:
        cnt += 1
        
print(cnt)


Fixed submission:
X = int(input())
A = int(input())
B = int(input())
r = X - A - B * ((X - A) // B)
print(r)