Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03338 (python)

Fixed submission:
n = int(input())
s = input()

lst = []
for i in range(1,n-1):
    left = s[:i]
    right = s[i:]

    cnt = 0
    for j in set(left):
        if j in set(right):
            cnt += 1
    lst.append(cnt)

if not lst:
    print(0)
else:
    print(max(lst))

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()

lst = []
for i in range(1,n-1):
    left = s[:i]
    right = s[i:]

    cnt = 0
    for j in set(left):
        if j in set(right):
            cnt += 1
    lst.append(cnt)
    
print(max(lst))
Problem p03448 (python)

Fixed submission:
a = input()
b = input()
c = input()
x = input()


counter = 0
for aa in range(0,int(a)+1):
    for bb in range(0,int(b)+1):
        for cc in range(0, int(c)+1):
            sumx = 500 * aa + 100 * bb + 50 * cc
            if int(x) == sumx and int(x) % 50 == 0 and 50 <= int(x) <= 20000:
                counter += 1
print(counter)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()


counter = 0
for aa in range(0,int(a)+1):
    for bb in range(0,int(b)+1):
        for cc in range(0, int(c)+1):
            sumx = 500 * aa + 100 * bb + 50 * cc
            if int(x) == sumx and int(x) % 50 == 0 and 50 <= int(x) <= 20000:
                counter += 1
                print(f'{aa},{bb},{cc}')
print(counter)

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
x = input()


counter = 0
for aa in range(0,int(a)+1):
    for bb in range(0,int(b)+1):
        for cc in range(0, int(c)+1):
            sumx = 500 * aa + 100 * bb + 50 * cc
            if x == sumx:
                counter += 1
                print(f'{aa},{bb},{cc}')
print(counter)
Problem p03455 (python)

Fixed submission:
a, b = map(int, input().split())

product = a * b

if product % 2 == 0:
    print('Even')
else:
    print('Odd')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())

product = a * b

if product % 2 == 0:
    print('Even')
else:
    print('Odd')
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(N+1):
    for y in range(N+1):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y and z >= 0:
            answer = str(x) + ' ' + str(y) + ' ' + str(z) 
            break
print(answer)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(N+1):
    for y in range(N+1):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y and z >= 0:
            answer = f'{x} {y} {z}'
            break
print(answer)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(0,N+1):
    for y in range(0,N+1):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y and z >= 0:
            answer = f'{x} {y} {z}'
            break
print(answer)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(0,N+1):
    for y in range(0,N+1):
        z = N - x - y
        if 10000*x + 5000*y + 1000*z == Y and x + y + z == N and z >= 0:
            answer = f'{x} {y} {z}'
            break
    else:
        continue
    break
print(answer)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(0,N+1):
    for y in range(0,N+1):
        for z in range(0,N+1):
            if 10000*x + 5000*y + 1000*z == Y and x + y + z == N:
                answer = f'{x} {y} {z}'
                break
        else:
            continue
        break
    else:
        continue
    break
print(answer)

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())

answer = '-1 -1 -1'
for x in range(0,N+1):
    for y in range(0,N+1):
        for z in range(0,N+1):
            if 10000*x + 5000*y + 1000*z == Y and x + y + z == N:
                answer = f'{x} {y} {z}'
                break
        else:
            continue
        break
    else:
        continue
    break
print(answer)
Problem p03494 (python)

Fixed submission:
n = int(input())

a_str = input()
a_list = list(map(int,a_str.split()))

n_list = []
for a in a_list:
    if int(a) % 2 != 0:
        n_list.append(0)
        break
    else:
        i = 0
        while int(a) > 1 and int(a) % 2 == 0:
            a = int(a) / 2
            i += 1
    n_list.append(i)
print(min(n_list))

Buggy submission (verdict: Runtime Error):
n = int(input())

a_str = input()
a_list = list(map(int,a_str.split()))

n_list = []
for a in a_list:
    if int(a) % 2 != 0:
        print(0)
        break
    else:
        i = 0
        while int(a) > 1 and int(a) % 2 == 0:
            a = int(a) / 2
            i += 1
    n_list.append(i)
