Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
q, h, s, d = map(int, input().split())
n = int(input())
ans = 0
q_per = q / 0.25
h_per = h / 0.5
s_per = s
d_per = d / 2
list = [q_per,h_per,s_per,d_per]
elif min(list) == d_per :
    if n%2 == 0:
        ans += d * (n //2)
    else :
        ans += n//2 * d
        n -= n//2
        list.remove(d_per)
        if min(list) == s_per :
            ans += s_per
        elif min(list) == h_per :
            ans += h * 2
        else :
            ans += q * 4
elif min(list) == s_per :
    ans += n * s
elif min(list) == h_per :
    ans += n * 2 * h
else :
    ans += n * 4 * q

print(int(ans))


Fixed submission:
q, h, s, d = map(int, input().split())
n = int(input())
ans = 0
q_per = q / 0.25
h_per = h / 0.5
s_per = s
d_per = d / 2
list = [q_per,h_per,s_per,d_per]
if min(list) == d_per :
    if n%2 == 0:
        ans += d * (n //2)
    else :
        ans += n//2 * d
        n -= n//2
        list.remove(d_per)
        if min(list) == s_per :
            ans += s_per
        elif min(list) == h_per :
            ans += h * 2
        else :
            ans += q * 4
elif min(list) == s_per :
    ans += n * s
elif min(list) == h_per :
    ans += n * 2 * h
else :
    ans += n * 4 * q

print(int(ans))
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    count += 1
    a = b_tmp/2 + c_tmp/2
    b = a_tmp/2 + c_tmp/2
    c = a_tmp/2 + b_tmp/2
    if a == a_tmp and b == b_tmp and c = c_tmp :
        print("-1")
        break
    a_tmp = a ; b_tmp = b ; c_tmp = c
    if a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        continue


Fixed submission:
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    if a == b == c and a%2 == 0 :
        print("-1")
        break
    elif a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        a = b_tmp/2 + c_tmp/2
        b = a_tmp/2 + c_tmp/2
        c = a_tmp/2 + b_tmp/2
        a_tmp = a ; b_tmp = b ; c_tmp = c
        count += 1

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    count += 1
    a = b_tmp/2 + c_tmp/2
    b = a_tmp/2 + c_tmp/2
    c = a_tmp/2 + b_tmp/2
    if a == a_tmp and b == b_tmp and c = c_tmp :
        print("-1")
        break
    a_tmp = a ; b_tmp = b ; c_tmp = c
    if a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        continue


Fixed submission:
a, b, c = map(int, input().split())
a_tmp = a ; b_tmp = b ; c_tmp = c
count = 0
while True :
    if a == b == c and a%2 == 0 :
        print("-1")
        break
    elif a%2 == 1 or b%2 == 1 or c%2 == 1 :
        print(count)
        break
    else :
        a = b_tmp/2 + c_tmp/2
        b = a_tmp/2 + c_tmp/2
        c = a_tmp/2 + b_tmp/2
        a_tmp = a ; b_tmp = b ; c_tmp = c
        count += 1
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
list1 = []
for i in range(n) :
    list1.append({a[i],i+1})
length1 = len(list1)
list2 = []
for num in list1 :
    if not num in list2 :
        list2.append(num)
length2 = len(list2)
print(length1-length2)


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n) :
    if a[a[i]-1] == i + 1 :
        ans += 1
print(ans//2)
Buggy python submission (verdict: Time Limit Exceeded):
a, b = map(int, input().split())
neg_count = 0
for i in range(a, b+1) :
    if i < 0 :
        neg_count += 1
    elif i == 0 :
        neg_count = -1
        break
    else :
        continue

if neg_count == -1 :
    print("Zero")
elif neg_count % 2 == 0 :
    print("Positive")
else :
    print("Negative")


Fixed submission:
a, b = map(int, input().split())
if a*b <= 0 :
    print("Zero")
elif a > 0 :
    print("Positive")
else :
    if (b-a) % 2 == 0 :
        print("Negative")
    else :
        print("Positive")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

res = 0
for i in range(n):
    for j in range(1, n-i):
        res = res + (a[i] * a[i+j]) % (10**9 + 7)
        res %= (10**9 + 7)
print(res)

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

sum = 0
for i in range(n):
    sum += a[i]

res = 0
s = sum
for i in range(n):
    s -= a[i]
    res = (res + s*a[i])%(10**9+7)
print(res)
Buggy python submission (verdict: Runtime Error):
MAX = 100000
prices = [100, 101, 102, 103, 104, 105]

result = [ 0 for x in range(MAX)]
result[100] = 1
result[101] = 1
result[102] = 1
result[103] = 1
result[104] = 1
result[105] = 1

x = int(input())
for v in range(100, x+1):
    for p in prices:
        if result[v] or result[v-p]:
            result[v] = 1
            break
print(result[x])


Fixed submission:
MAX = 100000+1
prices = [100, 101, 102, 103, 104, 105]

result = [ 0 for x in range(MAX)]
result[100] = 1
result[101] = 1
result[102] = 1
result[103] = 1
result[104] = 1
result[105] = 1

x = int(input())
for v in range(100, x+1):
    for p in prices:
        if result[v] or result[v-p]:
            result[v] = 1
            break
print(result[x])
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())
a = [0]*N
b = [0]*N
for i in range(N):
    a[i], b[i] = [int(x) for x in input().split()]


p = list(itertools.permutations(zip(a, b)))

is_ok = False
for i in range(len(p)):
    w = 0
    for j in range(N):
        if w + p[i][j][0] <= p[i][j][1]:
            w += p[i][j][0]
            if j == N-1:
                is_ok = True
        else:
            break


print('Yes' if is_ok else 'No')


Fixed submission:
N = int(input())
a = [0]*N
b = [0]*N
for i in range(N):
    a[i], b[i] = [int(x) for x in input().split()]

tasks = sorted(list(zip(a, b)), key=lambda x: x[1])

is_okay = True
sum = 0
for i in range(N):
    sum += tasks[i][0]

    if sum > tasks[i][1]:
        is_okay = False
        break

print('Yes' if is_okay else 'No')
Buggy python submission (verdict: Runtime Error):
n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()
dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

length = x[m-1]-x[0]
for i in range(n-1):
    length -= dist[i]

print(length)


Fixed submission:
n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()

dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

if m <= n:
    print(0)
else:
    length = x[m-1]-x[0]
    for i in range(n-1):
        length -= dist[i]
    print(length)

Buggy python submission (verdict: Runtime Error):
n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()
print(x)

dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

length = x[m-1]-x[0]
for i in range(n-1):
    length -= dist[i]

print(length)


Fixed submission:
n, m = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]

