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

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

result = sum(s)

if result % 10 == 0:
    for _ in range(N):
        min_s = min(s)
        if min_s % 10 == 0:
            s.remove(min_s)
        else:
            result -= min_s
            break

    if result % 10 == 0:
        result = 0

print(result)


Error: 0

Fixed submission:

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

result = sum(s)

if result % 10 == 0:
    while True:
        min_s = min(s)
        if min_s % 10 == 0:
            s.remove(min_s)
        else:
            result -= min_s
            break

print(result)
Problem p03699 (Python) — buggy submission, verdict: Time Limit Exceeded

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


def main():
    N = int(input())
    S = [int(input()) for _ in range(N)]

    S.sort()
    result = sum(S)

    if result % 10 == 0:
        for s in S:
            if s % 10:
                print(result - s)
                exit()
    else:
        print(result)
        exit()

    print(0)


if __name__ == "__main__":
    main()


Error: TLE

Fixed submission:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from itertools import combinations


def main():
    N = int(input())
    S = [int(input()) for _ in range(N)]
    result = 0

    for i in range(1, N + 1):
        for c in list(combinations(S, i)):
            tmp = max([0 if sum(c) % 10 == 0 else sum(c)])
            result = max(result, tmp)
    print(result)


if __name__ == "__main__":
    main()
Problem p03699 (Python) — buggy submission, verdict: Runtime Error

N = int(input())
S = sorted([int(input()) for _ in range(N)])
s = sum(S)
if s % 10 != 0:
    print(s)
    exit()

for si in S:
    if si % 10 != 0:
        print(s - si)
        exit()

print(0)


Error: TypeError: 'list' object cannot be interpreted as an integer
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03699/Python/s560177525.py", line 8, in <module>
    for si in range(S):
TypeError: 'list' object cannot be interpreted as an integer


Fixed submission:

N = int(input())
S = sorted([int(input()) for _ in range(N)])
s = sum(S)
if s % 10 != 0:
    print(s)
    exit()

for si in range(S):
    if si % 10 != 0:
        print(s - si)
        exit()

print(0)
Problem p03700 (Python) — buggy submission, verdict: Time Limit Exceeded

n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

left = 0
right = 10**10
mid = (left + right) // 2
while right - left > 1:
    mid = (left + right) // 2
    count = 0
    for i in range(n):
        if h[i] - mid * b > 0:
            if (h[i] - mid * b) % (a - b) == 0:
                count += (h[i] - mid * b) // (a - b)
            else:
                count += (h[i] - mid * b) // (a - b) + 1
    if mid - count >= 0:
        right = mid
    else:
        left = mid
print(right)


Error: TLE

Fixed submission:

n, a, b = map(int, input().split())
h = [int(input()) for i in range(n)]

left = 0
right = 10**9
mid = (left + right) // 2
while right - left > 1:
    mid = (left + right) // 2
    count = 0
    for i in range(n):
        if h[i] - mid * b > 0:
            if (h[i] - mid * b) % (a - b) == 0:
                count += (h[i] - mid * b) // (a - b)
            else:
                count += (h[i] - mid * b) // (a - b) + 1
    if mid - count >= 0:
        right = mid
    else:
        left = mid
print(right)
Problem p03703 (Python) — buggy submission, verdict: Runtime Error

import sys

import numpy as np


