Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

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

i = 0
x = 1
while i < n:
    x = x * a[i]
    i += 1

if x > 1000000000000000000:
    print(-1)
else:
    print(x)

Fixed submission:
n = int(input())

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

i = 0
x = 1
while i < n:
    x = x * a[i]
    i += 1
    if x > 1000000000000000000:
        print(-1)
        exit()

print(x)
Buggy python submission (verdict: Runtime Error):
s_str = input()
# print(s_str)
# print(type(s_str))
# print()

# s_len = len(s_str)
# print(s_len)
# print(type(s_len))
# print()

list = []
for i in range(len(s_str)-1):
  s_new = s_str[i]
  # print('i=' + str(i))
  for j in range(i, len(s_str)):
    # print(s_new)
    if int(s_new) % 2019 == 0:
      # print('2019 * n number.')
      list.append(s_new)
    j = j + 1
    if j == len(s_str):
      break
    else:
      s_new = s_new + s_str[j]
  # print()
  i = i + 1

# print()
# print(list)
print(len(list))

Fixed submission:
S, W = map(int, input().split())

if S <= W :
  print('unsafe')
else:
  print('safe')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
# print(N)
List = list(map(int, input().split()))
# print(List)

for i in range(N-1):
  print(List.count(i+1))
print(0)

Fixed submission:
from collections import defaultdict
import collections

N = int(input())
List = list(map(int, input().split()))
# print(List)

# for i in range(N-1):
#   print(List.count(i+1))
# print(0)

c = collections.Counter(List)
# print(c)
for i in range(1,N+1):
  # print(i)
  print(c[i])
  # print()
Buggy python submission (verdict: Runtime Error):
import math
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)
print(sum)

Fixed submission:
import math
sum = 0
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)
print(sum)

Buggy python submission (verdict: Runtime Error):
import math
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)


print(sum)

Fixed submission:
import math
sum = 0
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)
print(sum)

Buggy python submission (verdict: Runtime Error):
import math

k = int(input())+1

for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1,k):
            sum += math.gcd(temp,x)


print(sum)

Fixed submission:
import math
sum = 0
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)
print(sum)

Buggy python submission (verdict: Runtime Error):
import math
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1,k):
            sum += math.gcd(temp,x)


print(sum)

Fixed submission:
import math
sum = 0
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)
print(sum)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import time
start = time.time()
sum = 0
k= 200
for i in range(k):
    for j in range(k):
        for x in range(k):
            sum += math.gcd(x+1, math.gcd(i+1, j+1))

print(sum)

#print(time.time()-start)

Fixed submission:
import math
sum = 0
k = int(input())+1
for i in range(1, k):
    for j in range(1, k):
        temp = math.gcd(i, j)
        for x in range(1, k):
            sum += math.gcd(temp, x)
print(sum)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np

n = int(input())
s = input()
ar = [[0 for i in range(3)] for j in range(1000)]
kakunin = [0 for i in range(1000)]
index = 0
for i in range(10):
    for j in range(10):
        for k in range(10):
            ar[index][0] = i
            ar[index][1] = j
            ar[index][2] = k
            index += 1



for i in range(n):
    # print(s[i])
    for j in range(1000):
        if kakunin[j] < 3 and ar[j][kakunin[j]] ==int(s[i]):

            kakunin[j] += 1

res = 0
for i in range(1000):
    if kakunin[i] == 3:
        res +=1
print(res)


Fixed submission:
import numpy as np

n = int(input())
s = input()
ar = [[0 for i in range(3)] for j in range(1000)]
kakunin = [0 for i in range(1000)]
index = 0
res = 0

for i in range(10):
    for j in range(10):
        for k in range(10):
            a = s.find(str(i))

            if a == -1:
                continue

            b = s[a+1:len(s)].find(str(j))
            if b == -1:
                continue
            c = s[a+b+2:len(s)].find(str(k))
            if c != -1:
                # print(str(a) + "  "+ str(b) + "  " + str(c))
                # print(str(i) + "  " + str(j) + "   "+ str(k))
                # print()
                res += 1