x.sort()

dist = [0] * (m-1)
for i in range(m-1):
    dist[i] = x[i+1] - x[i]
dist.sort(reverse=True)

if m <= n:
    print(0)
else:
    length = x[m-1]-x[0]
    for i in range(n-1):
        length -= dist[i]
    print(length)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = [int(x) for x in input().split()]

ms = []
for i in range(m):
    p, y = [int(x) for x in input().split()]
    ms.append({
        'p': p,
        'y': y
    })

ps = []
for i in range(n):
    result = list(filter(lambda x: x.get('p') == i+1, ms))
    result.sort(key=lambda x: x.get('y'))
    ps.append(result)

for i in range(m):
    for j, x in enumerate(ps[ms[i].get('p') - 1]):
        if x.get('y') == ms[i].get('y'):
            print('%s%s' % (str(ms[i].get('p')).zfill(6), str(j+1).zfill(6)))


Fixed submission:
n, m = [int(x) for x in input().split()]

ps = [[] for i in range(n)]
for i in range(m):
    p, y = [int(x) for x in input().split()]
    ps[p-1].append((y, i))

res = [None] * m
for i, ms in enumerate(ps):
    ms.sort()
    for j, x in enumerate(ms):
        res[x[1]] = str(i+1).zfill(6) + str(j+1).zfill(6)

for i in range(m):
    print(res[i])
Buggy python submission (verdict: Runtime Error):
s=input()
s1=input()
c=0;
for i in range(len(s1)):
  if(s1[i]!=s[i]):
    c++;
print(c)

Fixed submission:
s=input()
s1=input()
c=0;
for i in range(len(s1)):
  if(s1[i]!=s[i]):
    c+=1;
print(c)
Buggy python submission (verdict: Runtime Error):
l=map(int,input().split())
print(l.index(0))

Fixed submission:
l=list(map(int,input().split()))
print(l.index(0)+1)
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
N= int(input())
A= list(map(int,input().split(' ')))
 
