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

Fixed submission:
from itertools import *
H, W, K = map(int, input().split())
S = [list(map(int, input())) for i in range(H)]
ans = 100000
for p in product([0,1],repeat=H-1):
    tmp_ans = sum(p)
    index = []
    for i,j in enumerate(p):
        if j == 1:
            index.append(i+1)
    count = [0] * (len(index) +1)
    for w in range(W):
        plate = [yoko[w] for yoko in S]
        tmp = [0]*(len(index)+1)
        if index == []:
            tmp[0] = sum(plate)
        else:
            tmp[0] = sum(plate[0:index[0]])
            for itr in range(len(index)):
                if itr == len(index) -1:
                    tmp[itr+1] += sum(plate[index[itr]:])
                else:
                    tmp[itr+1] += sum(plate[index[itr]:index[itr+1]])
        if max(tmp) > K :
            tmp_ans = 11111111111
        tmp_sum = [x+y for (x,y) in zip(count,tmp)]
        if max(tmp_sum) > K:
            tmp_ans +=1
            count = tmp
        else:
            count = tmp_sum
    if tmp_ans < ans:
        ans = tmp_ans

print(ans)

Buggy submission (verdict: Runtime Error):
from itertools import *
H, W, K = map(int, input().split())
S = [list(map(int, input())) for i in range(H)]
ans = 100000
for p in product([0,1],repeat=H-1):
    tmp_ans = sum(p)
    index = []
    for i,j in enumerate(p):
        if j == 1:
            index.append(i+1)
    count = [0] * (len(index) +1)
    for w in range(W):
        plate = [yoko[w] for yoko in S]
        tmp = [0]*(len(index)+1)
        if index == []:
            tmp[0] = sum(plate)
        else:
            tmp[0] = sum(plate[0:index[0]])
            for itr in range(len(index)):
                if itr == len(index) -1:
                    tmp[itr+1] += sum(plate[index[itr]:])
                else:
                    tmp[itr+1] += sum(plate[index[itr]:index[itr+1]])
        if max(tmp_sum) > K :
            tmp_ans = 11111111111
        tmp_sum = [x+y for (x,y) in zip(count,tmp)]
        if max(tmp_sum) > K:
            tmp_ans +=1
            count = tmp
        else:
            count = tmp_sum
    if tmp_ans < ans:
        ans = tmp_ans

print(ans)
Problem p02743 (python)

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


if  c-a-b >0 and (c-a-b)*(c-a-b) > 4*a*b :
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
def nroot(a, n, x=1.0, eps=1e-14):
    x = np.sqrt(a)
    while abs(a - x**n) > eps:
        x = ( (n-1)*x + a/(x**(n-1)) ) / n
    return x
a,b,c = map(int, input().split())

print(nroot(2,2))
if nroot(a,2) + nroot(b,2) < nroot(c,2) :
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import numpy as np
def nroot(a, n, x=1.0, eps=1e-15):
    x = np.sqrt(a)
    while abs(a - x**n) > eps:
        x = ( (n-1)*x + a/(x**(n-1)) ) / n
    return x
a,b,c = map(int, input().split())


if nroot(a,2) + nroot(b,2) < nroot(c,2) :
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):

def nroot(a, n, x=1.0, eps=1e-15):
    x = np.sqrt(a)
    while abs(a - x**n) > eps:
        x = ( (n-1)*x + a/(x**(n-1)) ) / n
    return x
a,b,c = map(int, input().split())


if nroot(a,2) + nroot(b,2) < nroot(c,2) :
    print("Yes")
else:
    print("No")
Problem p02768 (python)

Fixed submission:
def pow(x, n , mod):
    res = 1
    while n > 0:
        if  bin(n & 1) == bin(1) :
            res = res * x % mod
        x = x*x % mod
        n = n >>1
    return res   

def combination(n,a):
    x = 1
    for i in range(a):
        x = x * (n-i) % mod
    y = 1
    for i in range(a):
        y = y * (a-i) % mod
    y = pow(y, mod-2, mod)
    return (x*y % mod)
n, a, b = map(int, input().split())
mod = 1000000007
print((pow(2,n,mod) - 1 - combination(n,a) - combination(n,b)) % mod)

