Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
from bisect import bisect_left

s = input()
n = len(s)
ans = [0] * n
l = [i for i in range(n - 1) if s[i] == 'R' and s[i + 1] == 'L']
for i in range(n):
    b = bisect_left(l, i)
    print(b, l)
    if s[i] == 'R':
        if (l[b] - i) % 2 == 1:
            ans[l[b] + 1] += 1
        else:
            ans[l[b]] += 1
    elif s[i] == 'L':
        if (i - l[b - 1]) % 2 == 1:
            ans[l[b - 1] + 1] += 1
        else:
            ans[l[b - 1]] += 1
print(ans)

Fixed submission:
from bisect import bisect_left

s = input()
n = len(s)
ans = [0] * n
l = [i for i in range(n - 1) if s[i] == 'R' and s[i + 1] == 'L']
for i in range(n):
    b = bisect_left(l, i)
    if s[i] == 'R':
        if (l[b] - i) % 2 == 1:
            ans[l[b] + 1] += 1
        else:
            ans[l[b]] += 1
    elif s[i] == 'L':
        if (i - l[b - 1]) % 2 == 1:
            ans[l[b - 1] + 1] += 1
        else:
            ans[l[b - 1]] += 1
a = ''
for i in range(n):
    if i != n - 1:
        a += str(ans[i]) + " "
    else:
        a += str(ans[i])
print(a)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
a = [int(input()) for i in range(m)]
s = [1] * (n + 1)
if 1 in a:
    s[1] = 0
for i in range(2, n + 1):
    if i in a:
        s[i] = 0
    else:
        if s[i - 2] == 0 and s[i - 1] == 0:
            print(0)
            exit()
        else:
            s[i] = s[i - 1] + s[i - 2]   
print(s[n] % 1000000007)

Fixed submission:
n, m = map(int, input().split())
s = [1] * (n + 1)
for i in range(m):
    a = int(input())
    s[a] = 0
for i in range(2, n + 1):
    if s[i] == 0:
        continue
    else:
        if s[i - 2] == 0 and s[i - 1] == 0:
            print(0)
            exit()
        else:
            s[i] = s[i - 1] + s[i - 2]   