class Bit:
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)

    def sum(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s

    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i


n, k = map(int, input().split())
aaa = np.fromiter(sys.stdin, dtype=np.int64)
aaa = np.insert(aaa, 0, 0)
acc = np.add.accumulate(aaa) - np.arange(0, k * n + 1, k)
dct = {v: i for i, v in enumerate(np.unique(acc), start=1)}
bit = Bit(len(dct))
ans = 0
for d in acc:
    i = dct[d]
    ans += bit.sum(i)
    bit.add(i, 1)
print(ans)


Error: TLE

Fixed submission:

import sys

import numpy as np


class Bit:
    def __init__(self, n):
        self.size = n
        self.tree = [0] * (n + 1)

    def sum(self, i):
        s = 0
        while i > 0:
            s += self.tree[i]
            i -= i & -i
        return s

    def add(self, i, x):
        while i <= self.size:
            self.tree[i] += x
            i += i & -i


n, k = map(int, input().split())
aaa = np.fromiter(sys.stdin, dtype=np.int64)
aaa = np.insert(aaa, 0, 0)
acc = np.add.accumulate(aaa) - np.arange(0, k * n + 1, k)
dct = {v: i for i, v in enumerate(np.unique(acc), start=1)}
bit = Bit(n)
ans = 0
for d in acc:
    i = dct[d]
    ans += bit.sum(i)
    bit.add(i, 1)
print(ans)
Problem p03705 (Python) — buggy submission, verdict: Runtime Error

def main(n: int, a: int, b: int):
    if a > b:
        print(0)
        return

    if n == 1:
        if a == b:
            print(1)
        else:
            print(0)
        return

    if n == 2:
        if a > b:
            print(0)
        else:
            print(1)
        return

    print((n - 2) * (b - a) + 1)


if __name__ == "__main__":
    n, a, b = map(int, input().split())

    main(n, a, b)


Error: 0

Fixed submission:

from itertools import combinations


def main(n: int, a: int, b: int):

    if a > b:
        print(0)
        return
    elif a == b:
        print(1)
        return

    if n < 3:
        if n == 1:
            print(0)
        elif n == 2:
            print(2)

        return

    ans = 2
    ans += sum(1 for _ in combinations(range(a, b + 1), n - 2))

    print(ans)


if __name__ == "__main__":
    n, a, b = map(int, input().split())

    main(n, a, b)
Problem p03711 (Python) — buggy submission, verdict: Runtime Error

L = [0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]

x, y = map(int, input().split())

print(["No", "Yes"][L[x] == L[y]])


Error: TypeError: 'list' object is not callable
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03711/Python/s276766245.py", line 5, in <module>
    if L(x) == L(y):
TypeError: 'list' object is not callable


Fixed submission:

L = [0, 0, 2, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0]

x, y = map(int, input().split())

if L(x) == L(y):
    print("Yes")
else:
    print("No")
Problem p03711 (Python) — buggy submission, verdict: Runtime Error

group1 = [1, 3, 5, 7, 8, 10, 12]
group2 = [4, 6, 9, 11]
group3 = [2]

input = list(map(int, input().split()))
input_x = int(input[0])
input_y = int(input[1])

exist_group1 = group1.count(input_x) + group1.count(input_y)
exist_group2 = group2.count(input_x) + group2.count(input_y)
exist_group3 = group3.count(input_x) + group3.count(input_y)

if exist_group1 == 2 or exist_group2 == 2 or exist_group3 == 2:
    print("Yes")
else:
    print("No")


Error: IndexError: list index out of range
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03711/Python/s235468671.py", line 7, in <module>
    input_x = int(sys.argv[1])
IndexError: list index out of range


Fixed submission:

import sys

group1 = [1, 3, 5, 7, 8, 10, 12]
group2 = [4, 6, 9, 11]
group3 = [2]

input_x = int(sys.argv[1])
input_y = int(sys.argv[2])

exist_group1 = group1.count(input_x) + group1.count(input_y)
exist_group2 = group2.count(input_x) + group2.count(input_y)
exist_group3 = group3.count(input_x) + group3.count(input_y)

if exist_group1 == 2 or exist_group2 == 2 or exist_group3 == 2:
    print("Yes")
else:
    print("No")
Problem p03716 (Python) — buggy submission, verdict: Time Limit Exceeded

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

import heapq

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

fh_sum = 0
fh = []
sh_sum = 0
sh = []
for i in range(n):
    heapq.heappush(fh, a[i])
    fh_sum += a[i]
    heapq.heappush(sh, -a[-(i + 1)])
    sh_sum += a[-(i + 1)]

fh_sums = [fh_sum]
sh_sums = [sh_sum]
for k in range(n, 2 * n):
    fh_sum += a[k]
    heapq.heappush(fh, a[k])
    fh_sum -= heapq.heappop(fh)
    fh_sums.append(fh_sum)
    sh_sum += a[-(k + 1)]
    heapq.heappush(sh, -a[-(k + 1)])
    sh_sum += heapq.heappop(sh)
    sh_sums.append(sh_sum)

sh_sums = sh_sums[::-1]

ans = -float("inf")
for fh_sum, sh_sum in zip(fh_sums, sh_sums):
    score = fh_sum - sh_sum
    ans = max(ans, score)

print(ans)


Error: TLE

Fixed submission:

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

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

ans = -float("inf")
for i in range(n, 2 * n + 1):
    fh = a[:i].copy()
    fh.sort(reverse=True)
    sh = a[i:].copy()
    sh.sort()
    score = sum(fh[:n]) - sum(sh[:n])
    ans = max(ans, score)

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

a, b, c = map(int, input().split())
if a <= c <= b:
    print("Yes")
else:
    print("No")


Error: TypeError: 'builtin_function_or_method' object is not iterable
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03719/Python/s664562435.py", line 1, in <module>
    a, b, c = map(int, input().split)
TypeError: 'builtin_function_or_method' object is not iterable


Fixed submission:

a, b, c = map(int, input().split)
if a <= c <= b:
    print("Yes")
else:
    print("No")
Problem p03719 (Python) — buggy submission, verdict: Runtime Error

A, B, C = map(int, input().split())
if A <= C and C <= B:
    print("Yes")
else:
    print("No")


Error: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03719/Python/s169732825.py", line 1, in <module>
    A, B, C = int(input().split())
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'


Fixed submission:

A, B, C = int(input().split())
if A <= C and C <= B:
    print("Yes")
else:
    print("No")
Problem p03720 (Python) — buggy submission, verdict: Runtime Error

N, M = map(int, input().split())
road = [0] * N

for _ in range(M):
    a, b = [int(i) for i in input().split()]
    road[a - 1] += 1
    road[b - 1] += 1
for r in road:
    print(r)


Error: EOFError: EOF when reading a line
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03720/Python/s740453725.py", line 5, in <module>
    a, b = [int(i) for i in input().split()]
EOFError: EOF when reading a line


Fixed submission:

N, M = map(int, input().split())
road = [0] * N

for _ in range(N):
    a, b = [int(i) for i in input().split()]
    road[a - 1] += 1
    road[b - 1] += 1
for r in road:
    print(r)
Problem p03720 (Python) — buggy submission, verdict: Runtime Error

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]

