alexjercan/bugnet huggingface dataset:
Problem p03294 (Python) — buggy submission, verdict: Runtime Error

from fractions import gcd


def lcm(a, b):
    return a * b // gcd(a, b)


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

cumlcm = A[0]
for a in A[1:]:
    cumlcm = lcm(cumlcm, a)
m = cumlcm - 1
f = sum(map(lambda a: m % a, A))
print(f)


Error: ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.10/fractions.py)
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03294/Python/s783858120.py", line 1, in <module>
    from fractions import gcd
ImportError: cannot import name 'gcd' from 'fractions' (/usr/lib/python3.10/fractions.py)


Fixed submission:

from fractions import gcd


def lcm(a, b):
    return int(a * b / gcd(a, b))


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

cumlcm = A[0]
for a in A[1:]:
    cumlcm = lcm(cumlcm, a)
m = cumlcm - 1
f = sum(map(lambda a: m % a if a != 0 else m, A))
print(f)
Problem p03294 (Python) — buggy submission, verdict: Runtime Error

n = int(input())
arr = list(map(int, input().split()))
lcm = 0
for e in arr:
    lcm += e - 1
print(lcm)


Error: 0

Fixed submission:

def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


n = int(input())
arr = list(map(int, input().split()))
lcm = 1
for e in arr:
    lcm = int(lcm * e / gcd(lcm, e))
lcm -= 1
res = 0
for e in arr:
    res += lcm % e
print(res)
Problem p03295 (Python) — buggy submission, verdict: Runtime Error

N, M = map(int, input().split())

ab = [[] for _ in range(N + 1)]
for _ in range(M):
    a, b = map(int, input().split())
    ab[a].append(b)

dp = [0] * (N + 1)
for i in range(1, N + 1):
    dp[i] = max(dp[i], dp[i - 1])
    for j in ab[i]:
        dp[j] = max(dp[j], dp[i] + 1)

print(dp[N])


Error: AttributeError: 'int' object has no attribute 'append'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03295/Python/s787059904.py", line 6, in <module>
    ab[a].append(b)
AttributeError: 'int' object has no attribute 'append'


Fixed submission:

N, M = map(int, input().split())

ab = [0] * M
for _ in range(M):
    a, b = map(int, input().split())
    ab[a].append(b)

dp = [0] * (N + 1)
for i in range(1, N + 1):
    dp[i] = max(dp[i], dp[i - 1])
    for j in ab[i]:
        dp[j] = max(dp[j], dp[i] + 1)

print(dp[N])
Problem p03295 (Python) — buggy submission, verdict: Time Limit Exceeded

N, M = map(int, input().split())
req = [tuple(map(int, input().split())) for _ in range(M)]
req.sort(key=lambda x: x[1])

res = 0
i = 1
for m in range(M):
    if req[m][0] >= i:
        i = req[m][1]
        res += 1

print(res)


Error: TLE

Fixed submission:

N, M = map(int, input().split())
req = [tuple(map(int, input().split())) for _ in range(M)]
req.sort(key=lambda x: x[1])

res = 0
i = 1
while i <= N:
    remain = [x for x in req if i <= x[0]]
    if len(remain):
        i = remain[0][1]
        res += 1
    else:
        break

print(res)
Problem p03296 (Python) — buggy submission, verdict: Runtime Error

#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [int(i) for i in input().split()] + [0]

count = 0
tmp = 1
for i in range(1, N + 1):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)


Error: EOFError: EOF when reading a line
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03296/Python/s729658845.py", line 5, in <module>
    A = [list(map(int, input().split())) for _ in range(N)]
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03296/Python/s729658845.py", line 5, in <listcomp>
    A = [list(map(int, input().split())) for _ in range(N)]
EOFError: EOF when reading a line


Fixed submission:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

N = int(input())
A = [list(map(int, input().split())) for _ in range(N)]

count = 0
tmp = 1
for i in range(1, N):
    if A[i] == A[i - 1]:
        tmp += 1
    else:
        # 等しくなくなったら
        count += tmp // 2
        tmp = 1  # tmp のリセット

print(count)
Problem p03296 (Python) — buggy submission, verdict: Runtime Error

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

count = 0

for x in range(N):
    if x != N - 1:
        if a[x] == a[x + 1]:
            if x < N - 2:
                if a[x + 2] == 10000:
                    a[x + 1] = 9999
                    count += 1
                else:
                    a[x + 1] = 10000
                    count += 1
            else:
                a[x + 1] = 10000
                count += 1
print(count)


Error: 0

Fixed submission:

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

count = 0