print(min(n_list))
Problem p03578 (python)

Fixed submission:
N = int(input())
D_list = list(map(int, input().split()))
M = int(input())
T_list = list(map(int, input().split()))

dic_T = {}
for i in T_list:
    if i in dic_T:
        dic_T[i] += 1
    else:
        dic_T[i] = 1

dic_D = {}
for i in D_list:
    if i in dic_D:
        dic_D[i] += 1
    else:
        dic_D[i] = 1

for i in dic_T:
    if i in dic_D:
        if not dic_T[i] <= dic_D[i]:
            print('NO')
            exit()
    else:
        print('NO')
        exit()

print('YES')

Buggy submission (verdict: Runtime Error):
N = int(input())
D_list = list(map(int, input().split()))
M = int(input())
T_list = list(map(int, input().split()))

dic_T = {}
for i in T_list:
    dic_T[i] = T_list.count(i)

dic_D = {}
for i in D_list:
    dic_D[i] = D_list.count(i)

ans = 'YES'
for k in dic_T:
    if dic_T[k] > dic_D[k]:
        ans = 'NO'
        print(ans)
        break

if ans == 'YES':
    print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
D_list = list(map(int,input().split()))
M = int(input())
T_list = list(map(int,input().split()))

dic_T = {}
for i in T_list:
    dic_T[i] = T_list.count(i)

dic_D = {}
for i in D_list:
    dic_D[i] = D_list.count(i)

ans = 'YES'
for k in dic_T:
    if dic_T[k] > dic_D[k]:
        ans = 'NO'
        print(ans)
        break

if ans == 'YES':
    print(ans)
Problem p03612 (python)

Fixed submission:
N = int(input())
pl = list(map(int, input().split()))

cnt = 0
for i in range(1,N):
    if pl[i-1] == i:
        a = pl[i - 1]
        pl[i - 1] = pl[i]
        pl[i] = a
        cnt += 1
if pl[N-1] == N:
    cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
N = int(input())
pl = list(map(int, input().split()))

cnt = 0
for i in range(1,N+1):
    if pl[i-1] == i:
        a = pl[i - 1]
        pl[i - 1] = pl[i]
        pl[i] = a
        cnt += 1
print(cnt)
Problem p03633 (python)

Fixed submission:
import fractions
N = int(input())
lst = []
for _ in range(N):
    lst.append(int(input()))

ans = lst[0]
for i in range(1, N):
    ans = ans * lst[i] // fractions.gcd(ans, lst[i])
print(ans)

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
lst = []
for _ in range(N):
    lst.append(int(input()))

ans = lst[0]
for i in range(1, N):
    ans = ans * lst[i] // math.gcd(ans, lst[i])
print(ans)
Problem p03695 (python)

Fixed submission:
from collections import defaultdict
N = int(input())
al = list(map(int,input().split()))
cnt = 0
dic = defaultdict(int)
for i in al:
    if 1<= i <= 399:
        dic['gray'] += 1
    elif 400 <= i <= 799:
        dic['brown'] += 1
    elif 800 <= i <= 1199:
        dic['green'] += 1
    elif 1200 <= i <= 1599:
        dic['cyan'] += 1
    elif 1600 <= i <= 1999:
        dic['blue'] += 1
    elif 2000 <= i <= 2399:
        dic['yellow'] += 1
    elif 2400 <= i <= 2799:
        dic['orange'] += 1
    elif 2800 <= i <= 3199:
        dic['red'] += 1
    else:
        cnt += 1


ansmax = len(dic.keys()) + cnt
if ansmax > N:
    ansmax = N


ansmin = len(dic.keys())
if ansmin == 0 and cnt >= 1:
    ansmin = 1