cnt = [0] * n

for i in range(m):
    cnt[ab[i][0] - 1] += 1
    cnt[ab[i][1] - 1] += 1

for i in range(n):
    print(cnt[i])


Error: TypeError: 'list' object is not callable
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03720/Python/s115921394.py", line 11, in <module>
    print(cnt(i))
TypeError: 'list' object is not callable


Fixed submission:

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(m)]

cnt = [0] * n

for i in range(m):
    cnt[ab[i][0] - 1] += 1
    cnt[ab[i][1] - 1] += 1

for i in range(n):
    print(cnt(i))
Problem p03721 (Python) — buggy submission, verdict: Runtime Error

n, k = [int(i) for i in input().split()]
cnt = [0] * int(10e5)
for i in range(n):
    a, b = [int(i) for i in input().split()]
    cnt[a] += b

for i in range(1, len(cnt)):
    if k <= cnt[i]:
        print(i)
        break
    k -= cnt[i]


Error: 0

Fixed submission:

n, k = [int(i) for i in input().split()]
d = {}
for i in range(n):
    a, b = [int(i) for i in input().split()]
    if a in d:
        d[a] += b
    else:
        d[a] = b
c = []
for k, v in sorted(d.items(), key=lambda x: x[0]):
    c += [k] * v
print(c[k])
Problem p03721 (Python) — buggy submission, verdict: Time Limit Exceeded

