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

num = [int(input()) for i in range(10)]
num.sort(reverse=True)
for i in range(3):
    print(num[i])


Error: TypeError: 'type' object is not subscriptable
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00001/Python/s016107060.py", line 3, in <module>
    for i in range[0:3]:
TypeError: 'type' object is not subscriptable


Fixed submission:

num = [int(input()) for i in range(10)]
num.sort(reverse=True)
for i in range[0:3]:
    print(num[i])
Problem p00002 (Python) — buggy submission, verdict: Runtime Error

while True:
    try:
        a, b = map(int, input().split(" "))
        print(len(str(a + b)))
    except:
        break


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


Fixed submission:

while True:
    try:
        a = int(input())
        b = int(input())
        print(len(str(a + b)))
    except EOFError:
        break
Problem p00006 (Python) — buggy submission, verdict: Runtime Error

print(input()[::-1])


Error: TypeError: 'builtin_function_or_method' object is not subscriptable
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00006/Python/s441661847.py", line 1, in <module>
    print(input[::-1])
TypeError: 'builtin_function_or_method' object is not subscriptable


Fixed submission:

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

print(*sorted(map(int, input().split()))[::-1])


Error: AttributeError: 'str' object has no attribute 'spilt'. Did you mean: 'split'?
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00018/Python/s371735785.py", line 1, in <module>
    print(*sorted(map(int, input().spilt()))[::-1])
AttributeError: 'str' object has no attribute 'spilt'. Did you mean: 'split'?


Fixed submission:

print(*sorted(map(int, input().spilt()))[::-1])
Problem p00208 (Python) — buggy submission, verdict: Runtime Error

def ge(arr):
    for i in range(len(arr)):
        tmp = int(arr[i])
        if tmp >= 4:
            tmp += 1
        if tmp >= 6:
            tmp += 1
        arr[i] = str(tmp)
    return arr


while True:
    n = int(input())
    if n == 0:
        break
    print("".join(ge(list(oct(n))[2:])))


Error: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p00208/Python/s656682715.py", line 12, in <module>
    n = int(input)
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'builtin_function_or_method'


Fixed submission:

def ge(arr):
    for i in range(len(arr)):
        tmp = int(arr[i])
        if tmp >= 4:
            tmp += 1
        if tmp >= 6:
            tmp += 1
        arr[i] = str(tmp)


while True:
    n = int(input)
    if n == 0:
        break
    print("".join(ge(list(oct(n))[2:])))
Problem p00481 (Python) — buggy submission, verdict: Runtime Error

import copy

(h, w, n) = list(map(int, input().split()))
dis = [[] for i in range(n + 1)]


def setArr(ph):
    global dis
    res = [False for i in range(w + 2)]
    for i, x in enumerate(list(input())):
        if x == "X":
            continue
        res[i + 1] = True
        if x == ".":
            continue
        if x == "S":
            dis[0] = [ph, i + 1]
            continue
        dis[int(x)] = [ph, i + 1]
    return res


arr = [[] for i in range(h + 2)]
arr[0] = [False for i in range(w + 2)]
arr[-1] = [False for i in range(w + 2)]
for i in range(1, h + 1):
    arr[i] = setArr(i)

res = 0
move = [[1, 0], [0, 1], [-1, 0], [0, -1]]


def ze(start, goal):
    arra = copy.deepcopy(arr)
    global res
    queue = [start, [-1, -1]]
    ap = queue.append
    zu = False
    for q in queue:
        if q[0] < 1:
            res += 1
            ap([-1, -1])
            continue
        if not arra[q[0]][q[1]]:
            continue
        for m in move:
            de = [q[0] + m[0], q[1] + m[1]]

            if de == goal:
                res += 1
                zu = True
                break
            if arra[de[0]][de[1]]:
                ap(de)
        if zu:
            break
        arra[q[0]][q[1]] = False


for i in range(n):
    ze(dis[i], dis[i + 1])

