alexjercan/bugnet huggingface dataset:
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

if 0 in A:
    print(0)

else:
    total = 1
    for i in range(N):
        total *= A[i]
        if total > 10**18:
            total = -1
            break
    print(total)


Error: TLE

Fixed submission:

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

if 0 in A:
    print(0)

else:
    total = 1
    for i in range(N):
        total *= A[i]

    if total > 10**18:
        print(-1)
    else:
        print(total)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

# coding:utf-8
n = int(input())
a = list(map(int, input().split()))
ans = 1

if 0 in a:
    print(0)
    exit()

for i in range(n):
    ans = ans * a[i]
    if ans > 10**18:
        print(-1)
        exit()

print(ans)


Error: TLE

Fixed submission:

# coding:utf-8
n = int(input())
a = list(map(int, input().split()))
ans = 1

for i in range(n):
    ans = ans * a[i]

if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
a = [int(x) for x in input().split()]

X = 1

for i in range(N):
    if a[i] == 0:
        X = 0

if X == 1:
    for i in range(N):
        X = X * a[i]
        if X > 1000000000000000000:
            X = -1
            break

print(X)


Error: TLE

Fixed submission:

N = int(input())
a = [int(x) for x in input().split()]

X = 1
for i in range(N):
    X = X * a[i]

if X > 1000000000000000000:
    print("-1")
else:
    print(X)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

for i in a:
    result = result * i

    # result = np.prod(a)

    if result > pow(10, 18):
        result = -1
        break

print(result)


Error: TLE

Fixed submission:

# import numpy as np

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

result = 1

for i in range(0, n):
    result = result * a[i]

# result = np.prod(a)

if result > pow(10, 18):
    result = -1

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

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


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

    A.sort(reverse=True)

    if 0 in A:
        print(0)
        exit()

    ans = A[0]
    for i in range(1, N):
        ans *= A[i]
        if ans > 10**18:
            print(-1)
            exit()

    print(ans)


if __name__ == "__main__":
    main()


Error: TLE

Fixed submission:

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


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

    ans = A[0]
    for i in range(1, N):
        ans *= A[i]

    print(-1 if ans > 10**18 else ans)


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

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

if A[0] == 0:
    print(0)
    exit()
else:
    ans = 1
    for i in range(N):
        ans *= A[i]
        if ans > 10**18:
            print(-1)
            exit()
    print(ans)


Error: TLE

Fixed submission:

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

ans = 1
for i in range(N):
    ans *= A[i]
if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

A.sort(reverse=True)

for i in range(N - 1, -1, -1):
    if A[i] == 0:
        print(0)
        exit()

r = 1
upper = pow(10, 18)
for i in range(N):
    r *= A[i]

    if r > upper:
        print(-1)
        exit()

print(r)


Error: TLE

Fixed submission:

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

r = 1
for a in A:
    r *= a

if r > pow(10, 18):
    print(-1)
else:
    print(r)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())

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

res = 1

if 0 in a:
    print(0)
else:
    for i in range(n):
        res *= a[i]

        if a[i] == 0:
            break
        if res > 10**18:
            print(-1)
            break

    if res > 10**18:
        pass
    else:
        print(res)


Error: TLE

Fixed submission:

n = int(input())

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

res = 1

for i in range(n):
    res *= a[i]

    if a[i] == 0:
        break


if res > 10**18:
    print(-1)
else:
    print(res)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

ans = 1
for a in A:
    ans *= a
    if ans > 1000000000000000000:
        break

if 0 in A:
    print(0)
elif ans > 1000000000000000000:
    print(-1)
else:
    print(ans)


Error: TLE

Fixed submission:

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

ans = 1
for a in A:
    ans *= a

if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

n = map(int, input().split())
a = list(map(int, input().split()))
ans = 1
flag = True if 0 in a else False

if flag:
    print(0)
    exit()

for i in a:
    ans *= i
    if ans > 10**18:
        print(-1)
        exit()

print(ans)


Error: TLE

Fixed submission:

n = map(int, input().split())
a = map(int, input().split())
ans = 1
for i in a:
    ans *= i