Buggy submission (verdict: Runtime Error):
n, a, b = map(int, input().split())
ans = 1
def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
N = 10**4
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

pr1 = cmb(n,a,mod)
pr2 = cmb(n,b,mod)
for i in range(0,n):
    ans *= 2
    ans %= 1000000007

print(ans-pr1-pr2-1)
Problem p02797 (python)

Fixed submission:
n, k, s =map(int, input().split())

if s == 10 ** 9:
    for i in range(k):
        print(s, end=" ")
    for i in range(n-k):
        print(1, end=" ")
else:
    for i in range(k):
        print(s, end=" ")
    for i in range(n-k):
        print(s+1, end=" ")

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

if s == 10 ** 9:
    for i in range(k):
        print(s, end="")
    for i in range(n-k)
        print(1, end="")
else:
    for i in range(k):
        print(s, end="")
    for i in range(n-k)
        print(s+1, end="")
Problem p02812 (python)

Fixed submission:
n = int(input())
s = input()
cnt = 0
for i in range(n):
    if i == n-2 or i== n-1 :
        continue
    if s[i]== "A" and s[i+1] == "B" and s[i+2] == "C" :
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()
cnt = 0
    for i in range(n):
        if i == n-2 or i== n-1 :
            continue
        if s[i]== "A" and s[i+1] == "B" and s[i+2] == "C" :
            cnt+=1
    print(cnt)

Buggy submission (verdict: Runtime Error):
s = input()
cnt = 0
    for i in range(n):
        if i == n-2 or i== n-1 :
            continue
        if s[i]== "A" and s[i+1] == "B" and s[i+2] == "C" :
            cnt+=1
    print(cnt)
Problem p02813 (python)

Fixed submission:
import itertools
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
permutations_lis = itertools.permutations(range(1,n+1))# 全ての場合のリストを生成
dis_list = []
for i,case in enumerate(permutations_lis):
    if list(case) == p :
        a = i 
    if list(case) == q :
        b = i
print(abs(a-b))

Buggy submission (verdict: Runtime Error):
import itertools
n = int(input())
p = list(map(int, input().split()))
q = list(map(int, input().split()))
p = [i-1 for i in p]
q = [i - 1 for i in q]
permutations_lis = itertools.permutations(range(n))# 全ての場合のリストを生成
dis_list = []
for i,case in enumerate(permutations_lis):
    if list(case) == p :
        a = i 
    elif list(case) == q :
        b = i
print(abs(a-b))
Problem p02830 (python)

Fixed submission:
n = int(input())
s,t = map(str,input().split())

for i in range(n):
    print(s[i]+t[i],end="")

Buggy submission (verdict: Runtime Error):
n = int(input)
s,t = map(str,input().split())

for i in range(n):
    print(s[i]+t[i],end="")
Problem p02842 (python)

Fixed submission:
n = int(input())

for i in range(n+1):
    if int(i * 1.08) == n:
        print(i)
        exit()
print(":(")

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

for i in range(n+1):
    if i * 1.08 == n:
        print("Yes")
        exit()
pritn(":(")
Problem p02982 (python)

Fixed submission:
import numpy as np
def is_square(n):
    for i in range(200):
        if i*i == n:
            return True
    return False
n,d = map(int, input().split())
x = []
for i in range(n):
    x.append(list(map(int,input().split())))

x = np.array(x)

count = 0
for i in range(n):
    for j in range(i+1,n):
        l = x[i] - x[j]
        l = np.square(l)
        l = np.sum(l)
        flag = is_square(l)
        if(flag) :
            count +=1

print(count)

Buggy submission (verdict: Runtime Error):
import numpy as np
n,d=map(int,input().split())
x=[]
for i in range(n):
  l=map(int,input().split())
  x.append(l)

x=np.array(x)

def dist(x,y):
  diff=x-y
  diff_sq=np.square(diff)
  return(np.sqrt(np.sum(diff_sq)))

ans=0
for N in range(n):
    for i in range(N,n):
        X = dist(x[N], x[i])
 
        if X.is_integer():
            ans += 1
 
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
n,d=map(int,input().split())
x=[]