print(res)


Error: 0

Fixed submission:

import copy

(h, w, n) = list(map(int, input().split()))
dis = [[] for i in range(n + 1)]


def setArr(ph):
    global dis
    res = [False for i in range(w + 2)]
    for i, x in enumerate(list(input())):
        if x == "X":
            continue
        res[i + 1] = True
        if x == ".":
            continue
        if x == "S":
            dis[0] = [ph, i + 1]
            continue
        dis[int(x)] = [ph, i + 1]
    return res


arr = [[] for i in range(h + 2)]
arr[0] = [False for i in range(h + 2)]
arr[-1] = [False for i in range(h + 2)]
for i in range(1, h + 1):
    arr[i] = setArr(i)
res = 0
move = [[1, 0], [0, 1], [-1, 0], [0, -1]]


def ze(start, goal):
    arra = copy.deepcopy(arr)
    global res
    queue = [start, [-1, -1]]
    ap = queue.append
    zu = False
    for q in queue:
        if q[0] < 0:
            res += 1
            ap([-1, -1])
            continue
        if not arra[q[0]][q[1]]:
            continue
        for m in move:
            de = [q[0] + m[0], q[1] + m[1]]
            if de == goal:
                res += 1
                zu = True
                break
            if arra[de[0]][de[1]]:
                ap(de)
        if zu:
            break
        arra[q[0]][q[1]] = False


for i in range(n):
    ze(dis[i], dis[i + 1])

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

acute, right, obtuse = 0, 0, 0
while True:
    a, b, c = sorted(map(int, input().split()))
    if a + b <= c:
        print(acute + right + obtuse, right, acute, obtuse)
        break
    d = a**2 + b**2
    e = c**2
    if d == e:
        right += 1
    elif d < e:
        obtuse += 1
    else:
        acute += 1


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


Fixed submission:

result = [0] * 3
while 1:
    a, b, c = sorted(list(map(int, input().split())))
    if a + b > c:
        flag = c * c - b * b - a * a
        if flag == 0:
            result[0] += 1
        elif flag > 0:
            result[1] += 1
        else:
            result[2] += 1
print(sum(result), *result)
Problem p00559 (Python) — buggy submission, verdict: Time Limit Exceeded

n, q, s, t = map(int, input().split())
a = [int(input()) for _ in range(n + 1)]
for i in range(1, n + 1)[::-1]:
    a[i] -= a[i - 1]
count = 0
for i in range(n + 1):
    count -= a[i] * s if a[i] > 0 else a[i] * t
for _ in range(q):
    l, r, x = map(int, input().split())
    count += a[l] * s if a[l] > 0 else a[l] * t
    a[l] += x
    count -= a[l] * s if a[l] > 0 else a[l] * t
    if r < n:
        count += a[r + 1] * s if a[r + 1] > 0 else a[r + 1] * t
        a[r + 1] -= x
        count -= a[r + 1] * s if a[r + 1] > 0 else a[r + 1] * t
    print(count)


Error: TLE

Fixed submission:

n, q, s, t = map(int, input().split())
a = [int(input()) for _ in range(n + 1)]
for _ in range(q):
    l, r, x = map(int, input().split())
    for i in range(l, r + 1):
        a[i] += x
    temp = 0
    for i in range(1, n + 1):
        temp += (a[i - 1] - a[i]) * s if a[i] > a[i - 1] else (a[i - 1] - a[i]) * t
    print(temp)
Problem p00586 (Python) — buggy submission, verdict: Time Limit Exceeded

import sys

for line in sys.stdin:
    if line == None or line == "/n":
        break
    a, b = line.split(" ")
    print(int(a) + int(b))


Error: TLE

Fixed submission:

x = input()
while x:
    a, b = x.split(" ")
    print(int(a) + int(b))
Problem p00705 (Python) — buggy submission, verdict: Runtime Error

import collections