print(res)
Buggy python submission (verdict: Runtime Error):
x = list(map(int, input().split()))

ans_ind = 0
for i in range(5):
    if x[i] == 0:
        ans_ind = i + 1

print(ans_ind)

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

ans_ind = 0
for i in range(5):
    if x[i] == 0:
        ans_ind = i + 1

print(ans_ind)



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

ans_ind = 0
for i in range(5):
    if x[i] == 0:
        ans_ind = i + 1

print(ans_ind)
Buggy python submission (verdict: Time Limit Exceeded):

n = int(input())

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

_max = 10 ** (18)

ans = 1

for _a in a:
    ans *= _a

if ans > _max:
    print(-1)
else:
    print(ans)

Fixed submission:
from math import log10 as log10

n = int(input())

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

_max = 10 ** (18)

ans = a[0]
min_a = min(a)

for _a in a[1:]:
    if min_a == 0:
        break
    if ans > _max:
        break


    ans *= _a

if (ans > _max):
    print(-1)
elif min_a == 0:
    print(0)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
import sys

# 最大公約数
def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a

# 最小公倍数
def lcm(a, b):
  return a*b/gcd(a, b)

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

lcm_num = lcm(a[0], a[1])

for i in range(2, n):
    lcm_num = lcm(lcm_num, a[i])

ans = 0
for i in range(n):
    ans += (lcm_num-1) % a[i]

print(int(ans))
  


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

# lcm_num = lcm(a[0], a[1])
# 
# for i in range(2, n):
#     lcm_num = lcm(lcm_num, a[i])

ans = 0
for i in range(n):
    ans += a[i] - 1

print(int(ans))

Buggy python submission (verdict: Runtime Error):
def gcd(a, b):
  while b > 0:
    a, b = b, a%b
  return a

def lcm(a, b):
  return a*b/gcd(a, b)

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


lcm_num = lcm(a[0], a[1])

for i in range(2, n):
    lcm_num = lcm(lcm_num, a[i])

ans = 0
for i in range(n):
    ans += (lcm_num-1) % a[i]

print(int(ans))
  


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

# lcm_num = lcm(a[0], a[1])
# 
# for i in range(2, n):
#     lcm_num = lcm(lcm_num, a[i])

ans = 0
for i in range(n):
    ans += a[i] - 1

print(int(ans))
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n.islower():
  print('a')
else:
  print('A')


Fixed submission:
n=input()
if n.islower():
  print('a')
else:
  print('A')
Buggy python submission (verdict: Runtime Error):
n=int(input())
f=1
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%n==0:
    print('yes')
    f=1
    break