def dist(x,y):
  diff=x-y
  diff_sq=np.square(diff)
  return(np.sqrt(np.sum(diff_sq)))

ans=0
for N in range(n):
    for i in range(N,n):
        X = dist(x[N], x[i])
 
        if X.is_integer():
            ans += 1
 
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
n,d=map(int,input().split())
x=[]

def dist(x,y):
  diff=x-y
  diff_sq=np.square(diff)
  return(np.sqrt(np.sum(diff_sq)))

ans=0
for N in range(n):
    for i in range(N,n):
        X = distance(x[N], x[i])
 
        if X.is_integer():
            ans += 1
 
print(ans)
Problem p02995 (python)

Fixed submission:
import fractions
 
def gcd(a,b):
    return fractions.gcd(a,b)
a,b,c,d = map(int, input().split())

cd = gcd(c,d)
cd = c*d //cd
c_able = b//c - (a-1)//c
d_able = b//d - (a-1)//d
cd_able = b//(cd) - (a-1)//(cd)

print(b- a + 1 - (c_able + d_able - cd_able))

Buggy submission (verdict: Runtime Error):
import math 
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
a,b,c,d = map(int, input().split())

cd = gcd(c,d)
cd = c*d //cd
c_able = b//c - (a-1)//c
d_able = b//d - (a-1)//d
cd_able = b//(cd) - (a-1)//(cd)

print(b- a + 1 - (c_able + d_able - cd_able))

Buggy submission (verdict: Runtime Error):
import math 
from functools import reduce
 
def gcd(*numbers):
    return reduce(math.gcd, numbers)
a,b,c,d = map(int, input().split())

cd = gcd(c,d)
cd = c*d //cd
c_able = b//c - (a-1)//c
d_able = b//d - (a-1)//d
cd_able = b//(cd) - (a-1)//(cd)

print(b- a + 1 - (c_able + d_able - cd_able))
Problem p03030 (python)

Fixed submission:
n = int(input())
spi = []
for i in range(n):
    s, p = input().split()
    spi.append((s,-int(p), i))
spi = sorted(spi)
for s, p, i in spi:
    print(i+1)

Buggy submission (verdict: Runtime Error):
n = int(input())
spi = []
for i in range(n):
    s, p = map(input().split())
    spi.append((s,-int(p), i))
spi = sorted(spi)
for s, p, i in spi:
    print(i+1)
Problem p03155 (python)

Fixed submission:
n = int(input())
h = int(input())
w = int(input())

print((n-w+1)*(n-h+1))

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

print((n-w+1)*(n-h+1))
Problem p03479 (python)

Fixed submission:
import heapq
from sys import stdin
input = stdin.readline

#入力
# s = input()
# n = int(input())
# a,b = map(int, input().split())
# a = list(map(int,input().split()))
# w = [int(input()) for i in range(n)]

# ab=[]
# for i in range(m):
#     a,b = map(int, input().split())
#     ab.append((a,b))
     
def main():
    a,b = map(int, input().split())
    ans = 0
    while a <=b:
        ans+=1
        a*=2
    print(ans)
        
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
import heapq
from sys import stdin
input = stdin.readline

#入力
# s = input()
# n = int(input())
x,y = map(int, input().split())
# a = list(map(int,input().split()))
# w = [int(input()) for i in range(n)]

# ab=[]
# for i in range(m):
#     a,b = map(int, input().split())
#     ab.append((a,b))

print(x)
     
def main():
    ans = 0
    val = x
    while val <=y:
        ans+=1
        x*=2
    print(ans)
        
    

    
    

if __name__ == '__main__':
    main()
Problem p03565 (python)

Fixed submission:
s = input()[::-1]
t = input()[::-1]
sl, tl = len(s), len(t)
for i in range(sl - tl + 1):
    for j in range(tl):
        if s[i + j] != "?" and s[i + j] != t[j]:
            break
    else:
        print((s[:i] + t + s[i + tl:]).replace("?", "a")[::-1])
        break
else:
    print("UNRESTORABLE")

Buggy submission (verdict: Runtime Error):
import re
s = input()
t = input()

