Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
x=input()

if x>0.5:
  print(0)
elif x<0.5:
  print(1)


Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
x=int(input())

if s==0:
  print( 1)
elif s==1:
  print( 0)

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
x=int(input())

if s==0:
  return 1
elif s==1:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
x=int(input())
s=input()
if s==0:
  return 1
elif s==1:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
x=int(input())

if x==0:
  return 1
elif x==1:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
if x==0:
   print (1)
elif x==1:
   print(0)

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
x=int(a)
if a==0:
   print (1)
elif a==1:
   print(0)

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
x=int(a)
if a==0:
  return 1
elif a==1:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
if x==0:
  return 1
elif x==1:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
if x==0:
  return 1
else:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)

Buggy python submission (verdict: Runtime Error):
if x=0:
  return 1
else:
  return 0

Fixed submission:
x=int(input())

if x==0:
  print(1)
elif x==1:
  print(0)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
d=int(input())

m=a*c

if a*d>m:
  m=a*d

if b*c>m:
  m=b*c

if b*d>m:
  m=b*d
  
print(m)
  

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

m=a*c

if a*d>m:
  m=a*d

if b*c>m:
  m=b*c

if b*d>m:
  m=b*d
  
print(m)
Buggy python submission (verdict: Runtime Error):
D=int(input())
T=int(input())
S=int(input())

if T*S>=D:
  print('Yes')
else:
  print('No')

Fixed submission:
a=list(map(int,input().split()))
D=a[0]
T=a[1]
S=a[2]
if T*S>=D:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
input(D)
input(T)
input(S)

if T*S>=D:
  print('Yes')
else:
  print('No')

Fixed submission:
a=list(map(int,input().split()))
D=a[0]
T=a[1]
S=a[2]
if T*S>=D:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
S = str(input())
if S[-1] == 's':
  S += 's'
else:
  S += 'es'
return S



Fixed submission:
S = str(input())
if S[-1] != 's':
  S += 's'
else:
  S += 'es'
print(S)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split(' ')))

cnt = 0

for i in range(1,len(A)):
  if A[i] < A[i-1]:
	cnt += A[i-1] - A[i]
    A[i] = A[i-1]
    
print(cnt)

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

lst = A[:]
B = [0]
for i in range(1, len(A)):
  if lst[i] < lst[i-1]:
	  B.append(lst[i-1] - lst[i])
	  lst[i] = lst[i-1]
  else:
    B.append(0)
    
print(sum(B))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
cnt = 0

for i in range(1,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt)

Fixed submission:
n = int(input())
cnt = 0