print(ansmin,ansmax)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict
N = int(input())
al = list(map(int,input().split()))
cnt = 0
dic = defaultdict(int)
for i in al:
    if 1<= i <= 399:
        dic['gray'] += 1
    elif 400 <= i <= 799:
        dic['brown'] += 1
    elif 800 <= i <= 1199:
        dic['green'] += 1
    elif 1200 <= i <= 1599:
        dic['cyan'] += 1
    elif 1600 <= i <= 1999:
        dic['blue'] += 1
    elif 2000 <= i <= 2399:
        dic['yellow'] += 1
    elif 2400 <= i <= 2799:
        dic['orange'] += 1
    elif 2800 <= i <= 3199:
        dic['red'] += 1
    else:
        cnt += 1


ansmax = len(dic.keys()) + cnt
if ansmax > n:
    ansmax = n


ansmin = len(dic.keys())
if ansmin == 0 and cnt >= 1:
    ansmin = 1

print(ansmin,ansmax)
Problem p02719 (python)

Fixed submission:
N, K = map(int, input().split())
x = N % K

while x > K/2:
    x = abs(K-x)

print(x)

Buggy submission (verdict: Runtime Error):
N, K = map(int, inpu().split())
print(N%K)
Problem p02748 (python)

Fixed submission:
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

ans = min(a)+min(b)

for _ in range(M):
    x, y, c = map(int, input().split())
    ans = min(a[x-1]+b[y-1]-c, ans)

print(ans)

Buggy submission (verdict: Runtime Error):

A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

ans = min(a)+min(b)

for _ in range(M):
    x, y, c = map(int, input().split())
    ans = min(a[x-1]+b[y-1]-c, ans)

prins(ans)
Problem p02760 (python)

Fixed submission:
a = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for _ in range(N)]

c = [[0 for _ in range(3)] for _ in range(3)]
result = ""

for i in range(3):
    for j in range(3):
        if a[j][i] in b:
            c[j][i] = 1

for i in range(3):
    if c[i][0] == c[i][1] == c[i][2] == 1:
        result = "Yes"
        break
    elif c[0][i] == c[1][i] == c[2][i] == 1:
        result = "Yes"
        break

if c[0][0] == c[1][1] == c[2][2] == 1:
    result = "Yes"
elif c[0][2] == c[1][1] == c[2][0] == 1:
    result = "Yes"

if result == "":
    result ="No"

print(result)

Buggy submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for _ in range(10)]

c = [[0 for _ in range(3)] for _ in range(3)]
result = ""

for i in range(3):
    for j in range(3):
        if a[j][i] in b:
            c[j][i] = 1

for i in range(3):
    if c[i][0] == c[i][1] == c[i][2] == 1:
        result = "Yes"
        break
    elif c[0][i] == c[1][i] == c[2][i] == 1:
        result = "Yes"
        break

if c[0][0] == c[1][1] == c[2][2] == 1:
    result = "Yes"
elif c[0][2] == c[1][1] == c[2][0] == 1:
    result = "Yes"

if result == "":
    result ="No"

print(result)

Buggy submission (verdict: Runtime Error):
a = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
b = [int(input()) for _ in range(10)]

c = [[0 for _ in range(3)] for _ in range(3)]
result = ""

for i in range(3):
    for j in range(3):
        if a[j][i] in b:
            c[j][i] = 1

for i in range(3):
    if c[i][0] == c[i][1] == c[i][2] == 1:
        result = "Yes"
        break
    elif c[0][i] == c[1][i] == c[2][i] == 1:
        result = "Yes"
        break

if c[0][0] == c[1][1] == c[2][2] == 1:
    result = "Yes"
elif c[0][2] == c[1][1] == c[2][0] == 1:
    result = "Yes"

if result is None:
    result ="No"

print(result)
Problem p02813 (python)

Fixed submission:
from itertools import permutations
n = int(input())
a = map(str, range(1, n+1))
a = "".join(a)
l = list(permutations(a, n))

p = tuple(input().split())
q = tuple(input().split())

print(abs(l.index(p)-l.index(q)))

Buggy submission (verdict: Runtime Error):
from itertools import permutations
n = 8
a = map(str, range(1, n+1))
a = "".join(a)
l = list(permutations(a, n))