for i in range(len(s) - len(t), -1, -1):
	if re.fullmatch(s[i:i + len(t)].replace("?", "."), t):
		print((s[:i] + t + s[i+len(t)]).replace("?","a"))
		break
else:
	print("UNRESTORABLE")
Problem p03665 (python)

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

odd = 0
even = 0

for i in a:
    if i %2 ==0:
        even +=1
    else:
        odd+=1
if even == n:
    if p == 0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))

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

odd = 0
even = 0

for i in a:
    if a %2 ==0:
        even +=1
    else:
        odd+=1
if even == n:
    if p == 0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))

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

odd = 0
even = 0

for i in a:
    if a %2 ==0:
        even +=1
    else:
        odd+=1
if even == n:
    if p == 0:
        print(2**n)
    else:
        print(0)
else:
    print(2**(n-1))
Problem p02690 (python)

Fixed submission:
X=int(input())
ans = []
for a in range(1001):
    for b in range(-1000,1001):
        if a**5-b**5 == X:
            ans = [a,b]
            break
print(ans[0],ans[1])

Buggy submission (verdict: Runtime Error):
X=int(input())
ans = []
for a in range(-100,101):
    for b in range(-100,101):
        if a**5-b**5 == X:
            ans = [a,b]
            break
print(ans[0],ans[1])
Problem p02732 (python)

Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
ac = Counter(A)
comblist = [0 for i in range(max(ac.values())+1)]
if max(ac.values()) == 1:
    for i in range(N):
        print(0)
else:
    comblist[2] = 1
    for i in range(3,max(4,max(ac.values())+1)):
        comblist[i] = comblist[i-1]*i//(i-2)
    ans = {}
    anssum = 0
    for k,v in ac.items():
        if v > 1:
            anssum += comblist[v]
        if k not in ans:
            if v == 2:
                ans[k] = -1
            elif v == 1:
                ans[k] = 0
            else:
                ans[k] = comblist[v-1] - comblist[v]
    for i in A:
        print(anssum+ans[i])

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
ac = Counter(A)
comblist = [0 for i in range(max(ac.values())+1)]
comblist[2] = 1
for i in range(3,max(4,max(ac.values())+1)):
    comblist[i] = comblist[i-1]*i//(i-2)
ans = {}
anssum = 0
for k,v in ac.items():
    if v > 1:
        anssum += comblist[v]
    if k not in ans:
        if v == 2:
            ans[k] = -1
        elif v == 1:
            ans[k] = 0
        else:
            ans[k] = comblist[v-1] - comblist[v]
for i in A:
    print(anssum+ans[i])
Problem p02743 (python)

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

if a == 0 and b == 0:
    if c > 0:
        print('Yes')
    else:
        print('No')
elif c-a-b <= 0:
    print('No')
else:
    if 4*a*b < (c-a-b)**2:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
if a*b < ((c-a-b)/2)**2:
    print('Yes')
else:
    print('No')
Problem p02761 (python)

Fixed submission:
N,M = map(int,input().split())
sc = {}
flag = False
for i in range(M):
    s,c = map(int,input().split())
    if N!=1 and s==1 and c == 0:
        flag =True
        break
    elif s not in sc:
        sc[s] = c
    else:
        if sc[s] != c:
            flag = True
            break
if flag:
    print(-1)
elif N == 1 and M == 0:
    print(0)
else:
    if N == 1:
        print(sc[1])
    else:
        ans = [0 for i in range(N)]
        ans[0] = 1

        for s,c in sc.items():
            ans[s-1] = c
        print(*ans,sep='')
        print()

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
sc = {}
flag = False
smax = 0
for i in range(M):
    s,c = map(int,input().split())
    smax = max(s,smax)
    if s > N:
        flag = True
        break
    elif s not in sc:
        sc[s] = c
    else:
        if sc[s] != c:
            flag = True
            break
if flag:
    print(-1)
else:
    ans = [0 for i in range(smax)]
    for s,c in sc.items():
        ans[s-1] = c
    if ans[0] == 0:
        print(-1)
    else:
        print(*ans,sep='')

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(M)]
c = [i[1] for i in sc]
s = [i[0] for i in sc]
smax = max(s)
sc2 = [-1 for i in range(smax)]
flag = False
for s1,c1 in sc:
    if sc2[s1-1] == -1:
        sc2[s1-1] = c1
    else:
        flag = True
        break