for i in range(3,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt+n-1+(n-1)//2)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
  
def fctr(n):
    f=[]
    c=0
    r=int(n**0.5)
    for i in range(2,r+2):
        while n%i==0:
            c+=1
            n=n//i
        if c!=0:
            f.append([i,c])
            c=0
    if n!=1:
        f.append([n,1])
    return f
cnt = 0
for i in range(1,n):
  x =1
  a = fctr(n-i)
  for j in range(len(a)):
    x *= (a[j][1]+1)
  cnt += x
print(cnt)
  

Fixed submission:
n = int(input())
cnt = 0

for i in range(3,n):
  for j in range(1,n//i+1):
    if i * j < n:
      cnt +=1
      
print(cnt+n-1+(n-1)//2)
Buggy python submission (verdict: Runtime Error):
n = int(input())

a = [0]*10000

for x in range(1, 100):
  for y in range(1, 100):
    for z in range(1,100):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10000:
        	a[v] += 1
for i in range(n):
  print(a[i+1])

Fixed submission:
n = int(input())

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
m = int(n ** 0.5) + 1
for i in range(1,n+1):
  cnt = 0
  for x in range(1, m):
    for y in range(1, m):
      if (x+y)**2-4*(x**2+y**2+x*y-i) >0:
        z = (-(x+y)+((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2       
        if z%1 == 0 and z>0:            
          cnt += 1
      else:
        break
  print(cnt)

Fixed submission:
n = int(input())

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])

Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(-1 + (n-2) ** 0.5) + 1
for i in range(1,n+1):
  cnt = 0
  for x in range(1, m):
    for y in range(1, m):
      if (x+y)**2-4*(x**2+y**2+x*y-i) >0:
        z = (-(x+y)+((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2       
        if z%1 == 0 and z>0:            
          cnt += 1
      else:
        break
  print(cnt)

Fixed submission:
n = int(input())

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])

Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(-1 + (n-2) ** 0.5) + 1
for i in range(1,n+1):
  cnt = 0
  for x in range(1, m):
    for y in range(1, m):
      if (x+y)**2-4*(x**2+y**2+x*y-i) >0:
        z = (-(x+y)+((x+y)**2-4*(x**2+y**2+x*y-i))**0.5)/2       
        if z%1 == 0 and z>0:            
          cnt += 1
      else:
        break
  print(cnt)
 

Fixed submission:
n = int(input())

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])

Buggy python submission (verdict: Runtime Error):
n = int(input())
m = int(-1 + (n-2) ** 0.5) + 1
for i in range(n):
  cnt = 0
  for x in range(1, m):
    for y in range(1, m):
      for z in range(1, m):
        if x * x + y * y + z * z + x * y + y * z + z * x == i:
          cnt += 1
  print(cnt)

Fixed submission:
n = int(input())

a = [0]*10001

for x in range(1, 101):
  for y in range(1, 101):
    for z in range(1,101):
        v = x*x+y*y+z*z+x*y+y*z+x*z
        if  v < 10001:
        	a[v] += 1
for i in range(n):
  print(a[i+1])
Buggy python submission (verdict: Runtime Error):
a = int(input())
print(a + a**2 + a***a)

Fixed submission:
a = int(input())
print(a + a**2 + a**3)
Buggy python submission (verdict: Runtime Error):
a, b, n =  map(int, input().split())
p = 0
for i in range(1, n+1):
  if p < (a*i)//b - a*(i//b):
    p = (a*i)//b - a*(i//b)
print(p)

Fixed submission:
k = int(input())
a, b = map(int,input().split())
list1 = []
x =(k+a-1)//k
y = b // k

for i in range(x,y+1):
  list1.append(i)
if list1 == []:
  print('NG')
else:
  print('OK')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
b = [a.count(x)-1 for x in a]
c = sum(b)//2

for y in b:
	print(c-y)

Fixed submission:
import collections

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

c = collections.Counter(a)
for i in c:
  cnt += c[i]*(c[i]-1)//2



for i in range(n):
	print(cnt-c[a[i]]+1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

b = [a.count(x)-1 for x in a]
c = sum(b)//2

for i in range(n):
  print(c-b[i])

Fixed submission:
import collections

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

c = collections.Counter(a)
for i in c:
  cnt += c[i]*(c[i]-1)//2



for i in range(n):
	print(cnt-c[a[i]]+1)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
from scipy.special import comb

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

cc = collections.Counter(a)
b = [c[1] for c in cc.items()]
x = len(b)
t = 0
for i in range(x):
  t += comb(b[i], 2)

for i in range(n):
  y = a.count(a[i])
  if y >=2:
    ans = t - comb(y,2) + comb(y-1,2)
  else:
    ans = t
  print(int(ans))

Fixed submission:
import collections

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

c = collections.Counter(a)
for i in c:
  cnt += c[i]*(c[i]-1)//2



for i in range(n):
	print(cnt-c[a[i]]+1)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
from scipy.special import comb

n = int(input())
aa = list(map(int, input().split()))
xx = [0]*n
for i in range(n):
  a = 0
  if i == 0:
    bb = aa[1:]
  elif i == n-1:
    bb = aa[:-1]
  else:
    bb = aa[:i] + aa[i+1:]
  cc = collections.Counter(bb)
  d = [c[1] for c in cc.items()]
  for j in range(len(d)):
    a += comb(d[j], 2, exact=True)
  print(a)

Fixed submission:
import collections

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

c = collections.Counter(a)
for i in c:
  cnt += c[i]*(c[i]-1)//2



for i in range(n):
	print(cnt-c[a[i]]+1)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
from scipy.special import comb

n = int(input())
aa = list(map(int, input().split()))
xx = [0]*n
for i in range(n):
  a = 0
  if i == 0:
    bb = aa[1:]
  elif i == n-1:
    bb = aa[:-1]
  else:
    bb = aa[:i] + aa[i+1:]
  cc = collections.Counter(bb)
  d = [c[1] for c in cc.items()]
  for j in range(len(d)):
    a += comb(d[j], 2, exact=True)
  xx[i] = a
  
for i in range(n):
  print(xx[i])


Fixed submission:
import collections

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

c = collections.Counter(a)
for i in c:
  cnt += c[i]*(c[i]-1)//2



for i in range(n):
	print(cnt-c[a[i]]+1)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int,input().split()))
q = [(x+1)/2 for x in p]
ans = 0

for i in range(n-k+1):
  x = sum(q[i:i+k])
  if ans < x:
    ans = x
  
print(ans)

Fixed submission:
n, k = map(int, input().split())
p = list(map(int,input().split()))
q = [(x+1)/2 for x in p]
q1 = sum(q[:k])
ans = q1

for i in range(n-k):
  x = q1-q[i] +q[i+k]
  q1 = x
  if ans < x:
    ans = x
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int,input().split()))
q = [(x+1)/2 for x in p]
arr = []

