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

# A
from collections import Counter

print(len(Counter([int(i) for i in input().split()])))


Error: ValueError: invalid literal for int() with base 10: '3 1 4'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03962/Python/s782636979.py", line 3, in <module>
    print(len(Counter([int(input()) for i in range(3)])))
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03962/Python/s782636979.py", line 3, in <listcomp>
    print(len(Counter([int(input()) for i in range(3)])))
ValueError: invalid literal for int() with base 10: '3 1 4'


Fixed submission:

from collections import Counter

print(len(Counter([int(input()) for i in range(3)])))
Problem p03962 (Python) — buggy submission, verdict: Runtime Error

print(len(set(input().split())))


Error: TypeError: unhashable type: 'list'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03962/Python/s798226179.py", line 1, in <module>
    print(len({input().split()}))
TypeError: unhashable type: 'list'


Fixed submission:

print(len({input().split()}))
Problem p03962 (Python) — buggy submission, verdict: Runtime Error

n = list(int(x) for x in input().split(" "))

ans = set(n)
print(len(ans))


Error: AttributeError: 'set' object has no attribute 'count'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03962/Python/s857335382.py", line 4, in <module>
    print(ans.count)
AttributeError: 'set' object has no attribute 'count'


Fixed submission:

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

ans = set(n)
print(ans.count)
Problem p03962 (Python) — buggy submission, verdict: Runtime Error

a, b, c = map(int, input().split())
print(len(set([a, b, c])))


Error: TypeError: set expected at most 1 argument, got 3
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03962/Python/s707893021.py", line 2, in <module>
    print(len(set(a, b, c)))
TypeError: set expected at most 1 argument, got 3


Fixed submission:

a, b, c = map(int, input().split())
print(len(set(a, b, c)))
Problem p03962 (Python) — buggy submission, verdict: Runtime Error

from sys import stdin

a = set((int(x) for x in stdin.readline().split()))

print(len(a))


Error: TypeError: map() must have at least two arguments.
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03962/Python/s114624251.py", line 3, in <module>
    a = map((int(x) for x in stdin.readline().split()))
TypeError: map() must have at least two arguments.


Fixed submission:

from sys import stdin

a = map((int(x) for x in stdin.readline().split()))

print(len(a))
Problem p03964 (Python) — buggy submission, verdict: Time Limit Exceeded

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

curr_a, curr_b = 0, 0