if f==0:
  print('no)

Fixed submission:
n=int(input())
f=0
a,b=map(int,input().split())
for i in range(a,b+1):
  if i%n==0:
    print('OK')
    f=1
    break
if f==0:
  print('NG')
Buggy python submission (verdict: Runtime Error):
a,b,c,d=map(int,input().split())
while 1:
    c-=b
    if a<=0  or c<=0:
        break
    a -= d
    if a<=0  or c<=0:
        break
print('Yes' if a>0 else 'No')


Fixed submission:
n,m=map(int,input().split())
print('unsafe' if m>=n else 'safe')
Buggy python submission (verdict: Time Limit Exceeded):
a,b,c,d=map(int,input().split())
while 1:
    c-=b
    if a==0  or c==0:
        break
    a -= d
    if a==0  or c==0:
        break
print('Yes' if a>0 else 'No')


Fixed submission:
a,b,c,d=map(int,input().split())
while 1:
    c-=b
    if a<=0  or c<=0:
        break
    a -= d
    if a<=0  or c<=0:
        break
print('Yes' if a>0 else 'No')
Buggy python submission (verdict: Runtime Error):
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = max(100,max(p),abs(min(p)))
for i in range(max(min(min(p)-2,-1),101),min(min(p)-2,-1),-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
        else:
            pass
print(r)

Fixed submission:
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = 101
for i in range(101,-1,-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
print(r)

Buggy python submission (verdict: Runtime Error):
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = (max(100,max(p),abs(min(p))))
for i in range(101,min(min(p)-2,-1),-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
        else:
            pass
print(r)

Fixed submission:
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = 101
for i in range(101,-1,-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
print(r)

Buggy python submission (verdict: Runtime Error):
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = 100
for i in range(100,min(min(p)-2,-1),-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
        else:
            pass
print(r)

Fixed submission:
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = 101
for i in range(101,-1,-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
print(r)

Buggy python submission (verdict: Runtime Error):
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = 100
for i in range(100,min(p)-2,-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
        else:
            pass
print(r)

Fixed submission:
#C
X,N = map(int,input().split())
p = list(map(int,input().split()))
r = 101
for i in range(101,-1,-1):
    if i in p:
        pass
    else:
        if abs(r-X) >= abs(i-X):
            r = i
print(r)
Buggy python submission (verdict: Runtime Error):
a = input()
if a.isupper() = True:
  print 'A'
else:
  print 'a'

Fixed submission:
α = input()
if α.isupper() == True:
  print ('A')
else:
  print ('a')

Buggy python submission (verdict: Runtime Error):
α = input()
if α.isupper() = True:
  print 'A'
else:
  print 'a'

Fixed submission:
α = input()
if α.isupper() == True:
  print ('A')
else:
  print ('a')
Buggy python submission (verdict: Runtime Error):
N, K = int(input().split())
juice = []
for i in range(N):
    juice.append(list(input().split()))
juice.sort()
print (sum(juice[0:K]))

Fixed submission:
N,K = map(int, input().split())
*a, = map(int, input().split())
print (sum(sorted(a)[:K]))

Buggy python submission (verdict: Runtime Error):
N, K = int(input().split())
juice = []
for i in range(N):
    juice.append(list(input().split()))
juice.sort()
for i in range(K):
  print (juice[0:K])

Fixed submission:
N,K = map(int, input().split())
*a, = map(int, input().split())
print (sum(sorted(a)[:K]))

Buggy python submission (verdict: Runtime Error):
N, K = int(input().split())
juice = []
for i in range(N):
    juice.append(list(map(int,input().split())))
juice.sort()
for i in range(K):
  print (juice[0] + juice[1] + juice[2])

Fixed submission:
N,K = map(int, input().split())
*a, = map(int, input().split())
print (sum(sorted(a)[:K]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
num_list=list(map(int,input().split()))
ans = 1
for i in n:
  ans = ans*num_list[i]
if ans <1000000000000000000:
  print(ans)
else:
  print("-1")

Fixed submission:
n = int(input())
num_list=list(map(int,input().split()))
ans = 1
flg = True
if 0 in num_list:
  print("0")
else:
  for i in range(n):
    ans = ans*num_list[i]
  
    if ans > 10**18:
      print("-1")
      flg = False
      break
  if flg:
    print(ans)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
ans = n *m
if ans <1000000000000000000:
  print(ans)
else:
  print("-1")

Fixed submission:
n = int(input())
num_list=list(map(int,input().split()))
ans = 1
flg = True
if 0 in num_list:
  print("0")
else:
  for i in range(n):
    ans = ans*num_list[i]
  
    if ans > 10**18:
      print("-1")
      flg = False
      break
  if flg:
    print(ans)
Buggy python submission (verdict: Runtime Error):
time = int(input())
jorney = [list(map(int,input().split())) for i in range(time)]
flg = True
x_before = 0
y_bfefore =0
t_before = 0

for point in jorney:
    time = point[0]
    x = point[1]
    y = point[2]
    distance = x- x_before + y - y_bfefore
    interval = t - t_before
    
    
    if t %2 == (x+y)%2 and interval >= distance:
        t_before=t
        x_before=x
        y_bfefore=y

        continue
    else:
        flg=False
        break
if flg:
    print("YES")
else:
    print("NO")

Fixed submission:
time = int(input())
jorney = [list(map(int,input().split())) for i in range(time)]
flg = True
x_before = 0
y_bfefore =0
t_before = 0

for point in jorney:
    t = point[0]
    x = point[1]
    y = point[2]
    distance = abs(x- x_before) + abs(y - y_bfefore)
    interval = t - t_before
    
    
    if t %2 == (x+y)%2 and interval >= distance:
        t_before=t
        x_before=x
        y_bfefore=y

        continue
    else:
        flg=False
        break
if flg:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
time = int(input())
jorney = [list(map(int,input().split())) for i in range(time)]
flg = True
x_before = 0
y_bfefore =0
t_before = 0

for point in jorney:
    time = point[0]
    x = point[1]
    y = point[2]
    distance = x- x_before + y - y_bfefore
    interval = time - time_before
    
    
    if time %2 == (x+y)%2 and interval = distance:
        time_before=time
        x_before=x
        y_bfefore=y

        continue
    else:
        flg=False
        break
if flg:
    print("YES")
else:
    print("NO")

Fixed submission:
time = int(input())
jorney = [list(map(int,input().split())) for i in range(time)]
flg = True
x_before = 0
y_bfefore =0
t_before = 0

for point in jorney:
    t = point[0]
    x = point[1]
    y = point[2]
    distance = abs(x- x_before) + abs(y - y_bfefore)
    interval = t - t_before
    
    
    if t %2 == (x+y)%2 and interval >= distance:
        t_before=t
        x_before=x
        y_bfefore=y

        continue
    else:
        flg=False
        break
if flg:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Time Limit Exceeded):
otoshidama = list(map(int,input().split()))
flg = True
while flg:
    for i in range(otoshidama[0]+1):
        yukichi =i
        for n in range(otoshidama[0]-yukichi+1):
            higuchi =n
            noguchi = otoshidama[0]-yukichi - higuchi

            if 10000*yukichi+5000*higuchi+1000*noguchi==otoshidama[1]:
                print("{} {} {}".format(yukichi,higuchi,noguchi))
                flg = False
                break
        if flg == False:
            break

if flg:
    print("-1 -1 -1")

Fixed submission:
otoshidama = list(map(int,input().split()))
flg = True
for i in range(otoshidama[0]+1):
    yukichi =i
    for n in range(otoshidama[0]-yukichi+1):
        higuchi =n
        noguchi = otoshidama[0]-yukichi - higuchi

        if 10000*yukichi+5000*higuchi+1000*noguchi==otoshidama[1]:
            print("{} {} {}".format(yukichi,higuchi,noguchi))
            flg = False
            break
    if flg == False:
        break

if flg:
    print("-1 -1 -1")
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,input().split()))
ans = 0
x = True
while x:
  for i in range(a):
    if b[i] %2 ==1:
      x=False
      break
    b[i] = b[i] /2
    ans +=1
ans = ans//a
  

print(ans)

Fixed submission:
a = list(map(int,input()))
b= sum(a)
print(b)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,input().split()))
ans = 0
while sum(b)%2 ==0:
  ans +=1
  b=[ i/2 for i in b]
print(ans)

Fixed submission:
a = list(map(int,input()))
b= sum(a)
print(b)

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = list(map(int,input().split()))
b.sort()
ans = 0
n = b[0]
while n % 2 ==0:
	ans +=1
	n = n/2
print(ans)

Fixed submission:
a = list(map(int,input()))
b= sum(a)
print(b)
Buggy python submission (verdict: Time Limit Exceeded):
target = input()

while len(target)>=5:
    if target[-7:] == "dreamer":
        target = target[:-7]
    elif target[-6:] == "eraser":
        target = target[:-6]
    elif target[-5:]=="dream" or target[-5:]=="erase":
        target = target[:-5]
if len(target)==0:
    print("YES")
else:
    print("NO")

Fixed submission:
target = input()

while len(target)>=5:
    if target[-7:] == "dreamer":
        target = target[:-7]
    elif target[-6:] == "eraser":
        target = target[:-6]
    elif target[-5:]=="dream" or target[-5:]=="erase":
        target = target[:-5]
    else:
      break
if len(target)==0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
s="abcdefghijklmnopqrstuvwxyz"
m=""
while n:		
  # print(r)
  if(n%26==0):
    m+='z'
    else:
      m+=s[(n%26)-1]
      n=(n//26)
      # reverse
      m=m[::-1]
      print(m)


Fixed submission:
n=int(input())
s = ""
cons = 96

if n%26:
    s+=chr(cons + n%26)
else:
    n-=1
    s+="z"
n = n//26

while n:
    if n%26:
        s+=chr(cons + n%26)
    else:
        n-=1
        s+="z"
    n = n//26
    
print(s[::-1])

Buggy python submission (verdict: Runtime Error):
s="abcdefghijklmnopqrstuvwxyz"
	m=""
	while n:		
		# print(r)
		if(n%26==0):
			m+='z'
		else:
			m+=s[(n%26)-1]
		n=(n//26)
	# reverse
	m=m[::-1]
	print(m)


Fixed submission:
n=int(input())
s = ""
cons = 96

if n%26:
    s+=chr(cons + n%26)
else:
    n-=1
    s+="z"
n = n//26

while n:
    if n%26:
        s+=chr(cons + n%26)
    else:
        n-=1
        s+="z"
    n = n//26
    
print(s[::-1])
Buggy python submission (verdict: Time Limit Exceeded):
N, S = map(int,input().split())
A = list(map(int,input().split()))
mod = 998244353
dp = [[0 for j in range(S + 1)] for i in range(N + 1)]
dp[0][0] = 1
for i in range(N) : 
    for j in range(S + 1) : 
        dp[i + 1][j] += 2 * dp[i][j]
        dp[i + 1][j] %= mod 
        if j + A[i] <= S : 
            dp[i + 1][j + A[i]] += dp[i][j]
            dp[i + 1][j + A[i]] %= mod
print(dp[N][S])

Fixed submission:
N, S = map(int,input().split())
A = list(map(int,input().split()))
mod = 998244353
dp = [[0 for j in range(S + 1)] for i in range(N + 1)]
dp[0][0] = 1
for i in range(N) : 
    for j in range(S + 1) : 
        dp[i + 1][j] += 2 * dp[i][j]
        dp[i + 1][j] %= mod 
        if j + A[i] <= S : 
            dp[i + 1][j + A[i]] += dp[i][j]
            dp[i + 1][j + A[i]] %= mod
print(dp[N][S])

Buggy python submission (verdict: Time Limit Exceeded):
N, S = map(int,input().split())
A = list(map(int,input().split()))
mod = 998244353
dp = [[0 for j in range(S + 1)] for i in range(N + 1)]
dp[0][0] = 1
for i in range(N) : 
    for j in range(S + 1) : 
        dp[i + 1][j] += 2 * dp[i][j]
        dp[i + 1][j] %= mod 
        if j + A[i] <= S : 
            dp[i + 1][j + A[i]] += dp[i][j]
            dp[i + 1][j + A[i]] %= mod
print(dp[N][S])

Fixed submission:
N, S = map(int,input().split())
A = list(map(int,input().split()))
mod = 998244353
dp = [[0 for j in range(S + 1)] for i in range(N + 1)]
dp[0][0] = 1
for i in range(N) : 
    for j in range(S + 1) : 
        dp[i + 1][j] += 2 * dp[i][j]
        dp[i + 1][j] %= mod 
        if j + A[i] <= S : 
            dp[i + 1][j + A[i]] += dp[i][j]
            dp[i + 1][j + A[i]] %= mod
print(dp[N][S])
Buggy python submission (verdict: Runtime Error):
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(b-a) - (v-w)*t <= 0:
    print("YES")
ekes:
    print("NO")

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if abs(b-a) - (v-w)*t <= 0:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator
n = int(input())
a = list(map(int, input().split()))
result = functools.reduce(operator.mul, a)
if result > (10**18):
    print("-1")
else:
    print(result)

Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    if 0 in a:
        print(0)
        return
    prod = 1
    for i in a:
        prod *= i
        if prod > 1000000000000000000:
            print(-1)
            return
    print(prod)
main()

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator
n = int(input())
a = list(map(int, input().split()))
result = functools.reduce(operator.mul, a)
if result > (10**18):
    print("-1")
else:
    print(result)

Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    if 0 in a:
        print(0)
        return
    prod = 1
    for i in a:
        prod *= i
        if prod > 1000000000000000000:
            print(-1)
            return
    print(prod)
main()

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
p = 1
for i in range(n):
    p *= a[i]
if p > 10**18:
    print("-1")
else:
    print(p)

Fixed submission:
def main():
    n = int(input())
    a = list(map(int, input().split()))
    if 0 in a:
        print(0)
        return
    prod = 1
    for i in a:
        prod *= i
        if prod > 1000000000000000000:
            print(-1)
            return
    print(prod)
main()
Buggy python submission (verdict: Runtime Error):
import math
a, b, h, m = map(int, input().split())
time = m + h*60
angle = time * 0.5 - time * 6
radian = math.radians(angle)
rad = math.cos(radian)
ans = a**2 + b**2 - 2*a*b*rad
print(math.sqrt(ans))

Fixed submission:
n = str(input())
if n[-1] == "2" or n[-1] == "4" or n[-1] == "5" or n[-1] == "7" or n[-1] == "9":
    print("hon")
elif n[-1] == "0" or n[-1] == "1" or n[-1] == "6" or n[-1] == "8":
    print("pon")
else:
    print("bon")
Buggy python submission (verdict: Runtime Error):
import math
a, b, h, m = map(int, input().split())
time = m + h*60
angle = time * 0.5 - time * 6
radian = math.radians(angle)
rad = math.cos(radian)
ans = b**2 + c**2 - 2*a*b*rad
print(math.sqrt(ans))

Fixed submission:
import math
a, b, h, m = map(int, input().split())
time = m + h*60
angle = time * 0.5 - time * 6
radian = math.radians(angle)
rad = math.cos(radian)
ans = a**2 + b**2 - 2*a*b*rad
print(math.sqrt(ans))
Buggy python submission (verdict: Runtime Error):
n = str(input())
if n.count(7) >= 1:
    print("Yes")
else:
    print("No")

Fixed submission:
n = str(input())
if n.count("7") >= 1:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
a = list(map(int,input().split()))
s = sum(a) #sにaの総投票数
a.sort(reserve=True)#aを降順にソート
if a[m-1] >= s*(1/4):
    print("Yes")
else:
    print("No")

Fixed submission:
n, m = map(int,input().split())
a = list(map(int,input().split()))
s = sum(a) #sにaの総投票数
a.sort(reverse=True) #aを降順にソート
if a[m-1] >= s*(1/(4*m)):
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n, m = map(int,input().split())
a = list(map(int,input()split()))
s = sum(a) #sにaの総投票数
a.sort(reserve=True)#aを降順にソート
if a[m-1] >= s*(1/4):
    print("Yes")
else:
    print("No")

Fixed submission:
n, m = map(int,input().split())
a = list(map(int,input().split()))
s = sum(a) #sにaの総投票数
a.sort(reverse=True) #aを降順にソート
if a[m-1] >= s*(1/(4*m)):
    print("Yes")
else:
    print("No")