for x in range(N):
    if x != N - 1:
        if a[x] == a[x + 1]:
            if x + 1 < N:
                if a[x + 2] == 10000:
                    a[x + 1] = 9999
                    count += 1
                else:
                    a[x + 1] = 10000
                    count += 1
            else:
                a[x + 1] = 10000
                count += 1
print(count)
Problem p03297 (Python) — buggy submission, verdict: Time Limit Exceeded

from fractions import gcd


def solve(a, b, c, d):
    if a < b or d < b:
        return False

    if c >= b - 1:
        return True

    g = gcd(b, d)
    return (b + a % g - g) <= c


T, *L = map(int, open(0).read().split())

for t in zip(*[iter(L)] * 4):
    if solve(*t):
        print("Yes")
    else:
        print("No")


Error: TLE

Fixed submission:

T = int(input())
for i in range(T):
    A, B, C, D = [int(i) for i in input().split()]

    memo = set()
    while True:
        if A in memo:
            print("Yes")
            break

        if A - B < 0:
            print("No")
            break

        if D - B == 0:
            if C - A + B < 0:
                print("No")
                break
            else:
                print("Yes")
                break

        if D - B < 0:
            print("No")
            break

        n = 1 + (C - A + B) // (D - B)
        r = (A - B) + n * (D - B)
        if r < B:
            print("No")
            break
        else:
            memo.add(A)
            A = B + r % B

    else:
        print("Yes")

    # print(A, B, C, D)
Problem p03302 (Python) — buggy submission, verdict: Runtime Error

a, b = map(int, input().split())
if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")


Error: ValueError: invalid literal for int() with base 10: ' '
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03302/Python/s877853063.py", line 1, in <module>
    a, b = map(int, input())
ValueError: invalid literal for int() with base 10: ' '


Fixed submission:

a, b = map(int, input())
if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")
Problem p03302 (Python) — buggy submission, verdict: Runtime Error

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

if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")


Error: TypeError: can't multiply sequence by non-int of type 'str'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03302/Python/s883899606.py", line 5, in <module>
    elif a * b == 15:
TypeError: can't multiply sequence by non-int of type 'str'


Fixed submission:

a, b = input().split()

if a + b == 15:
    print("+")
elif a * b == 15:
    print("*")
else:
    print("x")
Problem p03307 (Python) — buggy submission, verdict: Time Limit Exceeded

def solve():
    n = int(input())
    i = n
    while True:
        if i % 2 == 0:
            print(i)
            exit()
        i += n


if __name__ == "__main__":
    solve()


Error: TLE

Fixed submission:

def solve():
    n = int(input())
    i = n
    while True:
        if i % 2 == 0 and i % n == 0:
            print(i)
            exit()


if __name__ == "__main__":
    solve()
Problem p03307 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())

i = N
while True:
    if i % 2 == 0 and i % N == 0:
        print(i)
        break
    i += N


Error: TLE

Fixed submission:

N = int(input())

i = N
while True:
    if i % 2 == 0 and i % N == 0:
        print(i)
        break
    i += 1
Problem p03307 (Python) — buggy submission, verdict: Runtime Error

n = int(input())
print(n + n * (n % 2))


Error: EOFError: EOF when reading a line
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03307/Python/s884311780.py", line 2, in <module>
    nums = list(map(int, input().split(" ")))
EOFError: EOF when reading a line


Fixed submission:

number = int(input())
nums = list(map(int, input().split(" ")))

print(max(nums) - min(nums))
Problem p03307 (Python) — buggy submission, verdict: Runtime Error

n = int(input())

print(2 * n if n % 2 != 0 else n)


Error: 0

Fixed submission:

n = int(input())

if n < 1 or n > 10:
    raise ValueError

print(2 * n if n % 2 != 0 else n)
Problem p03307 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())

# a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


# a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)


print(lcm(2, n))


Error: TLE

Fixed submission:

n = int(input())
ans = 1

while True:
    if ans % n == 0 and ans % 2 == 0:
        print(ans)
        break
    ans += 1
Problem p03307 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2 * N)


Error: TLE

Fixed submission:

N = int(input())
N1 = []

for n in range(1, (N + 1)):
    N1.append(2 * n)

for i in N1:
    if i % N == 0:
        print(i)
        break
Problem p03307 (Python) — buggy submission, verdict: Time Limit Exceeded

a = int(input())
b = 2
x = a * b

if a < b:
    tmp = a
    a = b
    b = tmp

r = a % b
while r != 0:
    a = b
    b = r
    r = a % b

print(int(x / b))


Error: TLE

Fixed submission:

n = int(input())
num = n

while num % 2 != 0 or num % n != 0:
    num += 1