while True:
    N, Q = map(int, input().split())
    if N == 0 and Q == 0:
        break
    D = []
    for _ in range(N):
        i = list(map(int, input().split()))
        del i[0]
        [D.append(ii) for ii in i]
    if not len(D) == 0:
        c = collections.Counter(D)
        cc = c.most_common()
        # print(cc)
        if cc[0][1] >= Q:
            ans = 1000000
            tmp = cc[0][1]
            for i in range(len(cc)):
                if cc[i][1] == tmp:
                    ans = min(cc[i][0], ans)
            print(ans)
        else:
            print(0)
    else:
        print(0)


Error: 0

Fixed submission:

import collections

while True:
    N, Q = map(int, input().split())
    if N == 0 and Q == 0:
        break
    D = []
    for _ in range(N):
        i = list(map(int, input().split()))
        del i[0]
        [D.append(ii) for ii in i]
    c = collections.Counter(D)
    cc = c.most_common()
    if cc[0][1] >= Q:
        print(cc[0][0])
    else:
        print(0)
Problem p01140 (Python) — buggy submission, verdict: Runtime Error

while True:
    n, m = map(int, input().split())
    if n == 0 and m == 0:
        break
    h = [0]
    for i in range(n):
        h.append(int(input()) + h[i])
    w = [0]
    for i in range(m):
        w.append(int(input()) + w[i])

    hDict = {}
    for i in range(n + 1):
        for j in range(i, n + 1):
            if i == j:
                continue
            else:
                diff = abs(h[i] - h[j])
                if diff in hDict:
                    hDict[diff] += 1
                else:
                    hDict[diff] = 1
    wDict = {}
    for i in range(m + 1):
        for j in range(i, m + 1):
            if i == j:
                continue
            else:
                diff = abs(w[i] - w[j])
                if diff in wDict:
                    wDict[diff] += 1
                else:
                    wDict[diff] = 1

    ans = 0
    for diff in hDict.keys():
        if diff in wDict:
            ans += hDict[diff] * wDict[diff]
    print(ans)


Error: 0

Fixed submission:

while True:
    n, m = map(int, input().split())
    if n == 0 and m == 0:
        break
    h = [0]
    for i in range(n):
        h.append(int(input()) + h[i])
    w = [0]
    for i in range(m):
        w.append(int(input()) + w[i])

    hList = [0] * 1000
    for i in range(n + 1):
        for j in range(i, n + 1):
            if i == j:
                continue
            else:
                hList[abs(h[i] - h[j])] += 1
    wList = [0] * 1000
    for i in range(m + 1):
        for j in range(i, m + 1):
            if i == j:
                continue
            else:
                wList[abs(w[i] - w[j])] += 1

    squareList = []
    for i in range(1000):
        squareList.append(hList[i] * wList[i])
    print(sum(squareList))
Problem p01227 (Python) — buggy submission, verdict: Runtime Error

for i in range(int(input())):
    t, k = map(int, input().split())
    d = list(map(int, input().split()))
    d = sorted([d[i + 1] - d[i] for i in range(t - 1)])
    print(sum(d[: t - k]) if t > k else 0)


Error: 0

Fixed submission:

for i in range(int(input())):
    n, k = map(int, input().split())
    d = list(map(int, input().split()))
    if k >= n:
        print(0)
    elif k == 1:
        d.sort()
        print(d[-1] - d[0])
    else:
        k = [0] * (k - 1)
        d.sort()
        for i in range(1, n):
            if d[i] - d[i - 1] > k[0]:
                k[0] = d[i] - d[i - 1]
                k.sort()
        print(d[-1] - d[0] - sum(k))
Problem p01981 (Python) — buggy submission, verdict: Runtime Error