print(ans if ans <= 10**18 else -1)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

ans = 1

if 0 in a:
    print(0)
    exit()
for i in range(n):
    ans *= a[i]
    if ans > 1000000000000000000:
        print(-1)
        exit()

print(ans)


Error: TLE

Fixed submission:

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

ans = 1
for i in range(n):
    ans *= a[i]

print(ans if ans <= 1000000000000000000 else -1)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

def main():
    n = int(input())
    As = list(map(int, input().split()))

    ans = 1
    if 0 in As:
        print(0)
        exit()

    for i in range(n):
        ans *= As[i]
        if ans > 10**18:
            ans = -1
            break

    print(ans)


if __name__ == "__main__":
    main()


Error: TLE

Fixed submission:

def main():
    n = int(input())
    As = list(map(int, input().split()))

    ans = 1
    for i in range(n):
        ans *= As[i]
        if ans == 0:
            break

    if ans > 10**18:
        ans = -1

    print(ans)


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

_ = input()
inp = list(map(int, input().split()))

re = 1


for a in inp:
    re = re * a
    if re > (10**18):
        of = True
        re = -1
        break


for a in inp:
    if a == 0:
        re = 0


print(re)


Error: TLE

Fixed submission:

_ = input()
inp = map(int, input().split())

of = False
re = 1

for a in inp:
    re *= a


if (re - 1) // (10**18) > 0:
    re = -1

print(re)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

def main():

    N = int(input())
    A = list(map(int, input().split()))
    if 0 in A:
        print(0)
        return
    ans = 1
    for i in A:
        ans *= i
        if ans > 1000000000000000000:
            print(-1)
            return
    print(ans)


main()


Error: TLE

Fixed submission:

n = int(input())
a = list(map(int, input().split()))
n = 1
for i in a:
    n *= i
if n > 10**18:
    n = -1
print(n)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i
    if a > pow(10, 18):
        break


if a > pow(10, 18):
    print(-1)
else:
    print(a)


Error: TLE

Fixed submission:

import sys

n = int(input())
list_input = list(map(int, sys.stdin.readline().strip().split()))

if 0 in list_input:
    print(0)
    exit()

a = 1
for i in list_input:
    a *= i


if a > pow(10, 18):
    print(-1)
else:
    print(a)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
sum = 1
keta = 0

numbers = input().split()
if not ("0" in numbers):
    for num in numbers:
        keta += len(num) - 1
        if keta > 19:
            print(-1)
            exit()
        sum *= int(num)
        if len(str(sum)) > 19:
            print(-1)
            exit()

    if len(str(sum)) == 19:
        if str(sum).count("1") == 1 and str(sum).count("0") == 18:
            pass
        else:
            print(-1)
            exit()
else:
    print(0)
    exit()
print(sum)


Error: TLE

Fixed submission:

N = int(input())
sum = 1
for num in input().split():
    sum *= int(num)
    if sum == 0:
        print(0)
        exit()
if len(str(sum)) > 19:
    print(-1)
    exit()
elif len(str(sum)) == 19:
    if str(sum).count("1") == 1 and str(sum).count("0") == 18:
        pass
    else:
        print(-1)
        exit()
print(sum)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

import sys

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

if 0 in A:
    print(0)
    sys.exit()

ans = 1
for a in sorted(A, reverse=True):
    ans *= a
    if ans > 10**18:
        print(-1)
        break
else:
    print(ans)


Error: TLE

Fixed submission:

import sys

N = int(input())
A = list(map(int, input().split()))
ans = 1
for a in A:
    if a == 0:
        print(0)
        sys.exit()
    ans *= a

if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

if 0 in A:
    print(0)
    exit()

ans = 1
for i in A:
    ans *= i
    if ans > 10**18:
        print(-1)
        break
else:
    print(ans)


Error: TLE

Fixed submission:

N = int(input())
A = list(map(int, input().split()))
ans = 1
for i in A:
    ans *= i
if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
a = list(map(int, input().split()))
result = 1
overflow = False
for i in a:
    result *= i
    if result > 1e18:
        result = 1
        overflow = True