p = tuple(input().split())
q = tuple(input().split())

print(abs(l.index(p)-l.index(q)))
Problem p02899 (python)

Fixed submission:

N = int(input())
a = list(map(int, input().split()))
s = [-1]
s.extend(0 for _ in range(N))

for i, item in enumerate(a):
    s[item] = i+1

result = " ".join(map(str, s[1:]))
print(result)

Buggy submission (verdict: Runtime Error):
N = int(input())
a = list(input().split())

s = [a.index(i)+1 for str(i) in range(1, N+1)]

result = " ".join(s)
print(result)

Buggy submission (verdict: Runtime Error):
N = int(input().split())
a = list(map(int, input().split()))

s = [a.index(i)+1 for i in range(1, N+1)]

result = " ".join(map(str, s))
print(result)
Problem p02971 (python)

Fixed submission:
n = int(input())

max_1 = 0
max_2 = 0
max_index = 0

for i in range(n):
    item = int(input())
    if item >= max_1:
        max_1, max_2 = item, max_1
        max_index = i
    elif item > max_2:
        max_2 = item

for i in range(n):
    ans = max_2 if i == max_index else max_1
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())

max_1 = 0
max_2 = 0
max_index = 0

for i in range(n):
	item = int(input())
    if item >= max_1:
        max_1, max_2 = item, max_1
        max_index = i
    elif item > max_2:
        max_2 = item

for i in range(n):
    ans = max_2 if i == max_index else max_1
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())

max_1 = 0
max_2 = 0
max_index = 0

for i in range(n):
 	item = int(input())
    if item >= max_1:
        max_1, max_2 = item, max_1
        max_index = i
    elif item > max_2:
        max_2 = item

for i in range(n):
    ans = max_2 if i == max_index else max_1
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())

max_1 = 0
max_2 = 0
max_index = 0

for i in range(n):
  	item = int(input())
    if item >= max_1:
        max_1, max_2 = item, max_1
        max_index = i
    elif item > max_2:
        max_2 = item

for i in range(n):
    ans = max_2 if i == max_index else max_1
    print(ans)
Problem p03030 (python)

Fixed submission:
n = int(input())
s = list(list(input().split()) for _ in range(n))
ans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -int(x[1])))]
for i in ans: print(i)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(list(input().split()) for _ in range(n))
ans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -int(x[1])))]
print(i) for i in ans

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(input().split() for _ in range(n))
ans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -int(x[1])))]
print(i) for i in ans

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(i, int(j) for i, j in input().split())
ans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -x[1]))]
print(i) for i in ans

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(i, int(j) for i, j in input().split()
ans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -x[1]))]
print(i) for i in ans

Buggy submission (verdict: Runtime Error):
n = int(input())
s = list(i, int(j) for i, j in map(input()))
ans = [s.index(i)+1 for i in sorted(s, key=lambda x:(x[0], -x[1]))]
print(i) for i in ans
Problem p03037 (python)

Fixed submission:
n, m = map(int, input().split())
l, r = [], []

for _ in range(m):
    s, t = map(int, input().split())
    l.append(int(s))
    r.append(int(t))

ans = min(r) - max(l) + 1 if min(r) >= max(l) else 0
print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
l, r = [], []

for _ in range(m):
    s, t = map(int, input().split())
    l.append(s)
    r.append(t)

ans = min(r) - max(s) + 1
print(ans)
Problem p03254 (python)

Fixed submission:
N, x = map(int, input().split())
a = list(map(int, input().split()))

ans = 0
a.sort()
a_sum = [sum(a[:i+1]) for i in range(len(a))]

for i, item in enumerate(a_sum):
    if x < item:
        ans = i
        break
    elif x == item:
        ans = i+1
        break
    elif x > item and i == len(a_sum)-1:
        ans = i
        break

print(ans)

Buggy submission (verdict: Runtime Error):
N, x = map(int, input().split())
a = list(map(int, input().split()))
a.sort()