ans = 0
for i in range(len(A)-1):
  for j in range(i+1, len(A)):
    ans += A[i]*A[j]
 
print(ans)


Fixed submission:
# -*- coding: utf-8 -*-
D, T, S= map(int,input().split(' '))
print('Yes' if D / S <= T else 'No')
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N= int(input())
A= list(map(int,input().split(' ')))
 
ans = 0
for i in range(len(A)-1):
  ans += A[i] * sum(A[i+1:])

print(ans % (10**9+7))


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

mod = 10**9+7
ans = 0
cs = 0
for i in range(N-1, -1, -1):
  ans = (ans+A[i]*cs) % mod
  cs = (cs+A[i]) % mod

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
N= int(input())
A= list(map(int,input().split(' ')))
 
ans = 0
for i in range(len(A)-1):
  for j in range(i+1, len(A)):
    ans += A[i]*A[j]
 
print(ans % (10**9+7))


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

mod = 10**9+7
ans = 0
cs = 0
for i in range(N-1, -1, -1):
  ans = (ans+A[i]*cs) % mod
  cs = (cs+A[i]) % mod

print(ans)
Buggy python submission (verdict: Runtime Error):
import math
n, d = map(int, input().split())
lst1 = []
lst2 = []
ans = 0
for i in range(n):
  x, y = map(int, input().split())
  # lst2 =[x, y]
  # list1.append(lst2)
  cal = math.sqrt(x^2+y^2)
  lst1.append(cal)
  
for i in range(n):
  if lst1[i] >= d:
    ans += 1
  else:
    continue
print(ans)


Fixed submission:
import math
N,D= map(int, input().split(" "))
count = 0
for i in range(0,N):
    X,Y= map(int, input().split(" "))
    d= math.sqrt(pow(X,2)+pow(Y,2))
    if d<= D:
        count = count+1
print(count)

Buggy python submission (verdict: Runtime Error):
import math
n, d = map(int, input().split())
lst1 = []
lst2 = []
ans = 0
for i in range(n):
  x, y = map(int, input().split())
  # lst2 =[x, y]
  # list1.append(lst2)
  cal = math.sqrt(x^2+y^2)
  lst1.append(cal)
  
for i in range(n):
  if lst1[i] >= d:
    ans += 1
  else:
    continue:
print(ans)

Fixed submission:
import math
N,D= map(int, input().split(" "))
count = 0
for i in range(0,N):
    X,Y= map(int, input().split(" "))
    d= math.sqrt(pow(X,2)+pow(Y,2))
    if d<= D:
        count = count+1
print(count)
Buggy python submission (verdict: Runtime Error):
d,t,s = list(map(int,input().split()))
times = distance/speed
if times<=t:
  print("Yes")
else:
  print("No")

Fixed submission:
d,t,s = list(map(int,input().split()))
try:
  times = d/s
except:
  times = t+1
if times<=t:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
*a,=map(int,input().split())
for i in range(n):
    a[i]=a[i]%(10**9+7)
sum_a=[]
for i in range(n):
    sum_a.append(sum(a)-sum(a[:i+1]))
b=0
for i in range(n):
    b+=sum_a[i]*a[i]
print(b%(10**9+7))

Fixed submission:
n=int(input())
*a,=map(int,input().split())
s=sum(a)%(10**9+7)
c=0
b=0
for i in range(n):
    b+=a[i]
    amod=a[i]%(10**9+7)
    c+=(s-b)*amod