from collections import Counter

N, K = map(int, input().split())
c = Counter()
for _ in range(N):
    a, b = map(int, input().split())
    c[a] += b
for item in sorted(c.items(), key=lambda x: x[0]):
    if item[1] >= K:
        print(item[0])
        break
    else:
        K -= item[1]


Error: TLE

Fixed submission:

N, K = map(int, input().split())
array = []
for _ in range(N):
    a, b = map(int, input().split())
    array.extend([a] * b)
array.sort()
print(array[K - 1])
Problem p03723 (Python) — buggy submission, verdict: Time Limit Exceeded

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


def F(a, b, c):
    if a % 2 == 1 or b % 2 == 1 or c % 2 == 1:
        return 0
    if a == b == c:
        return -1
    return F((a + b) // 2, (b + c) // 2, (c + a) // 2) + 1


print(F(A, B, C))


Error: TLE

Fixed submission:

import sys

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

if (A / 2) % 2 == 1 and (B / 2) % 2 == 1 and (C / 2) % 2 == 1:
    print(-1)
    sys.exit()

cnt = 0
while A % 2 == 0 and B % 2 == 0 and C % 2 == 0:
    a = B // 2 + C // 2
    b = A // 2 + C // 2
    c = A // 2 + B // 2
    A = a
    B = b
    C = c
    cnt += 1
print(cnt)
Problem p03723 (Python) — buggy submission, verdict: Runtime Error

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

while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b == c:
        print(-1)
        exit()
    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
    ans += 1
print(ans)


Error: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03723/Python/s722350702.py", line 1, in <module>
    a, b, c = map(int(input().split()))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'


Fixed submission:

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

while a % 2 == 0 and b % 2 == 0 and c % 2 == 0:
    if a == b == c:
        print(-1)
        exit()
    a, b, c = (b + c) // 2, (c + a) // 2, (a + b) // 2
    ans += 1
print(ans)
Problem p03724 (Python) — buggy submission, verdict: Runtime Error

import sys

input = sys.stdin.readline


def main():
    N, M = map(int, input().split())
    count = [0] * (N + 1)
    for _ in range(M):
        a, b = map(int, input().split())
        count[a] += 1
        count[b] += 1

    if all(c % 2 == 0 for c in count):
        ans = "YES"
    else:
        ans = "NO"
    print(ans)


if __name__ == "__main__":
    main()


Error: 0

Fixed submission:

import sys

input = sys.stdin.readline


def main():
    N, M = map(int, input().split())
    count = [0] * (N + 1)
    for _ in range(N):
        a, b = map(int, input().split())
        count[a] += 1
        count[b] += 1

    if all(c % 2 == 0 for c in count):
        ans = "YES"
    else:
        ans = "NO"
    print(ans)


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

N, M = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(M)]

count = [0 for i in range(N)]

# for aibi in ab:
#     ai = aibi[0]
#     bi = aibi[1]
#
#     if bi < ai:
#         tmp = ai
#         ai = bi
#         bi = tmp
#
#     for j in range(ai - 1, bi - 1):
#         count[j] += 1

for aibi in ab:
    ai = aibi[0]
    bi = aibi[1]
    if ai != 1 and bi != 1:
        count[ai - 1] += 1
        count[bi - 1] += 1
    else:
        if ai == 1:
            count[bi - 1] += 1
        else:
            count[ai - 1] += 1

yes_or_no = True
for num in count:
    if num % 2 == 1:
        yes_or_no = False

if yes_or_no:
    print("YES")
else:
    print("NO")


Error: TLE

Fixed submission:

N, M = list(map(int, input().split()))
ab = [list(map(int, input().split())) for i in range(M)]