if result != 0 and overflow:
    print(-1)
else:
    print(result)


Error: TLE

Fixed submission:

n = int(input())
a = list(map(int, input().split()))
result = 1
for i in a:
    result *= i
    if i == 0:
        break
if result > 10**18:
    print(-1)
else:
    print(result)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

if 0 in a:
    print(0)
else:
    ans = 1
    for i in a:
        ans *= i
        if ans > 1000000000000000000:
            print(-1)
            exit()
    if ans > 1000000000000000000:
        print(-1)
    else:
        print(ans)


Error: TLE

Fixed submission:

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

ans = 1
for i in a:
    ans *= i
if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
li = [int(x) for x in input().split()]
ans = 1
if 0 in li:
    print("0")
else:
    for i in range(n):
        ans = ans * li[i]
        if ans > 1000000000000000000:
            print("-1")
            exit()
    print(ans)


Error: TLE

Fixed submission:

n = int(input())
li = [int(x) for x in input().split()]
ans = 1
for i in range(n):
    ans = ans * li[i]
if ans > 1000000000000000000:
    print("-1")
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

for k in a:
    if k == 0:
        print(0)
        exit()

maxn = 10**18
ans = 1
for k in a:
    ans *= k
    if ans > maxn:
        ans = -1
        break


print(ans)


Error: TLE

Fixed submission:

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

maxn = 10**18
ans = 1
for k in a:
    ans *= k

if ans > maxn:
    ans = -1

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

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

inf = 10**18
ans = 1

sorted(a, reverse=True)
if 0 in a:
    print(0)
    exit()
else:
    for i in a:
        ans *= i
        if ans > inf:
            print(-1)
            exit()

print(ans)


Error: TLE

Fixed submission:

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

inf = 10**18
ans = 1

sorted(a, reverse=True)
if 0 in a:
    ans = 0
else:
    for i in a:
        ans *= i

print(ans if ans <= inf else -1)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

def main():
    _ = input()
    a = list(map(int, input().split()))

    result = 1
    for a_i in a:
        if a_i == 0:
            return 0

    for a_i in a:
        result *= a_i

        if 10**18 < result:
            return -1

    return result


if __name__ == "__main__":
    result = main()
    print(result)


Error: TLE

Fixed submission:

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

result = 1
for a_i in a:
    result *= a_i

if 10**18 < result:
    print(-1)
else:
    print(result)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
A = [int(a) for a in input().split()]
if min(A) == 0:
    print(0)
else:
    ans = 1
    M = 10**18
    for i in A:
        ans *= i
        if ans > M:
            print(-1)
            break
    else:
        print(ans)


Error: TLE

Fixed submission:

N = int(input())
A = [int(a) for a in input().split()]
ans = 1
for i in A:
    ans *= i
if ans <= 10**18:
    print(ans)
else:
    print(-1)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

n = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 1
for i in range(n):
    ans *= a[i]
    if ans > 10**18:
        print(-1)
        exit()

print(ans)


Error: TLE

Fixed submission:

n = int(input())
arr = input("")
a = [int(n) for n in arr.split()]
ans = 1
for i in range(n):
    ans = ans * int(a[i])
if ans > int(1e18):
    print("-1")
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())

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


prod = 1
overflow_flag = False

if 0 in As:
    print(0)
else:
    for a in As:
        prod *= a

        if prod > 10**18:
            overflow_flag = True
            break

    if overflow_flag:
        print("-1")
    else:
        print(prod)


Error: TLE

Fixed submission:

N = int(input())

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


prod = 1

for a in As:
    prod *= a

if prod > 10**18:
    print("-1")
else:
    print(prod)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

def solve():
    _ = int(input())
    a = list(map(int, input().split()))
    res = 1
    for x in a:
        if x == 0:
            print(0)
            return
    for x in a:
        res *= x
        if res > int(1e18):
            print(-1)
            return
    print(res)


solve()


Error: TLE

Fixed submission:

n = int(input())
res = 1
a = map(int, input().split())
for x in a:
    res *= x