for i in range(n-k+1):
  arr.append(sum(q[i:i+k]))
  
print(max(arr))

Fixed submission:
n, k = map(int, input().split())
p = list(map(int,input().split()))
q = [(x+1)/2 for x in p]
q1 = sum(q[:k])
ans = q1

for i in range(n-k):
  x = q1-q[i] +q[i+k]
  q1 = x
  if ans < x:
    ans = x
  
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int, input().split())
p = list(map(int,input().split()))
arr = []

for i in range(n-k+1):
  cnt = 0
  for j in range(i, i+k):
    cnt += (p[j] + 1)/2
    
  arr.append(cnt)
  
print(max(arr))

Fixed submission:
n, k = map(int, input().split())
p = list(map(int,input().split()))
q = [(x+1)/2 for x in p]
q1 = sum(q[:k])
ans = q1

for i in range(n-k):
  x = q1-q[i] +q[i+k]
  q1 = x
  if ans < x:
    ans = x
  
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int, input().split()))
count = 0
for i in range(N):
  if P[i] == min(P[:i+1]):
    count += 1
print(count)

Fixed submission:
N = int(input())
P = list(map(int, input().split()))
count = 1
m = P[0]
for i in range(1, N):
  if P[i] < m:
    m = P[i]
    count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
n, k, s = map(int, input().split())
if s != 10**9:
  if s % 2 == 0:
    a = [s//2]*(k+1)+[10**9]*(n-k-1)
  if s % 2 == 1:
    if k % 2 == 0:
      a = [s//2, s//2 + 1]*(k//2) +[s//2] +[10**9]*(n-k-1)
    else:
      a = [s//2, s//2 + 1]*(k//2+1) + [10**9]*(n-k-1)
else:
  if k % 2 == 0:
    a =[10**9,1]*k//2
  else:
    a =[10**9,1]*k//2 + [10**9]
print(*a)

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

if s < 10**9:

  if k > 0: 
      aa = [s]*k + [s+1]*(n-k)
  elif k == 0:
      aa = [s+1]*n

else:
  aa =[s]*k + [1]*(n-k)

print(*aa)

Buggy python submission (verdict: Runtime Error):
n, k, s = map(int, input().split())
if s != 10**9:
  if s % 2 == 0:
    a = [s//2]*(k+1)+[10**9]*(n-k-1)
  if s % 2 == 1:
    if k % 2 == 0:
      a = [s//2, s//2 + 1]*(k//2) +[s//2] +[10**9]*(n-k-1)
    else:
      a = [s//2, s//2 + 1]*(k//2+1) + [10**9]*(n-k-1)
else:
  if k % 2 == 0:
    a =[10**9,1]*k//2:
  else:
    a =[10**9,1]*k//2 + [10**9]
print(*a)

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

if s < 10**9:

  if k > 0: 
      aa = [s]*k + [s+1]*(n-k)
  elif k == 0:
      aa = [s+1]*n

else:
  aa =[s]*k + [1]*(n-k)

print(*aa)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = [input().split for i in range(M)]
cac = 0
cwa = 0

for i in range(1, N + 1):
    for a in A:
        while a[0] == str(i):
            if a[1] == 'WA':
                cwa += 1
            else:
                cac += 1
                break
        while a[0] == str(i):
            A.remove(a)
print(cac, cwa)

Fixed submission:
n, m = map(int, input().split())
a = [input().split() for i in range(m)]
wa =[0]*n #ACまでのWA数
ac = [0]*n

for i in range(m):
    if a[i][1] == 'AC':
      ac[int(a[i][0])-1] = 1
    else:
      if ac[int(a[i][0])-1]==0:
        wa[int(a[i][0])-1] +=1
cnt1, cnt2= 0,0
for i in range(n):
  if ac[i] ==1:
    cnt1 += ac[i]
    cnt2 += wa[i]
        
print(cnt1, cnt2)

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())
A = [ input().split() for i in range(M)]
cac = 0
cwa = 0

for i in range(1, N+1):
  list1 = []
  for j in range(M):
    if  A[j][0] == str(i):
      list1.append(A[j][1])

  
  for k in range(1, len(list1)):
    if list1[k]=='AC':
      cac += 1
      cwa += list1[:k].count('WA')
      break
print(cac, cwa)

Fixed submission:
n, m = map(int, input().split())
a = [input().split() for i in range(m)]
wa =[0]*n #ACまでのWA数
ac = [0]*n

for i in range(m):
    if a[i][1] == 'AC':
      ac[int(a[i][0])-1] = 1
    else:
      if ac[int(a[i][0])-1]==0:
        wa[int(a[i][0])-1] +=1
cnt1, cnt2= 0,0
for i in range(n):
  if ac[i] ==1:
    cnt1 += ac[i]
    cnt2 += wa[i]
        
print(cnt1, cnt2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
cnt = 0
x = len(str(n))

if n % 2 == 1:
  print(0)
  EXIT()
for i in range(1,26):
  cnt += n//((5**i)* 2)


print(cnt)

Fixed submission:

n = int(input())
cnt = 0
i = 1
x = 10
if n % 2 == 1:
  print(0)
else:
  while x <= n:
    
    cnt += n//x
    x *= 5


  print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ar =[]


for i in range(1, N):
  ar.append(abs(sum(A[:i]) - sum(A[i:])))
print(min(ar))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
s = sum(A)

av = s / 2
x = 0
y = 0

for i in range(N):
  x += A[i]
  
  if x < av < x +A[i+1]:
    
    y = s - x - A[i+1]
    
    if x > y:
      print(A[i+1]-x+y)
      
    else:
      print(A[i+1]-y+x)
  elif x == av:
    print(0)
Buggy python submission (verdict: Runtime Error):
s = input()
n = len(s) #length s
aa = ['.'] * (n + 1)

if s[0] == '<':
  aa[0] = 0

for i in range(n-1):
  if s[i] ==  '>' and s[i+1] == '<':
    aa[i+1] = 0 
  elif s[i] == '<' and s[i+1] == '>':
    aa[i+1] = n
    
id0 = [i for i,x in enumerate(aa) if x == 0]
idm = [i for i, x in enumerate(aa) if x == n]


for i in range(len(id0)-1):
  aa[idm[i]] = max(idm[i]-id0[i], id0[i+1]-idm[i])

for i in range(n):
  if s[i] == '<' and aa[i+1] == '.':
    aa[i+1] = aa[i] + 1
for i in range(n-1, 0,-1):
  if aa[i] == '.' and s[i] == '>':
    aa[i] = aa[i+1] +1

print(sum(aa))

Fixed submission:
s = input()
n = len(s) #length s
aa = ['.'] * (n + 1)

if s[0] == '<':
  aa[0] = 0
if s[-1] == '>':
  aa[-1] = 0

for i in range(n-1):
  if s[i] ==  '>' and s[i+1] == '<':
    aa[i+1] = 0 
  elif s[i] == '<' and s[i+1] == '>':
    aa[i+1] = n
    
z = [i for i,x in enumerate(aa) if x == 0]
m = [i for i, x in enumerate(aa) if x == n]


for i in range(len(z)-1):
  aa[m[i]] = max(m[i]-z[i], z[i+1]-m[i])
  aa[m[i]+1] = z[i+1]-m[i]-1
  for j in range(z[i]+1, m[i]):
    aa[j] = aa[j-1] +1
  for k in range(m[i]+2,z[i+1]):
    
    aa[k] = aa[k-1]-1
for i in range(z[-1], n+1):
  if aa[i] == '.':
    aa[i] = aa[i-1]+1
for i in range(z[0]):
  if aa[i] == '.':
    aa[i] = z[0] - i
    

print(sum(aa))
Buggy python submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())

if x == a**2*b:
  print(0)
  
if x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))


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

if x == a**2*b:
  print(0)
  
elif x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))

Buggy python submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())