count = [0 for i in range(N)]

for aibi in ab:
    ai = aibi[0]
    bi = aibi[1]

    if bi < ai:
        tmp = ai
        ai = bi
        bi = tmp

    for j in range(ai - 1, bi - 1):
        count[j] += 1

yes_or_no = True
for num in count:
    if num % 2 == 1:
        yes_or_no = False

if yes_or_no:
    print("YES")
else:
    print("NO")
Problem p03724 (Python) — buggy submission, verdict: Time Limit Exceeded

from collections import Counter

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

ctr = Counter()
for a, b in X:
    ctr[a] += 1
    ctr[b] += 1

if all(v % 2 == 0 for v in ctr.values()):
    print("YES")
else:
    print("NO")


Error: TLE

Fixed submission:

from collections import Counter

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

ctr = Counter(sum(X, []))
if all(v % 2 == 0 for v in ctr.values()):
    print("YES")
else:
    print("NO")
Problem p03725 (Python) — buggy submission, verdict: Time Limit Exceeded

from collections import deque

INF = float("inf")

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

Si, Sj = (0, 0)
for i, a in enumerate(A):
    if "S" in a:
        Si, Sj = (i, a.index("S"))
        A[Si][Sj] = "c"
        break

distance = INF

Q = deque([(0, Si, Sj)])
while Q:
    cnt, i, j = Q.popleft()

    distance = min(distance, i, j, H - i - 1, W - j - 1)

    if cnt >= K:
        continue

    for ni, nj in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):
        if 0 <= ni < H and 0 <= nj < W and A[ni][nj] == ".":
            A[ni][nj] = "c"
            Q.append((cnt + 1, ni, nj))