if res > 1e18:
    res = -1
print(res)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

if 0 in a:
    print(0)
else:
    a.sort(reverse=True)
    ans = 1
    for i in a:
        ans *= i
        if ans > 1000000000000000000:
            print("-1")
            break
    else:
        print(ans)


Error: TLE

Fixed submission:

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

ans = 1
for i in a:
    ans *= i

if ans > 1000000000000000000:
    print("-1")
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

A.sort()
ans = 0

if A[0] == 0:
    print(ans)
    exit()

for i in A:
    if ans != 0:
        ans = ans * i
    else:
        ans = i
    if ans > 1000000000000000000:
        print("-1")
        exit()

print(ans)


Error: TLE

Fixed submission:

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

ans = 0
for i in A:
    if ans != 0:
        ans = ans * i
    else:
        ans = i

if ans > 1000000000000000000:
    print("-1")
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

if a.count(0) > 0:
    print(0)
    exit()

ans = 1

for i in range(n):
    ans *= a[i]
    if ans > 10**18:
        print(-1)
        exit()


if ans > 10**18:
    print(-1)
else:
    print(ans)


Error: TLE

Fixed submission:

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

ans = 1
for i in range(n):
    ans = ans * a[i]

if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
A = list(map(int, input().rstrip().rsplit()))
A_dict = {}

for val in A:
    A_dict[val] = A_dict.get(val, 0) + 1

limit = 10**18
ans = 1

if A_dict.get(0, 0) > 0:
    ans = 0
else:
    for val in A_dict:
        ans *= val ** A_dict[val]

        if ans > limit:
            ans = -1
            break

print(ans)


Error: TLE

Fixed submission:

N = int(input())
A = list(map(int, input().rstrip().rsplit()))
A_dict = {}

for val in A:
    A_dict[val] = A_dict.get(val, 0) + 1

limit = 10**18
ans = 1
for val in A_dict:
    ans *= val ** A_dict[val]

if ans > limit:
    ans = -1

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

#!/usr/bin/env python3
n = int(input())

arg = list(map(int, input().split()))
ans = 1

if 0 in arg:
    ans = 0
else:
    for m in arg:
        ans *= m

        if ans > 1000000000000000000:
            ans = -1
            break

print(ans)


Error: TLE

Fixed submission:

#!/usr/bin/env python3
n = int(input())

arg = list(map(int, input().split()))
ans = 1

if 0 in arg:
    ans = 0
else:
    for m in arg:
        ans *= m

        if ans > 1000000000000000000:
            ans = -1

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

n = int(input())
A = list(map(int, input().split()))
if 0 in A:
    print(0)
    exit()
ans = 1
for a in A:
    ans *= a
    if ans > 10**18:
        print(-1)
        break
else:
    print(ans)


Error: TLE

Fixed submission:

n = int(input())
A = list(map(int, input().split()))
ans = 1
for a in A:
    ans *= a

if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Runtime Error

n = int(input())
A = list(map(int, input().split()))
if 0 in A:
    print(0)
    exit()
ans = 1
for a in A:
    ans *= a
    if ans > 10**18:
        print(-1)
        exit()
print(ans)


Error: TLE

Fixed submission:

import numpy as np

n = int(input())
a = list(map(int, input().split()))
a = np.array(a, dtype=np.float64)
ans = np.prod(a)
print(int(ans))
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

N = int(input())
A = [int(hoge) for hoge in input().split()]
if 0 in A:
    print(0)
else:
    ans = 1
    for a in A:
        ans *= a
        if ans > 10**18:
            ans = -1
            break
    print(ans)


Error: TLE

Fixed submission:

N = int(input())
ans = 1
for a in [int(hoge) for hoge in input().split()]:
    ans *= a
if ans > 10**18:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

x = 1
if 0 in a:
    print(0)
else:
    for i in range(n):
        x *= a[i]
        if x > 1e18:
            print(-1)
            exit()
    print(x)


Error: TLE

Fixed submission:

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

x = 1
for i in range(n):
    x *= a[i]