print(s[n] % 1000000007)
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = (int(input()) for i in range(5))
l2 = []
for i in range(5):
    if n % l[i] == 0:
        l2.append(n // l[i])
    else:
        l2.append(n // l[i] + 1)
l2.sort(reverse = True)
print(l2[0] + 4)

Fixed submission:
n = int(input())
l = [int(input()) for i in range(5)]
l2 = []
for i in range(5):
    if n % l[i] == 0:
        l2.append(n // l[i])
    else:
        l2.append(n // l[i] + 1)
l2.sort(reverse = True)
print(l2[0] + 4)
Buggy python submission (verdict: Runtime Error):
n, q = map(int, input().split())
s = input()
ac = [0] * n
c = 0
for i in range(1, n):
    if s[i - 1] == 'A' and s[i] == 'C':
        c += 1
    ac[i] = c
for i in range(q):
    l, r = map(int, input().split())
    print(ac[r - 1] - ac[l + 1] + 1)

Fixed submission:
n, q = map(int, input().split())
s = input()
ac = [0] * n
c = 0
for i in range(1, n):
    if s[i - 1] == 'A' and s[i] == 'C':
        c += 1
    ac[i] = c
for i in range(q):
    l, r = map(int, input().split())
    print(ac[r - 1] - ac[l - 1])
Buggy python submission (verdict: Runtime Error):
from math import gcd

n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
    g = gcd(g, a[i])
print(g)

Fixed submission:
from fractions import gcd

n = int(input())
a = list(map(int, input().split()))
g = a[0]
for i in range(1, n):
    g = gcd(g, a[i])
print(g)
Buggy python submission (verdict: Runtime Error):
n = int(input())
if n == 1:
    print("Hello World")
elif n == 2:
    a, b = map(int, input().split())
    print(a + b)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
elif n == 2:
    a = int(input())
    b = int(input())
    print(a + b)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
count = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                count += 1
print(count)


Fixed submission:
x, a, b = map(int, [input() for i in range(3)])
print((x - a) % b)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
x = int(input())
count = 0
for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if i * 500 + j * 100 + k * 50 == x:
                count += 1
print(count)


Fixed submission:
x, a, b = map(int, [input() for i in range(3)])
print((x - a) % b)
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(input())

if (a * b) % 2 == 0:
    print("Even")
else:
    print("Odd")

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

if (a * b) % 2 == 0:
    print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(cnt)

    if temp!=1:
        arr.append(1)

    if arr==[]:
        arr.append(1)

    return arr

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

    if N == 1:
        print(0)
        return

    e_num = [0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4]
    e_list = factorization(N)

    ans = 0
    for e in e_list:
        ans += e_num[e]
    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append(cnt)

    if temp!=1:
        arr.append(1)

    if arr==[]:
        arr.append(1)

    return arr

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

    if N == 1:
        print(0)
        return

    e_num = []
    for i in range(0, 40):
        for k in range(0, i+1):
            e_num.append(i)
    #print(e_num)

    e_list = factorization(N)

    ans = 0
    for e in e_list:
        ans += e_num[e]
    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):

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

    H = [0]*2*10**5
    for i in range(0,N):
        if i >= A[i]:
            H[i-A[i]] += 1

    ans = 0
    for k in range(0,N):
        Bk = k+A[k]
        if Bk <= 2*10**5:
            ans += H[Bk]

    print(ans)

if __name__ == '__main__':
    main()

Fixed submission:

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

    H = [0]*N
    for i in range(0,N):
        if i >= A[i]:
            H[i-A[i]] += 1

    ans = 0
    for k in range(0,N):
        Bk = k+A[k]
        if Bk < N:
            ans += H[Bk]

    print(ans)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):

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

    ans = 0
    for i in range(N-1, 0,-1):
        if i >= A[i] and i-A[i] >= 0:
            for k in range(0,i-A[i]):
                if i-k == A[i] + A[k]:
                    ans += 1
    print(ans)

if __name__ == '__main__':
    main()


Fixed submission:

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

    H = [0]*N
    for i in range(0,N):
        if i >= A[i]:
            H[i-A[i]] += 1

    ans = 0
    for k in range(0,N):
        Bk = k+A[k]
        if Bk < N:
            ans += H[Bk]

    print(ans)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):

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

    ans = 0
    for i in range(N-1, 0,-1):
        if i-A[i] >= 0:
            for k in range(0,i-A[i]):
                
                if i-k == A[i] + A[k]:
                    ans += 1
    print(ans)

if __name__ == '__main__':
    main()


Fixed submission:

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

    H = [0]*N
    for i in range(0,N):
        if i >= A[i]:
            H[i-A[i]] += 1

    ans = 0
    for k in range(0,N):
        Bk = k+A[k]
        if Bk < N:
            ans += H[Bk]

    print(ans)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
def main():
    num, yen_sum = map(int, input().split())
    yen_sum /=1000
    res = [-1, -1, -1]
    for bill_10000 in range(num+1):
        if bill_10000*10 + (num-bill_10000+1)*5 <= yen_sum:
            continue
        for bill_5000 in range(num-bill_10000+1):
            bill_1000 = num - bill_10000 - bill_5000
            if bill_10000*10 + bill_5000*5 + bill_1000*1 == yen_sum:
                res = [bill_10000, bill_5000, bill_1000]
                break
    print(*res)
    
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    S = input()
    S = S.replace('2017','2018')
    print(S)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    num, yen_sum = map(int, input().split())
    res = [-1, -1, -1]
    for bill_10000 in range(num+1):
        if bill_10000*10000 + (num-bill_10000+1)*5000 < yen_sum:
            continue
        for bill_5000 in range(num-bill_10000+1):
            if bill_10000*10000 + bill_5000*5000 + (num-bill_10000-bill_5000+1)*1000< yen_sum:
                continue
            for bill_1000 in range(num-bill_10000-bill_5000+1):
                if bill_10000*10000 + bill_5000*5000 + bill_1000*1000 == yen_sum\
                    and bill_10000 + bill_5000 + bill_1000 == num:
                    res = [bill_10000, bill_5000, bill_1000]
                    break
    print(*res)
    
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    num, yen_sum = map(int, input().split())
    yen_sum /=1000
    res = [-1, -1, -1]
    for bill_10000 in range(num+1):
        if bill_10000*10 + (num-bill_10000+1)*5 <= yen_sum:
            continue
        for bill_5000 in range(num-bill_10000+1):
            bill_1000 = num - bill_10000 - bill_5000
            if bill_10000*10 + bill_5000*5 + bill_1000*1 == yen_sum:
                res = [bill_10000, bill_5000, bill_1000]
                break
    print(*res)
    
if __name__ == '__main__':
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    num, yen_sum = map(int, input().split())
    res = [-1, -1, -1]
    for bill_10000 in range(num+1):
        for bill_5000 in range(num-bill_10000+1):
            for bill_1000 in range(num-bill_10000-bill_5000+1):

                if bill_10000*10000 + bill_5000*5000 + bill_1000*1000 == yen_sum\
                    and bill_10000 + bill_5000 + bill_1000 == num:
                    res = [bill_10000, bill_5000, bill_1000]
                    break
    print(*res)
    
if __name__ == '__main__':
    main()

Fixed submission:
def main():
    num, yen_sum = map(int, input().split())
    yen_sum /=1000
    res = [-1, -1, -1]
    for bill_10000 in range(num+1):
        if bill_10000*10 + (num-bill_10000+1)*5 <= yen_sum:
            continue
        for bill_5000 in range(num-bill_10000+1):
            bill_1000 = num - bill_10000 - bill_5000
            if bill_10000*10 + bill_5000*5 + bill_1000*1 == yen_sum:
                res = [bill_10000, bill_5000, bill_1000]
                break
    print(*res)
    
if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
import numpy as np

n,m = map(int,input().split())
h=list(map(int,input().split()))

mat=np.zeros((n,n),np.uint8)
for i in range(m):
    x,y= map(int,input().split())
    mat[x-1,y-1]+=1
    mat[y-1,x-1]+=1

count=0
for i in range(n):
    for j in range(n):
        if mat[i,j]!=0 and h[i]<=h[j] and i!=j:
            break
        elif j==n-1:
            count+=1

print(count)

Fixed submission:
import numpy as np

n,m = map(int,input().split())
h=list(map(int,input().split()))

l=[0]*n
for i in range(m):
    x,y=map(int,input().split())
    if h[x-1]<=h[y-1]:
        l[x-1]=1
    if h[x-1]>=h[y-1]:
        l[y-1]=1

count=0
for i in range(n):
    if l[i]==0:
        count+=1

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
s=list(input())

ans=0
for i in range(n):
    for j in range(i+1,n):
        for k in range(j+1,n):
            if s[i]!=s[j] and s[i]!=s[k] and s[j]!=s[k]:
                if j-i!=k-j:
                    ans+=1

print(ans)

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

ans=0
a=0
b=0
c=0
for i in range(n):
    if s[i]=="R":
        a+=1
    if s[i]=="G":
        b+=1
    if s[i]=="B":
        c+=1
ans=a*b*c

for i in range(n):
    for j in range(i+1,n):
        if 2*j-i>n-1:
            break
        if s[i]!=s[j] and s[i]!=s[2*j-i] and s[j]!=s[2*j-i]:
            ans=ans-1
    

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A=list(map(int,input().split()))
ans=1

if(N%2==0):
    for i in range(int(N/2)):
        ans *= (A[i]*A[N-1-i])
else:
    for i in range(int(N/2)):
        ans *= A[i]*A[N-1-i]
    ans*=A[int((N-1)/2)]

if(ans>1000000000000000000):
    print("-1")
else:
    print(ans)
    




Fixed submission:
N = int(input())
A=list(map(int,input().split()))
ans=1
flag=0

for i in range(N):
    if(A[i]==0):
        flag=1

if flag==0:        
    if(N%2==0):
        for i in range(int(N/2)):
            ans *= (A[i]*A[N-1-i])
            if(ans>1000000000000000000):
              break
    else:
        for i in range(int(N/2)):
            ans *= A[i]*A[N-1-i]
            if(ans>1000000000000000000):
                break
        ans*=A[int((N-1)/2)]

if flag==1:
    print(0)
elif(ans>1000000000000000000):
    print(-1)
else:
    print(ans)

Buggy python submission (verdict: Time Limit Exceeded):

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

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

if(ans>1000000000000000000):
    print("-1")
else:
    print(ans)
    




Fixed submission:
N = int(input())
A=list(map(int,input().split()))
ans=1
flag=0

for i in range(N):
    if(A[i]==0):
        flag=1

if flag==0:        
    if(N%2==0):
        for i in range(int(N/2)):
            ans *= (A[i]*A[N-1-i])
            if(ans>1000000000000000000):
              break
    else:
        for i in range(int(N/2)):
            ans *= A[i]*A[N-1-i]
            if(ans>1000000000000000000):
                break
        ans*=A[int((N-1)/2)]

if flag==1:
    print(0)
elif(ans>1000000000000000000):
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
import math
A,B,C,X,Y = list(map(int,input().split()))
max_pizza=max(X,Y)#AピザとBピザのうち、必要な枚数の多い方のピザの枚数
ans=math.inf    

for i in range(0,max_pizza*2,2):#ABピザをi枚買う(iは偶数)
    
    if (X-i/2)<=0 and (Y-i/2)>0:
        ans_kouho = B*(Y-i/2)+C*(i)
    elif (X-i/2)>0 and(Y-i/2)<=0:
        ans_kouho = A*(X-i/2)+C*(i)
    elif (X-i/2)<=0 and(Y-i/2)<=0:
         ans_kouho = C*(i)
    else:
        ans_kouho = A*(X-i/2)+B*(Y-i/2)+C*(i)

    
    if(ans_kouho<ans):
        ans = ans_kouho

print(int(ans))



Fixed submission:

A,B,C,X,Y = list(map(int,input().split()))
max_pizza=max(X,Y)#AピザとBピザのうち、必要な枚数の多い方のピザの枚数
ans=10E+10  

for i in range(0,max_pizza*2+2,2):#ABピザをi枚買う(iは偶数)
    
    if (X-i/2)<=0 and (Y-i/2)>0:
        ans_kouho = B*(Y-i/2)+C*(i)
    elif (X-i/2)>0 and(Y-i/2)<=0:
        ans_kouho = A*(X-i/2)+C*(i)
    elif (X-i/2)<=0 and(Y-i/2)<=0:
         ans_kouho = C*(i)
    else:
        ans_kouho = A*(X-i/2)+B*(Y-i/2)+C*(i)

    
    if(ans_kouho<ans):
        ans = ans_kouho

print(int(ans))
Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
s = 1
f = 1
x = 1000000000000000000
for i in l:
	s *= i
	if s>x:
      print(-1)
      f = 0
      break
if f==1:
  print(s)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
s = 1
f = 1
x = 1000000000000000000
l.sort()
if l[0]==0:
  print(0)
elif l[0]==1 and l[-1]==1:
  print(1)
else:
  l = l[::-1]
  for i in l:
      s *= i
      if s>x:
          print(-1)
          f = 0
          break
  if f==1:
    print(s)

Buggy python submission (verdict: Runtime Error):
n = int(input())
l = list(map(int,input().split()))
s = 1
f = 1
x = 1000000000000000000
for i in l:
	s *= i
	if s>x:
      	f = 0
  		print(-1)
        break
if f==1:
  print(s)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
s = 1
f = 1
x = 1000000000000000000
l.sort()
if l[0]==0:
  print(0)
elif l[0]==1 and l[-1]==1:
  print(1)
else:
  l = l[::-1]
  for i in l:
      s *= i
      if s>x:
          print(-1)
          f = 0
          break
  if f==1:
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
l = list(map(int,input().split()))
s = 1
x = 1000000000000000000
for i in l:
	s *= i
if s>x:
  print(-1)
else:
  print(s)

Fixed submission:
n = int(input())
l = list(map(int,input().split()))
s = 1
f = 1
x = 1000000000000000000
l.sort()
if l[0]==0:
  print(0)
elif l[0]==1 and l[-1]==1:
  print(1)
else:
  l = l[::-1]
  for i in l:
      s *= i
      if s>x:
          print(-1)
          f = 0
          break
  if f==1:
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
s = list(map(int,input().split()))
a = s[0]

if len(s) > 1:
    for i in range(1,N):
        if s[i] == 0:
            a=0
            break
        a = a * s[i]
        
if a > 10**18:
    a = -1
print(a)

Fixed submission:
N = int(input())
s = list(map(int,input().split()))
a = s[0]

if not 0 in s:
    if len(s) > 1:
        for i in range(1,N):
            a = a * s[i]
            
            if a > 10**18:
                a = -1
                break
else:
    a=0
print(a)
Buggy python submission (verdict: Runtime Error):
A,B,C,D = map(int,input().split())
# a = [1] * A + [0] * B + [-1] * C
if (A+B+C) == D:
    
    a = 1 * A + 0 * B + (-1 * C)
    
elif (B >= (D-A)) and (C >= (D-A+B)):
    a = 1 * A + 0 * B + (-1 * (D-A+B))
    
elif A >= D:
    a = 1 * D
    
print(a)

Fixed submission:
A,B,C,D = map(int,input().split())

if D > A:
 
    ancer = 1 * A + 0 * (D - A) + (-1 *(D - A - B))
    
else:
    ancer = 1 * D

print(ancer)

Buggy python submission (verdict: Runtime Error):
A,B,C,D = map(int,input().split())
a = [1] * A + [0] * B + [-1] * C

ancer = 0
for i in range(D):
    ancer += a[i]
    
print(ancer)

Fixed submission:
A,B,C,D = map(int,input().split())

if D > A:
 
    ancer = 1 * A + 0 * (D - A) + (-1 *(D - A - B))
    
else:
    ancer = 1 * D

print(ancer)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

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


for i in range(1,N):
    print(A.count(i))
    
print(0)

Fixed submission:
import collections

N = int(input())

A = list(map(int, input().split()))
c = collections.Counter(A)


for i in range(1,N):
    print(c[i])
    
print(0)
Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
 
m = []
for i in range(M):
    m.append(list(map(int,input().split())))
for i in range(10**N):
    a = str(i)
    
    if i >= 10**(N-1):
            
        for j in range(M):
            try:
                
                if a[m[j][0]-1] == str(m[j][1]):
                    True
                
                else:
                    break
            except:
                break
                
            if j == M-1:
                print(i)
                exit() 
if M==0:
    if N == 1:
        print(0)
    else:
        print(10**(N-1))
        
if M==1:
    if N == 1:
        if m == [[1,0]]
            print(0)
            exit()
        
else :
    print(-1)

Fixed submission:
N,M = map(int,input().split())
 
m = []
for i in range(M):
    m.append(list(map(int,input().split())))
for i in range(10**N):
    a = str(i)
    
    if i >= 10**(N-1):
            
        for j in range(M):
            try:
                
                if a[m[j][0]-1] == str(m[j][1]):
                    True
                
                else:
                    break
            except:
                break
                
            if j == M-1:
                print(i)
                exit()
                
if M==0:
    if N == 1:
        print(0)
        
    else:
        print(10**(N-1))
        
    exit()

elif M==1:
    if N == 1:
        m == [[1,0]]
        print(0)
        exit()


print(-1)

Buggy python submission (verdict: Runtime Error):
N,M = map(int,input().split())
 
m = []
for i in range(M):
    m.append(list(map(int,input().split())))
for i in range(10**N):
    a = str(i)
    
    if i >= 10**(N-1):
            
        for j in range(M):
            try:
                
                if a[m[j][0]-1] == str(m[j][1]):
                    True
                
                else:
                    break
            except:
                break
                
            if j == M-1:
                print(i)
                exit()
                
if M==0:
    if N == 1:
        print(0)
    else:
        print(10**(N-1))
        
if M==1:
    if N == 1:
        if m == [[1,0]]
            print(0)
            exit()
        
else :
    print(-1)

Fixed submission:
N,M = map(int,input().split())
 
m = []
for i in range(M):
    m.append(list(map(int,input().split())))
for i in range(10**N):
    a = str(i)
    
    if i >= 10**(N-1):
            
        for j in range(M):
            try:
                
                if a[m[j][0]-1] == str(m[j][1]):
                    True
                
                else:
                    break
            except:
                break
                
            if j == M-1:
                print(i)
                exit()
                
if M==0:
    if N == 1:
        print(0)
        
    else:
        print(10**(N-1))
        
    exit()

elif M==1:
    if N == 1:
        m == [[1,0]]
        print(0)
        exit()


print(-1)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
import math
 
a = int(input())
 
gusu = a // 2
ngusu = math.floor(gusu)
 
if gusu > ngusu:
  kisu = ngusu + 1
else:
  kisu = ngusu
kaku = kisu // a 
print(raund(kaku,6)

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
import math
 
a = float(input())
 
gusu = a / 2
ngusu = math.floor(gusu)
 
if gusu > ngusu:
  kisu = ngusu + 1
else:
  kisu = ngusu
kaku = kisu / a 

print(kaku)

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
# 整数の入力
import math

a = int(input())
 
gusu = a // 2
ngusu = math.floor(gusu)
 
if gusu > ngusu:
  kisu = ngusu + 1
else:
  kisu = ngusu

kakuritu　= kisu // a 
print(kakuritu)

Fixed submission:
# -*- coding: utf-8 -*-
# 整数の入力
import math
 
a = float(input())
 
gusu = a / 2
ngusu = math.floor(gusu)
 
if gusu > ngusu:
  kisu = ngusu + 1
else:
  kisu = ngusu
kaku = kisu / a 

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

for i in range(N + 1):
    a = N + 1
    b = a - i
    for j in range(b):
        c = b - j
        kingaku += 1000 * c + 5000 * b + 10000 * a
        if kingaku == Y:
            print(a,b,c)
          
            break
    else:
        continue
    break
                   
                
    kingaku = 0

else:
    print(-1,-1,-1)
    

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

for a in range(N + 1):
    be = N - a 
    for b in range(be + 1):
        c = N - b - a
        kingaku = 1000 * c + 5000 * b + 10000 * a

        if kingaku == Y:
            print(a,b,c)
          
            break
    else:
        continue
    break
                   

else:
    print(-1,-1,-1)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = list(map(int,input().split()))
# print(N)

ari = 0
kingaku = 0
ass = list(range(N[0]+1))
for i, j, k in itertools.product(ass,ass,ass):
    kingaku += 1000 * k + 5000 * j + 10000 * i
    if kingaku == N[1]:
        if (k + j + i) == N[0]:
            print(i,j,k)
            ari = 1
            break
                   
                
    kingaku = 0

if ari == 0:
    print(-1,-1,-1)

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

for a in range(N + 1):
    be = N - a 
    for b in range(be + 1):
        c = N - b - a
        kingaku = 1000 * c + 5000 * b + 10000 * a

        if kingaku == Y:
            print(a,b,c)
          
            break
    else:
        continue
    break
                   

else:
    print(-1,-1,-1)