print(c%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
*a,=map(int,input().split())
sum_a=[]
for i in range(n):
    sum_a.append(sum(a)-sum(a[:i+1]))
b=0
for i in range(n):
    b+=sum_a[i]*a[i]
print(b%(10**9+7))

Fixed submission:
n=int(input())
*a,=map(int,input().split())
s=sum(a)%(10**9+7)
c=0
b=0
for i in range(n):
    b+=a[i]
    amod=a[i]%(10**9+7)
    c+=(s-b)*amod
print(c%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
*a,=map(int,input().split())
b=0
for i in range(n):
    b+=(sum(a)-sum(a[:i+1]))*a[i]
print(b%(10**9+7))

Fixed submission:
n=int(input())
*a,=map(int,input().split())
s=sum(a)%(10**9+7)
c=0
b=0
for i in range(n):
    b+=a[i]
    amod=a[i]%(10**9+7)
    c+=(s-b)*amod
print(c%(10**9+7))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
	if a[i] % 2 == 1:
    	ans += 1
print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans=0
for i in range(0, N, 2):
    if A[i]%2==1:
        ans+=1
print(ans)

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

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans=0
for i in range(0, N, 2):
    if A[i]%2==1:
        ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np

n=int(input())
A=np.array(list(map(int,input().split())))
a=np.prod(A)

if a>10**18:
    print("-1")
else:
    print(a)

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
prod=1
if 0 in A:
    prod=0
for i in A:
    prod*=i
    if prod>10**18:
        prod=-1
        break
print(prod)

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

n=int(input())
A=np.ndarray(map(int,input().split()))
a=np.prod(A)
if a>10**18:
    print("-1")
else:
    print(a)

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
prod=1
if 0 in A:
    prod=0
for i in A:
    prod*=i
    if prod>10**18:
        prod=-1
        break
print(prod)

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

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
prod=1
if 0 in A:
    prod=0
for i in A:
    prod*=i
    if prod>10**18:
        prod=-1
        break
print(prod)

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

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
prod=1
if 0 in A:
    prod=0
for i in A:
    prod*=i
    if prod>10**18:
        prod=-1
        break
print(prod)

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

Fixed submission:
n=int(input())
A=list(map(int,input().split()))
prod=1
if 0 in A:
    prod=0
for i in A:
    prod*=i
    if prod>10**18:
        prod=-1
        break
print(prod)
Buggy python submission (verdict: Runtime Error):
import math
a,b=map(int,input().split())
lcm=a*b/math.gcd(a, b)
print(int(lcm))

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

def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

lcm=a*b/gcd(a, b)
print(int(lcm))
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
if a<10 && b<10:
  print(a*b)
else:
  print(-1)

Fixed submission:
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
D=int(input())
T=int(input())
S=int(input())
a=float(T-D/S)
if a>0:
    print("Yes")
else :
    print("No")

Fixed submission:
D,T,S=input().split()
D=int(D)
T=int(T)
S=int(S)
a=float(T-D/S)
if a>=0:
    print("Yes")
else :
    print("No")

Buggy python submission (verdict: Runtime Error):
D=int(input())
T=int(input())
S=int(input())
a=float(T-D/S)
if a>=0:
    print("Yes")
else :
    print("No")

Fixed submission:
D,T,S=input().split()
D=int(D)
T=int(T)
S=int(S)
a=float(T-D/S)
if a>=0:
    print("Yes")
else :
    print("No")

Buggy python submission (verdict: Runtime Error):
D=input()
T=input()
S=input()
if T-D/S>=0:
    print("Yes")
    else print("No")


Fixed submission:
D,T,S=input().split()
D=int(D)
T=int(T)
S=int(S)
a=float(T-D/S)
if a>=0:
    print("Yes")
else :
    print("No")
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
for i in range(1,n-k+1):
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[]
for i in range(n-k):
  ans.append(sum(p[i:i+k]))
max_value=max(ans)
max_index=ans.index(max_value)

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
for i in range(1,n-k+1):
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[]
for i in range(n-k):
  ans.append(sum(p[i:i+k]))
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)
          

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
for i in range(1,n-k+1):
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)

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

ans=[]
for i in range(n-k):
  ans.append(sum(p[i:k+i]))
index=ans.index(max(ans))
total=0
for i in p[index:index+k]:
  total+=(i*(i+1))/(2*i)
print(total)

Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
for i in range(1,n-k+1):
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=list(map(int,input().split()))
pro=[]
for ch in p:
  pro.append((ch*(ch+1))/2)
ans=[]
for i in range(n-k):
  ans.append(sum(pro[i:k+i]))
print(max(ans))


Fixed submission:
n,k=map(int,input().split())
p=list(map(int,input().split()))
ans=[sum(p[0:k])]
for i in range(1,n-k+1):
  ans.append(ans[i-1]+p[i+k-1]-p[i-1])
max_value=max(ans)
max_index=ans.index(max_value)
total=0
for i in p[max_index:max_index+k]:
  total+=(i+1)/2
print(total)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
hps=list(map(int,input().split()))
hps.sort()
if k>n:
  print(0)
elif k==n:
  print(0)
else:
  ans=0
  for i in range(k):
    hps=hps[0:-1]
  ans+=sum(hps)
  print(ans)