for v1, v2 in votes:
    a, b = v1, v2
    i = max(curr_a // v1, curr_b // v2)

    while a < curr_a or b < curr_b:
        a = v1 * i
        b = v2 * i
        i += 1

    curr_a, curr_b = a, b

print(curr_a + curr_b)


Error: TLE

Fixed submission:

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

curr_a, curr_b = 0, 0

for v1, v2 in votes:
    a, b = v1, v2
    i = min(curr_a // v1, curr_b // v2)

    while a < curr_a or b < curr_b:
        a = v1 * i
        b = v2 * i
        i += 1

    curr_a, curr_b = a, b

print(curr_a + curr_b)
Problem p03964 (Python) — buggy submission, verdict: Time Limit Exceeded

from decimal import Decimal
from math import ceil

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

t_voted = a_voted = 1
for t, a in ratio:
    val = max(ceil(Decimal(t_voted) / Decimal(t)), ceil(Decimal(a_voted) / Decimal(a)))
    t_voted = t * val
    a_voted = a * val

print(t_voted + a_voted)


Error: TLE

Fixed submission:

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

t_voted, a_voted = ratio[0][0], ratio[0][1]
for t, a in ratio[1:]:
    tt, aa = t, a
    while tt < t_voted or aa < a_voted:
        tt += t
        aa += a
    t_voted, a_voted = tt, aa

print(t_voted + a_voted)
Problem p03964 (Python) — buggy submission, verdict: Runtime Error

import math

n = int(input())
vote = [0, 0]
# 最初の得票は、最小値を目指すので
# 単純に入力比をそのまま使用
# 各入力に対し、vote[0]<=t*k, vote[1]<=a*kとなる
# 最小のt*k,a*kでvoteを更新
vote = [1, 1]
for i in range(n):
    t, a = [int(i) for i in input().split()]
    if vote[0] % t == 0:
        k = vote[0] // t
    else:
        k = vote[0] // t + 1
    if vote[1] % a == 0:
        k = max(k, vote[1] // a)
    else:
        k = max(k, vote[1] // a + 1)
    # k = max(math.ceil(vote[0] / t), math.ceil(vote[1] / a))
    vote = [t * k, a * k]
    # a / b + (a % b == 0 ? 0: 1)
    # print("i:{} vote:{}".format(i, vote))
print(vote[0] + vote[1])


Error: 0

Fixed submission:

import math

n = int(input())
vote = [0, 0]
# 最初の得票は、最小値を目指すので
# 単純に入力比をそのまま使用
# 各入力に対し、vote[0]<=t*k, vote[1]<=a*kとなる
# 最小のt*k,a*kでvoteを更新
vote = [1, 1]
for i in range(n):
    t, a = [int(i) for i in input().split()]
    k = max(math.ceil(vote[0] / t), math.ceil(vote[1] / a))
    vote = [t * k, a * k]
    if sum(vote) > 10**10:
        t[1000000000] = 1
    # print("i:{} vote:{}".format(i, vote))
print(vote[0] + vote[1])
Problem p03964 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
ta = [tuple(int(x) for x in input().split()) for _ in range(n)]

a = 0
b = 0
for x, y in ta:
    if x >= a and y >= b:
        a = x
        b = y
    else:
        temp = max(a // x, b // y)
        while x * temp < a or y * temp < b:
            temp += 1
        a = x * temp
        b = y * temp

print(a + b)


Error: TLE

Fixed submission:

n = int(input())
ta = [tuple(int(x) for x in input().split()) for _ in range(n)]

a = 0
b = 0
for x, y in ta:
    if x >= a and y >= b:
        a = x
        b = y
    else:
        temp = 2
        while x * temp < a or y * temp < b:
            temp += 1
        a = x * temp
        b = y * temp

print(a + b)
Problem p03966 (Python) — buggy submission, verdict: Time Limit Exceeded

from math import ceil

N = int(input())
T = []
A = []

for _ in range(N):
    t, a = list(map(int, input().split()))
    T.append(t)
    A.append(a)

t_num = T[0]
a_num = A[0]
for i in range(1, N):
    tn = (t_num + T[i] - 1) // T[i]
    an = (a_num + A[i] - 1) // A[i]
    n = max(tn, an)
    t_num = T[i] * n
    a_num = A[i] * n

print(t_num + a_num)


Error: TLE

Fixed submission:

N = int(input())
T = []
A = []

for _ in range(N):
    t, a = list(map(int, input().split()))
    T.append(t)
    A.append(a)

t_num = 1
a_num = 1
for i in range(N):
    # TAは常にn倍ずつ増加していく
    n = 1
    while T[i] * n < t_num or A[i] * n < a_num:
        n += 1
    t_num = T[i] * n
    a_num = A[i] * n

print(t_num + a_num)
Problem p03966 (Python) — buggy submission, verdict: Time Limit Exceeded

a = int(input())
d = e = 0
for i in range(a):
    b, c = map(int, input().split())
    if i == 0:
        d = b
        e = c
    else:
        if d <= b and e <= c:
            d = b
            e = c
        else:
            h = max((b + d - 1) // b, (c + e - 1) // c)
            d = b * h
            e = c * h
print(d + e)


Error: TLE

Fixed submission:

a = int(input())
d = e = 0
for i in range(a):
    b, c = map(int, input().split())
    if i == 0:
        d = b
        e = c
    else:
        f = b
        g = c
        while True:
            if d <= f and e <= g:
                d = f
                e = g
                break
            else:
                f += b
                g += c
print(d + e)
Problem p03971 (Python) — buggy submission, verdict: Time Limit Exceeded

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

# a: 国内の学生
# b: 海外の学生
# c: その他
# i番idxはi位


passes_num = 0  # 通過した人の数
foregin_rank = 1  # 海外の学生の中での順位
thredshould = a + b
for c in s:
    if c == "c":
        print("No")
    elif c == "a":
        if passes_num < thredshould:
            passes_num += 1
            print("Yes")
        else:
            print("No")
    else:
        if passes_num < thredshould and foregin_rank <= b:
            passes_num += 1
            foregin_rank += 1
            print("Yes")
        else:
            print("No")


Error: TLE

Fixed submission:

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

# a: 国内の学生
# b: 海外の学生
# c: その他
# i番idxはi位

# # 海外の学生
# foregin_list = []
# for i, c in enumerate(s):
#     if c == "b":
#         foregin_list.append(i)


passes_num = 0
foregin_list = []
thredshould = a + b
for i, c in enumerate(s):
    if c == "c":
        print("No")
    elif c == "a":
        if passes_num < thredshould:
            passes_num += 1
            print("Yes")
        else:
            print("No")
    else:
        foregin_list.append(i)
        if passes_num < thredshould and foregin_list.index(i) + 1 <= b:
            passes_num += 1
            print("Yes")
        else:
            print("No")
Problem p03971 (Python) — buggy submission, verdict: Runtime Error

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

AB = A + B

count_all = 0
count_abroad = 0
for i in range(N):
    if S[i] == "a" and count_all < AB:
        count_all += 1
        print("Yes")

    elif S[i] == "b" and count_abroad < B and count_all < AB:
        count_all += 1
        count_abroad += 1
        print("Yes")

    else:
        print("No")


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


Fixed submission:

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

HP = []
for p in range(1, 101, 1):
    P = [p] * len(X)
    delta = sum([(i - j) ** 2 for (i, j) in zip(X, P)])
    HP.append(delta)

print(min(HP))
Problem p03971 (Python) — buggy submission, verdict: Time Limit Exceeded

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

answer = 0
b_list = 0
for idx, moji in enumerate(S):
    if moji == "a" and answer < A + B:
        answer += 1
        print("Yes")
        continue
    elif moji == "b":
        b_list += 1
        if answer < A + B and b_list <= B:
            answer += 1
            print("Yes")
            continue
    print("No")


Error: TLE

Fixed submission:

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

answer = [0] * len(S)
b_list = []
for idx, moji in enumerate(S):
    if moji == "a" and sum(answer) < A + B:
        answer[idx] = 1
        print("Yes")
        continue
    elif moji == "b":
        b_list.append(1)
        if sum(answer) < A + B and sum(b_list) <= B:
            answer[idx] = 1
            print("Yes")
            continue
    print("No")
Problem p03986 (Python) — buggy submission, verdict: Time Limit Exceeded

X = input()

ans = ["foo"]
for i in range(len(X)):
    ans.append(X[i])
    if ans[-2] == "S" and ans[-1] == "T":
        ans.pop()
        ans.pop()

print(len(ans) - 1)


Error: TLE

Fixed submission:

X = input()

while X.count("ST"):
    X = X.replace("ST", "")

print(len(X))
Problem p03986 (Python) — buggy submission, verdict: Time Limit Exceeded

X = input()
stack = []
for s in X:
    if s == "S":
        stack.append(s)
    elif s == "T":
        if len(stack) == 0 or stack[-1] == "T":
            stack.append(s)
        else:
            stack.pop(-1)
print(len(stack))


Error: TLE

Fixed submission:

X = input()
X_length = len(X)
change = True
while change:
    X = X.replace("ST", "", 1)
    change = len(X) != X_length
    X_length = len(X)
print(X_length)
Problem p03986 (Python) — buggy submission, verdict: Runtime Error

# coding: utf-8
# Your code here!

X = list(input())
num = len(X)
stack = []

for i in X:
    if i == "S":
        stack.append(i)
    else:
        if stack == [] or stack[-1] == "T":
            stack.append(i)
        else:
            stack.pop()
print(len(stack))


Error: IndexError: list index out of range
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03986/Python/s803491766.py", line 12, in <module>
    if stack[-1] == "T" or stack[0] == "":
IndexError: list index out of range


Fixed submission:

# coding: utf-8
# Your code here!

X = list(input())
num = len(X)
stack = []

for i in X:
    if i == "S":
        stack.append(i)
    else:
        if stack[-1] == "T" or stack[0] == "":
            stack.append(i)
        else:
            stack.pop()
print(len(stack))
Problem p03986 (Python) — buggy submission, verdict: Time Limit Exceeded

_x = input()
x = []
for i in _x:
    x.append(i)
count = 0

# 今まで確認してきたものはスタックに入れる
# スタックの頂上がSで次の入力がTならスタックをポップ
stack = []
i = 0
while i < len(x):
    if len(stack) > 0 and stack[-1] == "S" and x[i] == "T":
        del stack[-1]
    else:
        stack.append(x[i])
    i += 1
print(len(stack))
# print(stack)


Error: TLE

Fixed submission:

_x = input()
x = []
for i in _x:
    x.append(i)
count = 0
i = 0
while i < len(x):
    # print("i:{} x:{}".format(i, x))
    if i < len(x) - 1 and x[i] == "S" and x[i + 1] == "T":
        del x[i]
        del x[i]
        if i > 0:
            i -= 1
        continue
    else:
        count += 1
        i += 1
print(len(x))
Problem p03987 (Python) — buggy submission, verdict: Time Limit Exceeded

import sys
from operator import itemgetter

n, *aaa = map(int, sys.stdin.buffer.read().split())
aaa_with_index = list(enumerate(aaa, start=1))
aaa_with_index.sort(key=itemgetter(1), reverse=True)
left = list(range(-1, n + 1))
right = list(range(1, n + 3))
ans = 0
for i, a in aaa_with_index:
    li = left[i]
    ri = right[i]
    ans += a * (i - li) * (ri - i)
    left[ri] = li
    right[li] = ri

print(ans)


Error: TLE

Fixed submission:

import sys
from operator import itemgetter


class BinaryIndexedTreeCustom:
    def __init__(self, n, init, func):
        self.size = n
        self.tree = [init] * (n + 1)
        self.depth = n.bit_length()
        self.init = init
        self.func = func

    def get(self, i):
        s = self.init
        tr = self.tree
        f = self.func
        while i > 0:
            s = f(s, tr[i])
            i -= i & -i
        return s

    def put(self, i, x):
        n = self.size
        tr = self.tree
        f = self.func
        while i <= n:
            y = tr[i]
            tr[i] = f(tr[i], x)
            if y == tr[i]:
                break
            i += i & -i


n, *aaa = map(int, sys.stdin.buffer.read().split())
bit1 = BinaryIndexedTreeCustom(n, 0, max)
bit2 = BinaryIndexedTreeCustom(n, n + 1, min)
aaa_with_index = list(enumerate(aaa, start=1))
aaa_with_index.sort(key=itemgetter(1))
ans = 0
for i, a in aaa_with_index:
    li = bit1.get(i)
    ri = bit2.get(n - i)
    ans += a * (i - li) * (ri - i)
    bit1.put(i, i)
    bit2.put(n + 1 - i, i)
print(ans)
Problem p03993 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(1, n + 1):
    opp = a[a[i - 1] - 1]
    if i == opp:
        ans += 1
print(ans // 2)


Error: TLE

Fixed submission:

n = int(input())
a = list(map(int, input().split()))
ans = 0
opp_list = []
for i in range(1, n + 1):
    opp = a[a[i - 1] - 1]
    if i == opp and i not in opp_list:
        opp_list.append(a[i - 1])
        ans += 1
print(ans)
Problem p03993 (Python) — buggy submission, verdict: Runtime Error

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

like = {}
ans = 0

for i, r in enumerate(a):
    like[i + 1] = r
    if r in like and like[r] == i + 1:
        ans += 1

print(ans)


Error: TypeError: dict.get() takes no keyword arguments
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03993/Python/s578229972.py", line 9, in <module>
    if like.get(r, default=0) == i:
TypeError: dict.get() takes no keyword arguments


Fixed submission:

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

like = {}
ans = 0

for i, r in enumerate(a):
    like[i] = r
    if like.get(r, default=0) == i:
        ans += 1

print(ans)
Problem p03993 (Python) — buggy submission, verdict: Time Limit Exceeded

size = int(input())

r_str = input().split()

rabs = []
for r in r_str:
    rabs.append(int(r) - 1)

# visited = []
t = 0

for i in range(0, size):
    if rabs[rabs[i]] == i and (not rabs[i] < i):
        # visited.append(i)
        # visited.append(rabs[i])
        t += 1

print(t)


Error: TLE

Fixed submission:

size = int(input())

r_str = input().split()

rabs = []
for r in r_str:
    rabs.append(int(r) - 1)

visited = []
t = 0

for i in range(0, size):
    if rabs[rabs[i]] == i and (i not in visited):
        visited.append(i)
        visited.append(rabs[i])
        t += 1

print(t)
Problem p03993 (Python) — buggy submission, verdict: Runtime Error

N = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
    j = a[i] - 1
    if i < j and a[j] - 1 == i:
        ans += 1
print(ans)


Error: TypeError: 'map' object cannot be interpreted as an integer
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03993/Python/s832397420.py", line 4, in <module>
    for i in range(N):
TypeError: 'map' object cannot be interpreted as an integer


Fixed submission:

N = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
for i in range(N):
    j = a[i] - 1
    if i < j and a[j] - 1 == i:
        ans += 1
print(ans)
Problem p03993 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
a = [int(i) for i in input().split()]

ans = 0
for i in range(n):
    if a[a[i] - 1] == i + 1:
        ans += 1
print(ans // 2)


Error: TLE

Fixed submission:

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

ans = 0
for i in range(n):
    for j in range(i + 1, n):
        if a[i] == j + 1 and a[j] == i + 1:
            ans += 1
print(ans)
Problem p03993 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
a = list(map(int, input().split()))
cnt = 0
for i, tgt in enumerate(a, 1):
    if a[tgt - 1] == i:
        cnt += 1
print(cnt // 2)


Error: TLE

Fixed submission:

from collections import Counter

n = int(input())
a = list(map(int, input().split()))
pair = []
cp = [None]
for i, tgt in enumerate(a):
    cp.clear()
    if a.index(tgt) == i:
        cp = [str(a[i]), str(i + 1)]
        cp.sort()
        cpj = "".join(cp)
        pair.append(cpj)

pcnt = Counter(pair)
pcv = list(pcnt.values())
print(pcv.count(2))
Problem p03994 (Python) — buggy submission, verdict: Time Limit Exceeded

def main():
    s = input()
    K = int(input())
    a = ord("a")
    code = [ord(c) - a for c in s]
    for i in range(len(s)):
        x = (26 - code[i]) % 26
        if x <= K:
            code[i] = 0
            K -= x
    code[-1] = code[-1] + K % 26
    ans = "".join([chr(a + x) for x in code])
    print(ans)


if __name__ == "__main__":
    main()


Error: TLE

Fixed submission:

def main():
    s = input()
    K = int(input())
    a = ord("a")
    code = [ord(c) - a for c in s]
    for i in range(len(s)):
        x = 26 - code[i] % 26
        if x <= K:
            code[i] = 0
            K -= x
    code[-1] = code[-1] + K % 26
    ans = ""
    for x in code:
        ans += chr(a + x)
    print(ans)


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

import sys

sys.setrecursionlimit(10**7)
rl = sys.stdin.readline


def solve():
    s = rl().rstrip()
    K = int(rl())

    ans = []
    for si in s:
        if si == "a":
            ans.append("a")
            continue
        cnt = ord("z") - ord(si) + 1
        if cnt <= K:
            ans.append("a")
            K -= cnt
        else:
            ans.append(si)

    ans[-1] = chr(ord("a") + (ord(ans[-1]) - ord("a") + K % 26) % 26)
    print("".join(ans))


if __name__ == "__main__":
    solve()


Error: TLE

Fixed submission:

alphabet = "abcdefghijklmnopqrstuvwxyz"
a_len = len(alphabet)
table = {c: idx for idx, c in enumerate(alphabet)}

s = input()
k = int(input())

ans = ""
for i in range(len(s[:-1])):
    gap = a_len - table[s[i]]
    if gap <= k:
        ans += "a"
        k -= gap
    elif k == 0:
        ans += s[i:-1]
    else:
        ans += s[i]

ans += alphabet[(table[s[-1]] + k) % a_len]
print(ans)
Problem p03997 (Python) — buggy submission, verdict: Runtime Error

a, b, h = [int(input()) for _ in range(3)]
print(int((a + b) * h / 2))


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/p03997/Python/s114340775.py", line 2, in <module>
    print(int((a + b) * h / 2))
TypeError: can't multiply sequence by non-int of type 'str'


Fixed submission:

a, b, h = [input() for _ in range(3)]
print(int((a + b) * h / 2))
Problem p03997 (Python) — buggy submission, verdict: Runtime Error

a = int(input())
b = int(input())
h = int(input())
print((a + b) * h // 2)


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


Fixed submission:

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

print((a + b) * h / 2)
Problem p03997 (Python) — buggy submission, verdict: Runtime Error

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

area = int((a + b) * h / 2)
print(area)


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


Fixed submission:

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

print((a + b) * h / 2)
Problem p03997 (Python) — buggy submission, verdict: Runtime Error

""" AtCoder """

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

print(int((a + b) * h / 2))


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


Fixed submission:

""" AtCoder """

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

print((a + b) * h / 2)
Problem p03997 (Python) — buggy submission, verdict: Runtime Error

def resolve():
    a = int(input())
    b = int(input())
    h = int(input())
    print((a + b) * h // 2)


if __name__ == "__main__":
    resolve()


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


Fixed submission:

def resolve():
    a, b, h = map(int, input().split())
    print((a + b) * h // 2)


if __name__ == "__main__":
    resolve()