if -1 in sc2:
    num = 0
else:
    num = int(''.join(map(str,sc2)))
if smax > N or flag or num == 0:
    print(-1)
else:
    if N == 1:
        if num <= 9:
            print(num)
    else:
        rem = N-smax
        print(str(num) + '0'*rem)

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
sc = [list(map(int,input().split())) for i in range(M)]
c = [i[1] for i in sc]
s = [i[0] for i in sc]
smax = max(s)
sc2 = [-1 for i in range(smax)]
flag = False
for s1,c1 in sc:
    if sc2[s1-1] == -1:
        sc2[s1-1] = c1
    else:
        flag = True
        break
num = int(''.join(map(str,sc2)))
if smax > N or flag or num == 0:
    print(-1)
else:
    if N == 1:
        if num <= 9:
            print(num)
    else:
        rem = N-smax
        print(str(num) + '0'*rem)
Problem p02787 (python)

Fixed submission:
#H = int(input())
H,N = list(map(int,input().split()))
#H = sorted(list(map(int,input().split())))
AB = sorted([list(map(int,input().split())) for i in range(N)])
dp = [float('inf') for i in range(H)]
dp[0] = 0
for i in range(N):
    for j in range(H):
        if j-AB[i][0] >= 0:
            dp[j] = min(dp[j],dp[j-AB[i][0]]+AB[i][1])
ans = float('inf')
for i in range(N):
    for j in range(max(0,H-AB[i][0]),H):
        if dp[j] != float('inf') and j+AB[i][0] >= H:
            ans = min(ans,dp[j]+AB[i][1])
print(ans)

Buggy submission (verdict: Runtime Error):
#H = int(input())
H,N = list(map(int,input().split()))
#H = sorted(list(map(int,input().split())))
AB = [list(map(int,input().split())) for i in range(N)]
dp = [[float('inf') for i in range(H)] for j in range(N)]
for i in range(N):
    dp[i][0] = 0
for i in range(N):
    for j in range(H):
        if j-AB[i][0] >= 0:
            dp[i][j] = min(dp[i][j],dp[i][j-AB[i][0]]+AB[i][1])
for i in range(1,N):
    for j in range(H):
        if j-AB[i-1][0] >= 0:
            dp[i][j] = min(dp[i-1][j],dp[i][j],dp[i-1][j-AB[i-1][0]]+AB[i-1][1])
        if j-AB[i][0] >= 0:
            dp[i][j] = min(dp[i-1][j],dp[i][j],dp[i][j-AB[i][0]]+AB[i][1])

ans = float('inf')
for i in range(N):
    for j in range(H-AB[i][0],H):
        if dp[i][j] != float('inf'):
            ans = min(ans,dp[i][j]+AB[i][1])
print(ans)
Problem p02837 (python)

Fixed submission:
N= int(input())
Harray = []
for i in range(N):
    Aarray = []
    A = int(input())
    for j in range(A):
        xy = list(map(int,input().split()))
        Aarray.append(xy)
    Harray.append(Aarray)


count = []
for i in range(2**N):
    honest = [0 for i in range(N)]
    c = 0
    for j in range(N):
        if (i >> j) & 1 == 1:
            honest[j] = 1
    for k in range(N):
        if honest[k] == 1:
            ar = Harray[k]
            for l in ar:
                if honest[l[0]-1] != l[1]:
                    c = 1
    if c == 0:
        count.append(honest.count(1))
print(max(count))

Buggy submission (verdict: Runtime Error):
N = int(input())
Harray = []
for i in range(N):
    Aarray = []
    A = int(input())
    for j in range(A):
        xy = list(map(int,input().split()))
        Aarray.append(xy)
    Harray.append(Aarray)

carray = []