if x = a**2*b:
  print(0)
  
if x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else x < a**2*b/2:
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))


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

if x == a**2*b:
  print(0)
  
elif x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))

Buggy python submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())
if x > a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
elif x < a**2*b/2:
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))
else:
  print(0)

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

if x == a**2*b:
  print(0)
  
elif x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))

Buggy python submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())
if x > a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
elif x < a**2*b/2
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))
else:
  print(0)

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

if x == a**2*b:
  print(0)
  
elif x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))

Buggy python submission (verdict: Runtime Error):
import math
a, b, x = map(int, input().split())
if x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))

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

if x == a**2*b:
  print(0)
  
elif x >= a**2*b/2:
  print(90 - math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
else:
  
  print((90 - math.degrees(math.atan(2*x/(a*b**2)))))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

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

for j in range(n):
  for i in range(n):
    
    if a[i] == j+1:
      print(i+1, end=' ')

Fixed submission:
n = int(input())

a = list(map(int, input().split()))
b = list(enumerate(a))
c = sorted(b, key=lambda x:x[1])


print(*[c[i][0]+1 for i in range(n)])
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())

start = [K] * N

for i in range(Q):
  a = int(input())
  for j in range(N):
    if j == a-1:
      start[j] += 0
    else:
      start[j] -= 1
        