while True:
    a = list(map(str, input().split()))
    if a[0] == "#":
        break
    elif int(a[1]) <= 30:
        print(" ".join(a))
    elif int(a[1]) == 31 and int(a[2]) <= 4:
        print(" ".join(a))
    else:
        a[0] = "?"
        s = int(a[1])
        s -= 30
        a[1] = str(s)
        print(" ".join(a))


Error: IndexError: list index out of range
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p01981/Python/s158524109.py", line 5, in <module>
    elif int(a[1]) <= 30:
IndexError: list index out of range


Fixed submission:

while True:
    a = list(map(str, input().split()))
    if a[0] == "0":
        break
    elif int(a[1]) <= 30:
        print(" ".join(a))
    elif int(a[1]) == 31 and int(a[2]) <= 4:
        print(" ".join(a))
    else:
        a[0] = "?"
        s = int(a[1])
        s -= 30
        a[1] = str(s)
        print(" ".join(a))
Problem p02099 (Python) — buggy submission, verdict: Time Limit Exceeded

import bisect

n = int(input())
a = [float(input()) for _ in range(n)]
b = sorted(a)
for i in range(n):
    x = bisect.bisect_left(b, a[i])
    y = bisect.bisect_right(b, a[i])
    print(x * 2 + y - 1)


Error: TLE

Fixed submission:

n = int(input())
a = [float(input()) for _ in range(n)]
b = sorted(a)
for i in range(n):
    print(b.index(a[i]) * 3 + b.count(a[i]) - 1)
Problem p02235 (Python) — buggy submission, verdict: Time Limit Exceeded

def lcs(x, y):
    a = len(x)
    b = len(y)
    c1 = [0] * (b + 1)
    for i in range(a):
        e1 = x[i]
        c2 = c1[:]
        for j in range(b):
            if e1 == y[j]:
                c1[j + 1] = c2[j] + 1
            elif c1[j + 1] < c1[j]:
                c1[j + 1] = c1[j]
    return c1[-1]


n = int(input().rstrip())
ret = []
for i in range(n):
    s1 = input().rstrip()
    s2 = input().rstrip()
    ret.append(lcs(s1, s2))
print(*ret, sep="\\n")


Error: TLE

Fixed submission:

q = int(input())
for _ in range(q):
    x = input()
    y = input()
    m = len(x)
    n = len(y)
    c = [0] * (n + 1)
    for i in range(m):
        tmp = x[i]
        c_ = c[:]
        for j in range(n):
            if tmp == y[j]:
                c[j + 1] = c_[j] + 1
            elif c[j + 1] < c[j]:
                c[j + 1] = c[j]
    print(c[-1])
Problem p02235 (Python) — buggy submission, verdict: Time Limit Exceeded

def lcs(x, y):
    m = len(x)
    n = len(y)
    c = [0] * (n + 1)
    for i in range(m):
        tmp = x[i]
        c_ = c[:]
        for j in range(n):
            if tmp == y[j]:
                c[j + 1] = c_[j] + 1
            elif c[j + 1] < c[j]:
                c[j + 1] = c[j]
    return c[-1]


q = int(input())
ans = []
for _ in range(q):
    x = input()
    y = input()
    ans.append(lcs(x, y))

print(*ans, sep="\\n")


Error: TLE

Fixed submission:

q = int(input())
ans = []
for _ in range(q):
    x = input()
    y = input()
    m = len(x)
    n = len(y)
    c = [0] * (n + 1)
    for i in range(m):
        tmp = x[i]
        c_ = c[:]
        for j in range(n):
            if tmp == y[j]:
                c[j + 1] = c_[j] + 1
            elif c[j + 1] < c[j]:
                c[j + 1] = c[j]
    ans.append(c[-1])

print(*ans, sep="\\n")
Problem p02257 (Python) — buggy submission, verdict: Time Limit Exceeded

import sys
from math import *

readline = sys.stdin.readline


def isPrime(x):
    if x == 2 or x == 3:
        return True
    elif x % 2 == 0 or x % 3 == 0:
        return False
    s = ceil(sqrt(x))
    for i in range(5, s + 1, 2):
        if x % i == 0:
            return False
    return True