print(num)
Problem p03307 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())

if n % 2 == 0:
    print(n)
else:
    print(n * 2)


Error: TLE

Fixed submission:

n = int(input())

for i in range(2, 10**9, 2):
    if i % n == 0:
        print(i)
Problem p03307 (Python) — buggy submission, verdict: Runtime Error

N = int(input())

if N % 2 != 0:
    answer = N * 2
    print(answer)
else:
    print(N)


Error: TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03307/Python/s937616807.py", line 3, in <module>
    if N % 2 != 0:
TypeError: not all arguments converted during string formatting


Fixed submission:

N = input()

if N % 2 != 0:
    answer = N * 2
    print(answer)
else:
    print(N)
Problem p03307 (Python) — buggy submission, verdict: Runtime Error

N = int(input())

if N % 2 == 0:
    print(N)
else:
    print(N * 2)


Error: EOFError: EOF when reading a line
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03307/Python/s608756496.py", line 3, in <module>
    A = list(map(int, input().split()))
EOFError: EOF when reading a line


Fixed submission:

N = int(input())

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

print(max(A) - min(A))
Problem p03308 (Python) — buggy submission, verdict: Runtime Error

n = int(input())
a = list(map(int, input().split()))
print(max(a) - min(a))


Error: ValueError: min() arg is an empty sequence
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03308/Python/s261566864.py", line 3, in <module>
    print(max(a) - min(a))
ValueError: min() arg is an empty sequence


Fixed submission:

n = int(input())
a = map(int, input().split())
print(max(a) - min(a))
Problem p03308 (Python) — buggy submission, verdict: Runtime Error

N = int(input())
A = list(map(int, input().split()))
print(max(A) - min(A))


Error: AttributeError: 'str' object has no attribute 'spllit'. Did you mean: 'split'?
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03308/Python/s562647525.py", line 2, in <module>
    A = list(map(int, input().spllit()))
AttributeError: 'str' object has no attribute 'spllit'. Did you mean: 'split'?


Fixed submission:

N = int(input())
A = list(map(int, input().spllit()))
print(max(A) - min(A))
Problem p03309 (Python) — buggy submission, verdict: Runtime Error

import math

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

_A = [A[i] - (i + 1) for i in range(len(A))]
_A.sort()
median = _A[math.floor(len(A) / 2)]

sadness = 0
for i in range(len(A)):
    sadness += abs(A[i] - (i + 1 + median))

print(sadness)


Error: WA

Fixed submission:

import math

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

_A = [A[i] - (i + 1) for i in range(len(A))]
_A.sort()
median = _A[math.ceil(len(A) / 2)]

sadness = 0
for i in range(len(A)):
    sadness += abs(A[i] - (i + 1 + median))

print(sadness)
Problem p03309 (Python) — buggy submission, verdict: Runtime Error

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

B = [A[i] - (i + 1) for i in range(N)]

B.sort()