for i in range(N):
  if start[i] > 0:
    print('Yes')
  else:
    print('No')

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

start = [K - Q] * N

for i in range(Q):
  a = int(input())
  start[a-1] += 1
     
for i in range(N):
  if start[i] > 0:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
A = [int(input()) for i in range(Q)]
start = [K] * N

for i in range(Q):
  for j in range(N):
    if j == A[i]-1:
      start[j] += 0
    else:
      start[j] -= 1
        
for i in range(N):
  if start[i] > 0:
    print('Yes')
  else:
    print('No')

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

start = [K - Q] * N

for i in range(Q):
  a = int(input())
  start[a-1] += 1
     
for i in range(N):
  if start[i] > 0:
    print('Yes')
  else:
    print('No')

Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
m = [K for x in range(N)] 

for i in range(Q):
  m1 = [x-1 for x in m]
  a = int(input())
  m1[a-1] += 1
  m = m1
  
for b in m1:
  if b >0:
    print('Yes')
  else:
    print('No')

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

start = [K - Q] * N

for i in range(Q):
  a = int(input())
  start[a-1] += 1
     
for i in range(N):
  if start[i] > 0:
    print('Yes')
  else:
    print('No')
Buggy python submission (verdict: Runtime Error):
def sum(n):
  if n <=0:
    return n
  return n + sum(n-1)
  
n = int(input())-1

print(sum(n))

Fixed submission:
n = int(input())
print(n*(n-1)//2)

Buggy python submission (verdict: Runtime Error):
from functools import lru_cache

@ lru_cache(maxsize = None)
def sum(n):
  if n <= 0:
    return n
  return n + sum(n-1)
  
n = int(input())-1

print(sum(n))

Fixed submission:
n = int(input())
print(n*(n-1)//2)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 0
for i in range(n):
  ans += i
print(ans)

Fixed submission:
n = int(input())
print(n*(n-1)//2)