Fixed submission:
n,k=map(int,input().split())
hps=list(map(int,input().split()))
hps.sort()
if k>n:
  print(0)
elif k==n:
  print(0)
else:
  ans=0
  for i in range(k):
    hps.pop()
  ans+=sum(hps)
  print(ans)

Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
hps=list(map(int,input().split()))
hps.sort()
if k>n:
  print(n)
elif k==n:
  print(k)
else:
  ans=k
  for i in range(k):
    hps.pop()
  ans+==sum(hps)
  print(ans)

Fixed submission:
n,k=map(int,input().split())
hps=list(map(int,input().split()))
hps.sort()
if k>n:
  print(0)
elif k==n:
  print(0)
else:
  ans=0
  for i in range(k):
    hps.pop()
  ans+=sum(hps)
  print(ans)
Buggy python submission (verdict: Runtime Error):
import bisect

n=int(input())
lst=[1]
lst2=[1]
for i in range(1,41):
  lst.append(2**i)
  lst2.append(lst2[i-1]+lst[i])
  
ind=bisect_left(lst,n)
print(lst2[ind])

Fixed submission:
from bisect import bisect_right
 
n=int(input())
lst=[1]
lst2=[1]
for i in range(1,41):
  lst.append(2**i)
  lst2.append(lst2[i-1]+lst[i])
  
ind=bisect_right(lst,n)
print(lst2[ind-1])
Buggy python submission (verdict: Runtime Error):
n=int(input())
lists=list(map(int,input().split()))
 
mn=n+1
cnt=0
for li in lists:
  if mn>li:
    mn=li
    cnt+=1
print(cnt)

Fixed submission:
n,m=map(int,input().split())
if n==m:
  print("Yes")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
print("Yes" if n==m: else: "No")

Fixed submission:
n,m=map(int,input().split())
if n==m:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import numpy
n=int(input())
plist=list(map(int,input().split()))
ans=0

while plist:
  min_index = numpy.argmin(plist)
  if min_index==0:
    ans+=1
    plist=[]
  else:
    ans+=1
    plist=plist[:min_index]

print(ans)

Fixed submission:
n=int(input())
lists=list(map(int,input().split()))
 
mn=n+1
cnt=0
for li in lists:
  if mn>li:
    mn=li
    cnt+=1
print(cnt)

Buggy python submission (verdict: Runtime Error):
n=int(input())
plist=map(int,input().split())
ans=0

while plist:
  max_index = plist.index(max_value)
  ans+=max_index+1
  plist=plist-plist[0:max_index]
print(ans)


Fixed submission:
n=int(input())
lists=list(map(int,input().split()))
 
mn=n+1
cnt=0
for li in lists:
  if mn>li:
    mn=li
    cnt+=1
print(cnt)
Buggy python submission (verdict: Time Limit Exceeded):
A,B,K=map(int,input().split())
while K!=0:
  if A>=1:
    A-=1
    K-=1
  else:
    B-=1
    K-=1
print(A,' ',B)

Fixed submission:
A,B,K=map(int,input().split())
if K>=A:
  K=K-A
  if K>=B:
    K=K-B
    print('0 0')
  else:
    B=B-K
    print(0,' ',B)
else:
  print(A-K,' ',B)

Buggy python submission (verdict: Runtime Error):
A,B,K=map(int,input().split())
while K!==0:
  if A>=1:
    A--
    K--
  else:
    B--
    K--
print(A,' ',B)

Fixed submission:
A,B,K=map(int,input().split())
if K>=A:
  K=K-A
  if K>=B:
    K=K-B
    print('0 0')
  else:
    B=B-K
    print(0,' ',B)
else:
  print(A-K,' ',B)
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split()) #複数の入力はmap関数

#判別＆出力
if A <= 9 and B <= 10:
  print(A * B)
else:
  print(-1)

Fixed submission:
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)

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

a=list(map(int,input().split()))
f=list(map(int,input().split()))
a=sorted(a)
f=sorted(f,reverse=True)

l=-1
r=10**12
def ok():
    s=0
    for i in range(n):
        s+=max(0,int(int(a[i])-int(c/f[i])))
    return s<=k

while(l+1<r):
    c=int((l+r)/2)
    if ok():
        r=c
    else:
        l=c
print(r)

Fixed submission:
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)

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

Fixed submission:
a,b=map(int,input().split())
if a<10 and b<10:
  print(a*b)
else:
  print(-1)