b = B[len(B) // 2]

ans = 0

for j in range(N):
    ans += abs(A[j] - (b + j + 1))

print(ans)


Error: 0

Fixed submission:

N = int(input())
A = [int(i) for i in input().split()]

sum = 0
ans = []

for b in range(-int(N / 2), int(N / 2)):
    for i in range(N):
        sum += abs(A[i] - (b + i))
    else:
        ans.append(sum)
        sum = 0

print(min(ans))
Problem p03309 (Python) — buggy submission, verdict: Runtime Error

n = int(input().strip())
a = list(map(int, input().split()))
b = [(a[i] - (i + 1)) for i in range(n)]
b.sort()
mid = 0
if n == 1:
    mid = b[0]
elif n % 2 == 1:
    mid = b[(n - 1) // 2]
else:
    mid = (b[(n - 1) // 2] + b[(n - 1) // 2 + 1]) // 2
ans = 0
for i in range(n):
    ans += abs(b[i] - mid)
print(ans)


Error: WA

Fixed submission:

n = int(input().strip())
a = list(map(int, input().split()))
b = [(a[i] - (i + 1)) for i in range(n)]
b.sort()
mid = 0
if n % 2 == 1:
    mid = b[(n - 1) // 2 + 1]
else:
    mid = (b[(n - 1) // 2] + b[(n - 1) // 2]) // 2

ans = 0
for i in range(n):
    ans += abs(b[i] - mid)
print(ans)
Problem p03309 (Python) — buggy submission, verdict: Time Limit Exceeded

# -*- coding: utf-8 -*-
n = int(input())
a = [int(_) - (i + 1) for i, _ in enumerate(input().split())]

# INF = 10**10
# grief = INF
# for b in set(a):
#     tmp = sum([abs(ai - b) for ai in a])
#     if tmp < grief:
#         bb = b
#         grief = tmp

# print(grief)  # running time limit error

a.sort()
med = a[len(a) // 2]
grief = sum([abs(ai - med) for ai in a])
print(grief)


Error: TLE

Fixed submission:

# -*- coding: utf-8 -*-
INF = 10**10
n = int(input())
a = [int(_) - (i + 1) for i, _ in enumerate(input().split())]

grief = INF
for b in set(a):
    tmp = sum([abs(ai - b) for ai in a])
    if tmp < grief:
        bb = b
        grief = tmp

print(grief)
Problem p03310 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
A = list(map(int, input().split()))
S = [0] * N
S[0] = A[0]
for i in range(1, N):
    S[i] = S[i - 1] + A[i]

num = float("inf")
a = 0
b = 2
for i in range(1, N - 2):
    while S[a] < S[i] - S[a + 1]:
        a += 1
    b = max(b, i + 1)
    while S[b] - S[i] < S[N - 1] - S[b + 1]:
        b += 1

    P = [S[a], S[i] - S[a], S[b] - S[i], S[N - 1] - S[b]]
    num = min(num, abs(max(P) - min(P)))

print(num)


Error: TLE

Fixed submission:

N = int(input())
A = list(map(int, input().split()))
S = [0] * N
S[0] = A[0]
for i in range(1, N):
    S[i] = S[i - 1] + A[i]

num = float("inf")
a = 0
b = 0
for i in range(1, N - 2):
    while S[a] < S[i] - S[a + 1]:
        a += 1
    b = i
    while S[b] - S[i] < S[N - 1] - S[b + 1]:
        b += 1

    P = [S[a], S[i] - S[a], S[b] - S[i], S[N - 1] - S[b]]
    num = min(num, abs(max(P) - min(P)))

print(num)
Problem p03311 (Python) — buggy submission, verdict: Runtime Error

N = int(input())
if N == 1:
    print(0)
    exit()
A = [int(i) for i in input().split()]
A = [A[i] - i - 1 for i in range(N)]
A.sort()
if N == 2:
    print(abs(A[0] - A[1]))
    exit()

sum_A = [0, 0]
for i in range(N):
    sum_A[0] += abs(A[i] - A[N // 2])
sum_2 = 0
for i in range(N):
    sum_A[1] += abs(A[i] - A[N // 2 + 1])
print(min(sum_A))


Error: 0

Fixed submission:

N = int(input())
A = [int(i) for i in input().split()]
A = [A[i] - i - 1 for i in range(N)]
A.sort()
# for a in [A[N // 2], A[N // 2 + 1]]:
sum_A = [0, 0]
for i in range(N):
    sum_A[0] += abs(A[i] - A[N // 2])
sum_2 = 0
for i in range(N):
    sum_A[1] += abs(A[i] - A[N // 2 + 1])
print(min(sum_A))
Problem p03313 (Python) — buggy submission, verdict: Runtime Error

n = int(input())
aaa = list(map(int, input().split()))
n2 = 1 << n
dp = [[a, 0] for a in aaa]

for j in range(n):
    b = 1 << j
    for i in range(n2):
        if not i & b:
            dpi, dpk = dp[i], dp[i | b]
            if dpk[0] < dpi[0]:
                dpk[1] = max(dpk[0], dpi[1])
                dpk[0] = dpi[0]
            elif dpk[1] < dpi[0]:
                dpk[1] = dpi[0]

ans = []
tmp = 0
for a in dp[1:]:
    tmp = max(tmp, a[0] + a[1])
    ans.append(tmp)
print(*ans)


Error: TypeError: '>' not supported between instances of 'list' and 'int'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03313/Python/s524712776.py", line 17, in <module>
    tmp = max(tmp, a)
TypeError: '>' not supported between instances of 'list' and 'int'


Fixed submission:

from heapq import nlargest

n = int(input())
aaa = list(map(int, input().split()))
n2 = 1 << n
dp = [[0, a] for a in aaa]

for j in range(n):
    b = 1 << j
    for i in range(n2):
        if not i & b:
            dp[i | b] = nlargest(2, dp[i] + dp[i | b])

ans = []
tmp = 0
for a in dp[1:]:
    tmp = max(tmp, a)
    ans.append(tmp)
print(*ans)
Problem p03316 (Python) — buggy submission, verdict: Runtime Error

N = input()
if int(N) % sum([int(N[i]) for i in range(len(N))]) == 0:
    print("Yes")
else:
    print("No")


Error: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'generator'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03316/Python/s036030936.py", line 2, in <module>
    if int(N) % sum([int(N[i] for i in range(len(N)))]) == 0:
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'generator'


Fixed submission:

N = input()
if int(N) % sum([int(N[i] for i in range(len(N)))]) == 0:
    print("Yes")
else:
    print("No")
Problem p03316 (Python) — buggy submission, verdict: Runtime Error

# Nは最大9桁
n = input()
sn = 0
for ni in n:
    sn += int(ni)
if int(n) % sn == 0:
    print("Yes")
else:
    print("No")


Error: TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03316/Python/s956814127.py", line 6, in <module>
    if n % sn == 0:
TypeError: not all arguments converted during string formatting


Fixed submission:

# Nは最大9桁
n = input()
sn = 0
for ni in n:
    sn += int(ni)
if n % sn == 0:
    print("Yes")
else:
    print("No")
Problem p03316 (Python) — buggy submission, verdict: Runtime Error

N = input()
S = 0
for i in N:
    S += int(i)
print("Yes" if int(N) % S == 0 else "No")


Error: TypeError: not all arguments converted during string formatting
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03316/Python/s175898024.py", line 5, in <module>
    print("Yes" if N % S == 0 else "No")
TypeError: not all arguments converted during string formatting


Fixed submission:

N = input()
S = 0
for i in N:
    S += int(i)
print("Yes" if N % S == 0 else "No")
Problem p03317 (Python) — buggy submission, verdict: Runtime Error

n, k = map(int, input().split())
print(((n - 1) + (k - 2)) // (k - 1))


Error: ValueError: invalid literal for int() with base 10: ' '
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03317/Python/s270349250.py", line 1, in <module>
    n, k = map(int, input())
ValueError: invalid literal for int() with base 10: ' '


Fixed submission:

n, k = map(int, input())
print(((n - 1) + (k - 2)) // (k - 1))
Problem p03319 (Python) — buggy submission, verdict: Runtime Error

n, k = map(int, input().split())
print((n - 2) // (k - 1) + 1)


Error: WA

Fixed submission:

n, k = map(int, input().split())
print((n - 2) // (k - 2) + 1)
Problem p03323 (Python) — buggy submission, verdict: Runtime Error

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

if A > 8 or B > 8:
    print(":(")
else:
    print("Yay!")


Error: ValueError: invalid literal for int() with base 10: '5 4'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03323/Python/s618480523.py", line 1, in <module>
    A = int(input())
ValueError: invalid literal for int() with base 10: '5 4'


Fixed submission:

A = int(input())
B = int(input())

if A > 8 or B > 8:
    print("Yay!")
else:
    print(":(")
Problem p03323 (Python) — buggy submission, verdict: Runtime Error

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

if a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")


Error: ValueError: invalid literal for int() with base 10: '5 4'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03323/Python/s393600205.py", line 1, in <module>
    a = int(input())
ValueError: invalid literal for int() with base 10: '5 4'


Fixed submission:

a = int(input())
b = int(input())

if a >= 9 or b >= 9:
    print(":(")
else:
    print("Yay!")
Problem p03323 (Python) — buggy submission, verdict: Runtime Error

a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")


Error: ValueError: invalid literal for int() with base 10: '5 4'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03323/Python/s102805982.py", line 1, in <module>
    a, b = int(input()), int(input())
ValueError: invalid literal for int() with base 10: '5 4'


Fixed submission:

a, b = int(input()), int(input())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")
Problem p03323 (Python) — buggy submission, verdict: Runtime Error

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

a, b = map(int, input().split())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")


Error: ValueError: invalid literal for int() with base 10: '5 4'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03323/Python/s149144463.py", line 4, in <module>
    a = int(input())
ValueError: invalid literal for int() with base 10: '5 4'


Fixed submission:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

a = int(input())
b = int(input())
if a <= 8 and b <= 8:
    print("Yay!")
else:
    print(":(")
Problem p03323 (Python) — buggy submission, verdict: Runtime Error

# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
A, B = map(int, input().split())

if A <= 8 and B <= 8:
    print("Yay!")
else:
    print(":(")


Error: ValueError: invalid literal for int() with base 10: '5 4'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03323/Python/s032769715.py", line 4, in <module>
    N = int(input())
ValueError: invalid literal for int() with base 10: '5 4'


Fixed submission:

# -*- coding: utf-8 -*-

# スペース区切りの整数の入力
N = int(input())
an = list(map(int, input().split()))

sum_cnt = 0
for a in an:
    tmp = a
    cnt = 0
    while tmp % 2 == 0:
        cnt += 1
        tmp = tmp / 2

    sum_cnt += cnt

print(sum_cnt)