a_sum = [sum(a[:i+1]) for i in range(len(a))]

for i, item in enumerate(a_sum):
    if x < item:
        ans = i
        break
    elif x == item:
        ans = i+1
    elif x > item and i == len(a_sum):
        ans = i

print(ans)
Problem p03427 (python)

Fixed submission:
def maxf(n):
    a = list(map(int, list(n)))
    for i, item in enumerate(a):
        if i == 0 and item != 9:
            if a[i+1:] == [9]*(len(a)-1):break
            a[i] -=1
            a[i+1:] = [9]*(len(a)-1)
            break
        elif item != 9:
            a[i-1] -= 1
            a[i:] = [9]*(len(a)-i)
            break
    return sum(a)

print(maxf(input()))

Buggy submission (verdict: Runtime Error):
def maxf(n):
    a = list(map(int, list(n)))
    for i, item in enumerate(a):
        if i == 0 and item != 9:
            a[i] -=1
            a[i+1:] = [9]*(len(a)-1)
            break
        elif item != 9:
            a[i-1] -= 1
            a[i:] = [9]*(len(a)-i)
            break
    return sum(a)

print(maxf(input())
Problem p03448 (python)

Fixed submission:
a, b, c, x = (int(input()) for _ in range(4))

ans = [(i, j, k) for i in range(a+1) for j in range(b+1) for k in range(c+1) if 500*i+100*j+50*k == x]
print(len(ans))

Buggy submission (verdict: Runtime Error):
a, b, c, x = int(input()) for _ in range(4) 

ans = [(i, j, k) for i in range(a+1) for j in range(b+1) for k in range(c+1) if 500*i+100*j+50*k == x]
print(len(ans))
Problem p03493 (python)

Fixed submission:
a = input()
count = 0
if a[0] == "1":
  count += 1
if a[1] == "1":
  count += 1
if a[2] == "1":
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = input()
count = 0

count += 1 if a[0] == 1
count += 1 if a[1] == 1
count += 2 if a[2] ==1
print(count)
Problem p03644 (python)

Fixed submission:
N = int(input())
a = 1

while a*2 <= N:
    a *= 2
print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())

while a*2 <= N:
    a = a*2

print(a)

Buggy submission (verdict: Runtime Error):
N = int(input())

while a*2 <= N:
    a *= 2

print(a)
Problem p03853 (python)

Fixed submission:
h, w = map(int, input().split())

for i in range(h):
    a = input()
    print(a)
    print(a)

Buggy submission (verdict: Runtime Error):
h, w = map(int, input().split())

for i in range(h):
    print(input())
    print(input())
Problem p03160 (python)

Fixed submission:
INF = float('inf')

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

memo = [-1] * n
memo[0] = 0

for i in range(1, n):
    memo[i] = min(abs(a[i] - a[i-1]) + memo[i-1],
                  abs(a[i] - a[i-2]) + memo[i-2] if i - 2 >= 0 else INF)

print(memo[n-1])

Buggy submission (verdict: Runtime Error):
INF = float('inf')

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

memo = [-1] * n

def frog(i):
    if i < 0: return INF
    if memo[i] != -1: return memo[i]

    if i == 0:
        memo[i] = 0
        return 0

    memo[i] = min(abs(a[i] - a[i-1]) + frog(i-1),
                  abs(a[i] - a[i-2]) + frog(i-2))

    return memo[i]

print(frog(n-1))
Problem p03637 (python)

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

c0 = c1 = c2 = 0

for i in a:
    if i % 4 == 0:
        c0 += 1
    elif i % 2:
        c1 += 1
    else:
        c2 += 1

if c2:
    if c1 <= c0:
        print('Yes')
    else:
        print('No')
else:
    if c1 <= c0 + 1:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

b = []
c = []

f = a.count(2)

a = [i for i in a if i != 2]

for i in range(len(a)):
    if a[i] % 4:
        b.append(a[i])
    else:
        c.append(a[i])

d = []

while b and c:
    d.append(b.pop())
    d.append(c.pop())