for Ai in Harray:
    honest = [Harray.index(Ai)]
    honestcont = [Ai]
    for ans in Ai:
        que = []
        if ans[1] == 1:
            honest.append(ans[0]-1)
            honestcon.append(Harray[ans[0]-1])
            que.append(ans[0]-1)
        while len(que) > 0:
            d = que[0]

            que.pop(0)
            
            e = 0
            for h in honestcon:
                if h[1] == 1:
                    h2 = [h[0], 0]
                else:
                    h2 = [h[0], 1]
                if h2 in Harray[d]:
                    e = 1
            
            for h4 in honest:
                if [h4,0] in Harray[d]:
                    e = 1
            
            if e == 0:
                for ans2 in Harray[d]:
                    if (ans2[1] == 1) and (ans2[0] not in honest):
                        que.append(ans2[0]-1)
            else:
                honest = []
                break
                    
    carray.append(len(honest))

print(max(carray))
Problem p02843 (python)

Fixed submission:
X = int(input())
if X >= 2000:
    print(1)
elif X<= 99:
    print(0)
else:
    c = 0
    for i in range(1,20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    print(c)

Buggy submission (verdict: Runtime Error):
X = int(input())
dp = [0 for i in range(X+1)]
if X <100:
    print(0)
else:
    for i in range(100,106):
        dp[i] =1
    for i in range(1,X+1):
        if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
            dp[i] = 1
    print(dp[-1])

Buggy submission (verdict: Runtime Error):
X = int(input())
dp = [0 for i in range(X+1)]
for i in range(100,106):
    dp[i] =1
for i in range(1,X+1):
    if dp[i-100] == 1 or dp[i-101] == 1 or dp[i-102] == 1 or dp[i-103] == 1 or dp[i-104] == 1 or dp[i-105] == 1:
        dp[i] = 1
print(dp[-1])

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 2000:
    print(1)
elif X<= 99:
    print(0)
else:
    c = 0
    for i in range(1,20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    

print(c)

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if int(X//100) == i:
            if X%100 <= i*5:
                c=1
    

print(c)

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if X%100 <= i*5:
            c=1
    

print(c)

Buggy submission (verdict: Runtime Error):
X = int(input())
if X >= 2000:
    print(1)
else:
    c = 0
    for i in range(20):
        if X%100 <= i*5:
            c=1
        else:
            c=0
    

print(c)

Buggy submission (verdict: Runtime Error):
X = int(input())
x = X%2100
c = 0
for i in range(1,21):
    if int(x//100) == i:
        if x%100  <= i*5:
            c=1
        else:
            continue
if x = 2100:
    c=1
print(c)
Problem p02854 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
Asum = sum(A)
Asum2 = 0
c = 0
for mid in range(len(A)):
    if 2*Asum2 > Asum:
        c =1
        Asum3 = Asum2
        mid -= 1
        Asum2 -= A[mid]
        break
    Asum2 += A[mid]
if c == 0:
    if 2*Asum2 > Asum:
        Asum3 = Asum2
        mid -= 1
        Asum2 -= A[mid]
if abs(Asum - 2*Asum2) <= abs(Asum - 2*Asum3):
    Asuma = Asum2
else:
    Asuma = Asum3
c = abs(Asum - 2*Asuma)
print(c)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
Asum = sum(A)
Asum2 = 0
for mid in range(len(A)):
    if 2*Asum2 > Asum:
        Asum3 = Asum2
        mid -= 1
        Asum2 -= A[mid]
        break
    Asum2 += A[mid]

if abs(Asum - 2*Asum2) <= abs(Asum - 2*Asum3):
    Asuma = Asum2
else:
    Asuma = Asum3
c = abs(Asum - 2*Asuma)
print(c)
Problem p02882 (python)

Fixed submission:
import math
a,b,x = map(int,input().split())
if x == b*(a**2):
  print(0)
elif x >= (a**2)*b/2 and x < b*(a**2):
  t = math.atan(2*((a**2)*b - x)/(a**3))
  deg = math.degrees(t)
  print(deg)

else:
  t = math.atan(a*(b**2)/(2*x))
  deg = math.degrees(t)
  print(deg)

Buggy submission (verdict: Runtime Error):
import math
a,b,x = map(int,input().split())
t = math.atan(2*((a**2)*b - x)/(a**3))
deg = math.degree(t)