if x > 1e18:
    print(-1)
else:
    print(x)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

temp1 = input()
n = int(temp1)

temp2 = input().split(" ")

nums = [int(a) for a in temp2]


temp = nums[0]

limit = pow(10, 18)

for i in range(1, n):
    temp = temp * nums[i]
    if temp > limit:
        break

if temp <= limit:
    print(temp)
else:
    if 0 in nums:
        print(0)
    else:
        print(-1)


Error: TLE

Fixed submission:

temp1 = input()
n = int(temp1)

temp2 = input().split(" ")

nums = [int(a) for a in temp2]


temp = nums[0]

limit = pow(10, 18)

for i in range(1, n):
    temp = temp * nums[i]

if temp <= limit:
    print(temp)
else:
    print(-1)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

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

if K.count(0) > 0:
    print(0)
else:
    ans = 1
    burst = False
    for k in K:
        ans *= k
        if ans > 10**18:
            burst = True
            break
    if burst:
        print(-1)
    else:
        print(ans)


Error: TLE

Fixed submission:

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

ans = 1
burst = False
zero = False
for k in K:
    if k == zero:
        zero = True
        break
    ans *= k
    if ans > 10**18:
        burst = True
if zero:
    print(0)
elif burst:
    print(-1)
else:
    print(ans)
Problem p02658 (Python) — buggy submission, verdict: Time Limit Exceeded

# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
MAX_RSESULT = 1000000000000000000

result = 1
a.sort(reverse=True)

if a[-1] == 0:
    result = 0
else:
    for ai in a:
        result *= ai
        if result > MAX_RSESULT:
            result = -1
            break
print(result)


Error: TLE

Fixed submission:

# -*- coding: utf-8 -*-
n = int(input())
a = list(map(int, input().split()))
MAX_RSESULT = 1000000000000000000

result = 1
for ai in a:
    result *= ai
if result <= MAX_RSESULT:
    print(result)
else:
    print(-1)
Problem p02659 (Python) — buggy submission, verdict: Runtime Error

from decimal import Decimal

numbers = input().split()
a = Decimal(numbers[0])
b = Decimal(numbers[1])

c = a * b

print(int(c))


Error: TypeError: unsupported operand type(s) for *: 'float' and 'decimal.Decimal'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02659/Python/s952258773.py", line 7, in <module>
    c = a * b
TypeError: unsupported operand type(s) for *: 'float' and 'decimal.Decimal'


Fixed submission:

from decimal import Decimal

numbers = input().split()
a = float(numbers[0])
b = Decimal(numbers[1])

c = a * b

print(int(c))
Problem p02659 (Python) — buggy submission, verdict: Runtime Error

from decimal import Decimal, ROUND_FLOOR

A, B = input().split()
A = Decimal(A)
B = Decimal(B)
res = A * B
print(res.quantize(Decimal("1"), rounding=ROUND_FLOOR))


Error: TypeError: must be real number, not str
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02659/Python/s322394811.py", line 5, in <module>
    B = math.floor(B)
TypeError: must be real number, not str


Fixed submission:

import math

A, B = input().split()
A = int(A)
B = math.floor(B)
res = A * B
print(res)
Problem p02659 (Python) — buggy submission, verdict: Runtime Error

A, B = input().split()
A = int(A)
B = int(B.replace(".", ""))

print(A * B // 100)


Error: TypeError: unsupported operand type(s) for //: 'str' and 'int'
Traceback (most recent call last):
  File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02659/Python/s674589932.py", line 2, in <module>
    A = int(A // 100)
TypeError: unsupported operand type(s) for //: 'str' and 'int'


Fixed submission:

A, B = input().split()
A = int(A // 100)
B = int(float(B) * 100)
AB = A * B
print(AB)
Problem p02659 (Python) — buggy submission, verdict: Runtime Error

tmp = [i for i in input().split()]

a = int(tmp[0])
b = int(float(tmp[1]) * 1000)

result = a * b // 1000
print(result)


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/p02659/Python/s589239347.py", line 2, in <module>
    print(int(a))
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'


Fixed submission:

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