print(-(-distance // K) + 1)


Error: TLE

Fixed submission:

from collections import deque

INF = float("inf")

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

Si, Sj = (0, 0)
for i, a in enumerate(A):
    if "S" in a:
        Si, Sj = (i, a.index("S"))
        A[Si][Sj] = "."
        break

distance = INF

Q = deque([(0, Si, Sj)])
while Q:
    cnt, i, j = Q.popleft()

    if A[i][j] == "#":
        continue
    A[i][j] = "#"

    distance = min(distance, i, j, H - i - 1, W - j - 1)

    if cnt >= K:
        continue

    for ni, nj in ((i + 1, j), (i, j + 1), (i - 1, j), (i, j - 1)):
        if 0 <= ni < H and 0 <= nj < W and A[ni][nj] == ".":
            Q.append((cnt + 1, ni, nj))

print(-(-distance // K) + 1)
Problem p03729 (Python) — buggy submission, verdict: Runtime Error

A, B, C = input().split()

if A[-1] == B[0] and B[-1] == C[0]:
    print("YES")
else:
    print("NO")


Error: ValueError: invalid literal for int() with base 10: 'rng'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03729/Python/s355598557.py", line 1, in <module>
    A, B, C = map(int, input().split())
ValueError: invalid literal for int() with base 10: 'rng'


Fixed submission:

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

if A[-1] == B[0] and B[-1] == C[0]:
    print("Yes")
else:
    print("No")
Problem p03730 (Python) — buggy submission, verdict: Runtime Error

import fractions

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

gcd = fractions.gcd(A, B)
if C % gcd == 0:
    print("YES")
else:
    print("NO")


Error: 0

Fixed submission:

import math

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

gcd = math.gcd(A, B)
if C % gcd == 0:
    print("YES")
else:
    print("NO")
Problem p03730 (Python) — buggy submission, verdict: Runtime Error

from fractions import gcd

A, B, C = map(int, open(0).read().split())

if C % gcd(A, B) == 0:
    print("YES")
else:
    print("NO")


Error: 0

Fixed submission:

from math import gcd

A, B, C = map(int, open(0).read().split())

if C % gcd(A, B) == 0:
    print("YES")
else:
    print("NO")
Problem p03732 (Python) — buggy submission, verdict: Runtime Error

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

w0 = X[0][0]
ctr = [[] for _ in range(4)]
for w, v in X:
    ctr[w - w0].append(v)

for n in range(4):
    values = sorted(ctr[n], reverse=True)
    s = [0] * (len(values) + 1)
    for i in range(len(values)):
        s[i + 1] = s[i] + values[i]
    ctr[n] = s

ans = 0
for i in range(len(ctr[0])):
    for j in range(len(ctr[1])):
        for k in range(len(ctr[2])):
            for l in range(len(ctr[3])):
                tmp = ctr[0][i] + ctr[1][j] + ctr[2][k] + ctr[3][l]
                w = w0 * i + (w0 + 1) * j + (w0 + 2) * k + (w0 + 3) * l
                if w <= W:
                    ans = max(ans, tmp)

print(ans)


Error: 0

Fixed submission:

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

dp = [[0] * (W + 1) for _ in range(N + 1)]
dp[0][0] = 0
for i in range(N):
    for j in range(W + 1):
        if j < X[i][0]:
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i + 1][j] = max(dp[i][j], dp[i][j - X[i][0]] + X[i][1])

print(dp[-1][-1])
Problem p03734 (Python) — buggy submission, verdict: Runtime Error

#!/usr/bin/env python3


def rec(i, j):
    if (i, j) in dp:
        return dp[(i, j)]

    if i == N:
        res = 0
    elif j < w[i]:
        res = rec(i + 1, j)
    else:
        res = max(rec(i + 1, j), rec(i + 1, j - w[i]) + v[i])

    dp[(i, j)] = res
    return res


N, W = map(int, input().split())
w = [0] * N
v = [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = {}
print(rec(0, W))


Error: 0

Fixed submission:

#!/usr/bin/env python3

N, W = map(int, input().split())
w = [0] * N
v = [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())

dp = [[0] * (W + 1) for i in range(N + 1)]
for i in range(N):
    for j in range(W + 1):
        if j < w[i]:
            dp[i + 1][j] = dp[i][j]
        else:
            dp[i + 1][j] = max(dp[i][j], dp[i][j - w[i]] + v[i])

print(dp[N][W])
Problem p03737 (Python) — buggy submission, verdict: Runtime Error

s1, s2, s3 = input().split()
print(str.upper(s1[0] + s2[0] + s3[0]))


Error: EOFError: EOF when reading a line
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03737/Python/s377862248.py", line 1, in <module>
    print(str.upper(input()[0]) + str.upper(input()[0]) + str.upper(input()[0]))
EOFError: EOF when reading a line


Fixed submission:

print(str.upper(input()[0]) + str.upper(input()[0]) + str.upper(input()[0]))
Problem p03738 (Python) — buggy submission, verdict: Runtime Error

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

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")


Error: ValueError: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03738/Python/s948998796.py", line 1, in <module>
    a, b = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)


Fixed submission:

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

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
else:
    print("EQUAL")
Problem p03738 (Python) — buggy submission, verdict: Runtime Error

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

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
elif a == b:
    print("EQUAL")


Error: ValueError: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03738/Python/s534142813.py", line 1, in <module>
    a, b = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)


Fixed submission:

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

if a > b:
    print("GREATER")
elif a < b:
    print("LESS")
elif a == b:
    print("EQUAL")
Problem p03738 (Python) — buggy submission, verdict: Runtime Error

a, b = [int(input()) for _ in range(2)]
print("GREATER" if a > b else "LESS" if a < b else "EQUAL")


Error: ValueError: not enough values to unpack (expected 2, got 1)
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03738/Python/s914975918.py", line 1, in <module>
    a, b = map(int, input().split())
ValueError: not enough values to unpack (expected 2, got 1)


Fixed submission:

a, b = map(int, input().split())
print("GREATER" if a > b else "LESS" if a < b else "EQUAL")