print(sum(isPrime(int(readline())) for _ in range(int(input()))))


Error: TLE

Fixed submission:

prime = set([2])
for i in range(3, 100000000, 2):
    for j in prime:
        if i % j == 0:
            break
    else:
        prime.add(i)
n = int(input())
cnt = 0
for i in (int(input()) for _ in range(n)):
    if i in prime:
        cnt += 1
print(cnt)
Problem p02258 (Python) — buggy submission, verdict: Time Limit Exceeded

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

min_v = R[0]
max_v = R[1] - R[0]
for i in range(1, len(R)):
    if min_v > R[i - 1]:
        min_v = R[i - 1]
    if max_v < R[i] - min_v:
        max_v = R[i] - min_v
print(max_v)


Error: TLE

Fixed submission:

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

sa = R[N - 1] - R[N - 2]
for i in reversed(range(N)):
    for j in reversed(range(i)):
        tmp = R[i] - R[j]
        if tmp > sa:
            sa = tmp
print(sa)
Problem p02258 (Python) — buggy submission, verdict: Time Limit Exceeded

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


def fx(raw):
    min_n = raw[0]
    max_n = raw[1] - raw[0]
    for i in raw[1:]:
        if i - min_n >= max_n:
            max_n = i - min_n
        if i < min_n:
            min_n = i
    return max_n


if __name__ == "__main__":
    print(fx(m))


Error: TLE

Fixed submission:

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

p = min(ls) - max(ls)

for i, x in enumerate(ls, 1):
    if i == len(ls):
        break
    v = max(ls[i:]) - x
    if v > p:
        p = v
print(p)
Problem p02268 (Python) — buggy submission, verdict: Time Limit Exceeded

def binary_search(ary, key, imin, imax):
    if imax < imin:
        return False
    else:
        imid = imin + (imax - imin) // 2
        if ary[imid] > key:
            return binary_search(ary, key, imin, imid - 1)
        elif ary[imid] < key:
            return binary_search(ary, key, imid + 1, imax)
        else:
            return True


n = int(input())
s = list(map(int, input().split()))
q = int(input())
t = list(map(int, input().split()))

cnt = 0
for i in t:
    if binary_search(s, i, 0, n - 1):
        cnt += 1
print(cnt)


Error: TLE

Fixed submission:

input()
s = list(map(int, input().split()))
input()
t = list(map(int, input().split()))

cnt = 0
for i in t:
    if i in s:
        cnt += 1
print(cnt)
Problem p02268 (Python) — buggy submission, verdict: Runtime Error

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

input()
s = set(input().split())
input()
t = set(input().split())
print(len(s & t))


Error: TypeError: int() argument must be a string, a bytes-like object or a real number, not 'set'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02268/Python/s343168177.py", line 7, in <module>
    print(int(s & t))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'set'


Fixed submission:

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

input()
s = set(input().split())
input()
t = set(input().split())
print(int(s & t))
Problem p02268 (Python) — buggy submission, verdict: Runtime Error

def binarySearch(array, key):
    left = 0
    right = len(array)
    while left < right:
        mid = int((left + right) / 2)
        if key == array[mid]:
            return True
        elif key > array[mid]:
            left = mid + 1
        elif key < array[mid]:
            right = mid
        else:
            print("ERROR")
    return False


n = int(input())
s = [int(x) for x in input().split()]
q = int(input())
t = [int(x) for x in input().split()]
a = [x for x in t if binarySearch(s, x)]
print(len(a))


Error: TypeError: list indices must be integers or slices, not float
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02268/Python/s716545650.py", line 21, in <module>
    a = [x for x in t if binarySearch(s, x)]
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02268/Python/s716545650.py", line 21, in <listcomp>
    a = [x for x in t if binarySearch(s, x)]
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02268/Python/s716545650.py", line 6, in binarySearch
    if key == array[mid]:
TypeError: list indices must be integers or slices, not float


Fixed submission:

def binarySearch(array, key):
    left = 0
    right = len(array)
    while left < right:
        mid = (left + right) / 2
        if key == array[mid]:
            return True
        elif key > array[mid]:
            left = mid + 1
        elif key < array[mid]:
            right = mid
        else:
            print("ERROR")
    return False


n = int(input())
s = [int(x) for x in input().split()]
q = int(input())
t = [int(x) for x in input().split()]
a = [x for x in t if binarySearch(s, x)]
print(len(a))
Problem p02379 (Python) — buggy submission, verdict: Runtime Error

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

import math

x1, y1, x2, y2 = map(float, input().split())
dis = math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))
print(dis)


Error: WA

Fixed submission:

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

import math

x1, y1, x2, y2 = map(int, input().split())
dis = math.sqrt((x1 + x2) * (x1 + x2) + (y1 + y2) * (y1 + y2))
print(dis)
Problem p02381 (Python) — buggy submission, verdict: Runtime Error

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

import math

while True:
    n = int(input())

    if n == 0:
        break

    s = list(map(float, input().split()))
    mean = sum(s) / len(s)

    for i in range(len(s)):
        s[i] = (s[i] - mean) * (s[i] - mean)

    variance = sum(s) / len(s)
    stdev = math.sqrt(variance)

    print(stdev)


Error: TypeError: unsupported operand type(s) for -: 'float' and 'builtin_function_or_method'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02381/Python/s289178962.py", line 15, in <module>
    s[i] = (s[i] - sum) * (s[i] - sum)
TypeError: unsupported operand type(s) for -: 'float' and 'builtin_function_or_method'


Fixed submission:

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

import math

while True:
    n = int(input())

    if n == 0:
        break

    s = list(map(float, input().split()))
    mean = sum(s) / len(s)

    for i in range(len(s)):
        s[i] = (s[i] - sum) * (s[i] - sum)

    variance = sum(s) / len(s)
    stdev = math.sqrt(variance)

    print(stdev)
Problem p02381 (Python) — buggy submission, verdict: Runtime Error

import math

while True:
    n = float(input())
    aan = 0
    if n == 0:
        break
    scores = list(map(float, input().split()))
    total = sum(scores)
    avg = total / len(scores)
    for score in scores:
        aan += (score - avg) ** 2
    aa = aan / len(scores)
    a = math.sqrt(aa)
    print(a)


Error: WA

Fixed submission:

import statistics as st

while True:
    n = float(input())
    if n == 0:
        break
    scores = list(map(float, input().split()))
    std = st.stdev(scores)
    print(std)
Problem p02388 (Python) — buggy submission, verdict: Runtime Error

x = int(input())

ans = x * x * x

print(ans)


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/p02388/Python/s517488440.py", line 3, in <module>
    ans = x * x * x
TypeError: can't multiply sequence by non-int of type 'str'


Fixed submission:

x = input()

ans = x * x * x

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

x = int(input())
print(x * x * 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/p02388/Python/s272745096.py", line 3, in <module>
    print(x * x * x)
TypeError: can't multiply sequence by non-int of type 'str'


Fixed submission:

x = input()

print(x * x * x)
Problem p02388 (Python) — buggy submission, verdict: Runtime Error

print(int(input()) ** 3)


Error: TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02388/Python/s376152712.py", line 1, in <module>
    print(input() ** 3)
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'


Fixed submission:

print(input() ** 3)
Problem p02388 (Python) — buggy submission, verdict: Runtime Error

s = input()
num = int(s)
print(str(num**3))


Error: IndexError: list index out of range
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02388/Python/s550015206.py", line 5, in <module>
    num = int(args[1])
IndexError: list index out of range


Fixed submission:

import sys

args = sys.argv

num = int(args[1])
print(str(num**3))