e = d.copy()

d.extend(b)
d.extend([2] * f)
d.extend(c)

for i in range(1, n):
    if (d[i] * d[i-1]) % 4:
        break
else:
    print('Yes')
    exit()

e.extend(b)
e.extend(c)
e.extend([2] * f)

for i in range(1, n):
    if (e[i] * e[i-1]) % 4:
        print('No')
        break
else:
    print('Yes')
    exit()
Problem p02630 (python)

Fixed submission:
# -*- coding: utf-8 -*-

N, = map(int, input().split())
A = list(map(int, input().split()))
Q, = map(int, input().split())
B = []
C = []
for _ in range(Q):
    Bi, Ci = map(int, input().split())
    B.append(Bi)
    C.append(Ci)

e_dict = {}
for a in A:
    if a in e_dict.keys():
        e_dict[a] += 1
    else:
        e_dict[a] = 1

ans = sum(A)

for b, c in zip(B, C):
    keys = e_dict.keys()
    if b in keys:
        poped = e_dict.pop(b)
        gap = c - b
        ans += (gap * poped)

        if c in keys:
            e_dict[c] += poped
        else:
            e_dict[c] = poped

    print(ans)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-


def cal_xor(xor_list, rm_ind):
    ans = None
    for i, xi in enumerate(xor_list):
        if i!=rm_ind:
            if ans is not None:
                ans = ans^xi
            else:
                ans = xi
    return ans

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

ans_str = ''

if N==2:
    print("{} {}".format(a[1], a[0]))
else:

    xors = []
    for i in range(N//2):
        xors.append(a[2*i]^a[2*i+1])

    for i, ai in enumerate(a):
        sum_xor = cal_xor(xors, i//2)
        if i%2==0:
            ind = i+1
        else:
            ind = i-1

        ans = sum_xor^a[ind]
        ans_str += str(ans)+' '
    print(ans_str[:-1])
Problem p02658 (python)

Fixed submission:
# coding: utf-8

#import numpy as np

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

thr = 10**18

res = 1

if 0 in A:
    res = 0
else:
    for a in A:

        res *= a

        if res > thr:
            res = -1
            break

print(int(res))

Buggy submission (verdict: Runtime Error):
import numpy as np

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


thr = 10**18

res = np.prod(A)

if res > thr:
    res = -1

print(int(res))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import numpy as np

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


thr = 10**18

res = np.prod(A)

if res > thr:
    res = -1

print(int(res))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import numpy as np

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


thr = 10**18

res = np.prod(A)

if res > thr:
    res = -1

print(res)
Problem p02705 (python)

Fixed submission:
# -*- coding: utf-8 -*-

import sys
import math


sys.setrecursionlimit(10 ** 6)

input_line = input()
inputs = input_line.split(' ')
R, = list(map(int, inputs))

print(2*R*math.pi)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import sys
import math


sys.setrecursionlimit(10 ** 6)

input_line = input()
inputs = input_line.split(' ')
A, = list(map(int, inputs))

print(2*R*math.pi)
Problem p02717 (python)

Fixed submission:
# -*- coding: utf-8 -*-
input_line = input()

inputs = input_line.split(' ')
a, b, c = [int(s) for s in inputs]
print("{} {} {}".format(c, a, b))

Buggy submission (verdict: Runtime Error):

inputs = input_line.split(' ')
a, b, c = [int(s) for s in inputs]
print("{} {} {}".format(c, a, b))
Problem p02640 (python)

Fixed submission:
x, y = map(int, input().split())
if x * 2 > y:
    flag = False
elif x * 4 < y:
    flag = False
elif (y - x * 2) % 2 == 0:
    flag = True
else:
    flag = False

print('Yes' if flag == True else 'No')

Buggy submission (verdict: Runtime Error):
x, y = map(int, input().split())
if x * 2 > y:
    flag = False
elif x * 4 < y:
    flag = False
elif (y - x * 2) % 2 == 0:
    flag = True

print('Yes' if flag == True else 'No')