Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))

ans=1

for i in range (1,n):
  low=min(l[:i+1])
  if low==l[i]:
    ans+=1
    
print(ans)

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

ans=0
low=l[0]

for i in range (n):
  if l[i]<=low:
    low=l[i]
    ans+=1
    
print(ans)
Buggy python submission (verdict: Runtime Error):
from sympy import nextprime
n=int(input())

print (nextprime(n))

Fixed submission:
n = int(input())
for i in range(n, 100004):
    flag = 0
    for j in range(2, int(i**(1/2)) + 1):
        if i % j == 0:
            flag = 1
            break
    if flag == 0:
        print(i)
        break
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
if (a+b)%2==0:
    print(diff//2)
else:
    print(min(a-1,n-b)+1+(b-a-1)//2)


Fixed submission:
n,a,b = map(int,input().split())
diff = abs(a-b)
if diff%2==0:
    print(diff//2)
else:
    print(min(a-1,n-b)+1+(b-a-1)//2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = [[0,0]　for i in range (n)]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)


Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [[0,0] for i in range (n)]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))
b = [[0,0]*n]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)


Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [[0,0] for i in range (n)]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int,input().split()))
ans=[0]*n

for i in range (1,n+1):
  for j in range (n):
    if l[j]==i:
      ans[i-1]=j+1
      break
      
print(*ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
b = [[0,0] for i in range (n)]
c = []
for i in range(n):
    b[i][1] = a[i]
    b[i][0] = i+1
b.sort(key=lambda x:x[1])
for i in range(n):
    c.append(b[i][0])
print(*c)
Buggy python submission (verdict: Runtime Error):
n=int(input())
l=[map(int,input().split())]

for i in range (n):
  if l[i]=='Y':
    print('Four')
    exit()
print('Three')

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

for i in range (n):
  if l[i]=='Y':
    print('Four')
    exit()
print('Three')
Buggy python submission (verdict: Runtime Error):
x=input()
f=0
for i in range(len(x)):
  f+=int(x[i])
  
if x%f==0:
  print('Yes')
else:
  ('No')

Fixed submission:
x=input()
f=0
for i in range(len(x)):
  f+=int(x[i])
  
if int(x)%f==0:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
a,b,c=input().split()
print(a,b,c)

Fixed submission:
a,b,c=input().split(",")
print(a,b,c)
Buggy python submission (verdict: Runtime Error):
n,l=map(int,input().split)
s=[input() for _ in range (n)]

s.sort()

ans=s[0]
for i in range (1,n):
  ans+=s[i]
  
print(ans)

Fixed submission:
n,l=map(int,input().split())
s=[input() for _ in range (n)]

s.sort()

ans=s[0]
for i in range (1,n):
  ans+=s[i]
  
print(ans)
Buggy python submission (verdict: Runtime Error):
a = input()
ar = []
for i in range(3):
    ar.append(a[i]) 
n = len(ar)
ret = 0
for i in range(n+1):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(int(ret))

Fixed submission:
a = input()
ar = []
for i in range(len(a)):
    ar.append(a[i])
n = len(ar)
ret = 0
for i in range(2**(n-1)):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(int(ret))

Buggy python submission (verdict: Runtime Error):
a = input()
ar = []
for i in range(3):
    ar.append(a[i]) 
n = len(ar)
ret = 0
for i in range(n+1):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(ret)


Fixed submission:
a = input()
ar = []
for i in range(len(a)):
    ar.append(a[i])
n = len(ar)
ret = 0
for i in range(2**(n-1)):
    s = "+"
    tmp = ""
    for j in range(n):
        if (1 & (i >> j)) == 1:
            tmp += ar[j]
            tmp += s
        else:
            tmp += ar[j]
    stmp = tmp.split("+")
    ret += sum(int(k) for k in stmp)
print(int(ret))
Buggy python submission (verdict: Runtime Error):
a,b=int(input().split())
print(a*b)

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

print(a*b)
Buggy python submission (verdict: Runtime Error):
s=str(input())
if s=="ABC":
  print(“ARC”)
else:
  print(“ABC”)

Fixed submission:
s=str(input())
if s=="ABC":
  print("ARC")
else:
  print("ABC")
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
print(int(a) * int(b))

Fixed submission:
a,b=(int(x) for x in input().split())
print(a * b)
Buggy python submission (verdict: Runtime Error):
a,b,k =  input().split()
a = int(a)
b = int(b)
k = int(k)
if a <= k:
    i = 0
    m = b - (k-a)
else:
    i = a-k
    m=b
print(i,m)
    

    

Fixed submission:
a,b= input().split()
c = b + a
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,k =  input().split()
a = int(a)
b = int(b)
k = int(k)

for i in range(k):
    if a > 0:
        a -= 1
    elif b > 0:
        b -= 1
    else:
        break
print(a,b)
    

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

if a + b < k:
    i = 0
    m = 0
elif a <= k:
    i = 0
    m = b - (k-a)
else:
    i = a-k
    m=b
print(i,m)
Buggy python submission (verdict: Runtime Error):
N = input()

ab = input( )

ab = ab.split()

if 0 in ab:
    print(0)
else:
    SUM = 1
    for i in range(int(N)):
        SUM = SUM * int(ab[i])

    if (int(SUM) < 10 ** 18):
        print(SUM)
    else:
        print(-1)


Fixed submission:
ab = input( )

ab = ab.split()
print(int(ab[1])*int(ab[0]))

Buggy python submission (verdict: Runtime Error):
a,b = input()


seki = int(a)*int(b)
print(seki)

Fixed submission:
ab = input( )

ab = ab.split()
print(int(ab[1])*int(ab[0]))

Buggy python submission (verdict: Runtime Error):
a = input()
b = input()

seki = int(a)*int(b)
print(seki)



Fixed submission:
ab = input( )

ab = ab.split()
print(int(ab[1])*int(ab[0]))
Buggy python submission (verdict: Runtime Error):
input()
int_list = list(map(int, input().split()))
max_num = 10**18
ans = 1

if 0 in int_list:
   print(0)
   exit()
 
for i in int_list:
   ans *= i
   if ans > max_num:
       print(-1)
       break
else:
   print(ans)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

T = 1 
for i in A:
    T = T * i
    if T > 10^18:
        print(-1)
    else:
        print(T)


Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A, B = int(input())
print(A*B)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(A*B)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
print(A*B)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A, B = map(int(input().split( )))
C = A*B
print(C)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
C = A*B
print(C)

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())
A*B

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A
B
A*B

Fixed submission:
x, y = map(int, input().split())
print(x*y)

Buggy python submission (verdict: Runtime Error):
A*B

Fixed submission:
x, y = map(int, input().split())
print(x*y)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

T = 1
for i in A:
    T = T * i
if T > 10 ** 18:
    print(-1)
else:
    print(T)


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

a = 1
if 0 in list:
    print(0)
    exit()
else:
    for i in list:
        a *= i
        if a > 10**18:
            print(-1)
            exit()
print(a)

Buggy python submission (verdict: Runtime Error):
x, y = map(int, input().split())
for y in range(x):
  C = 1*Y
  if C >= 10^18:
    print(-1)
  else:
    print(C)

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

a = 1
if 0 in list:
    print(0)
    exit()
else:
    for i in list:
        a *= i
        if a > 10**18:
            print(-1)
            exit()
print(a)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, float, input().split()))
print(int(a*b))


Fixed submission:
import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
A, B = read().split()
 
A = int(A)
B = int(float(B) * 100 + .5)
 
A *= B
print(A // 100)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = [int(x) for x in input().split()]

while True:
    I = []
    count = 0
    for i in A:
        if i // 2 == 0:
            I.append(i)
            count += 1
        elif i//2 ==1:
            break

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

c = 0

while all(i % 2 == 0 for i in A):
    A = [i/2 for i in A]
    c += 1
print(c)
Buggy python submission (verdict: Time Limit Exceeded):
c = int(input())
n_list = list(map(int, input().split()))

i = 1

for n in n_list:
    i = i * n

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


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

if min(n_list) == 0:
    print(0)
else:
    i = 1
    ERR = 10 ** 18
    flag = False
    for n in n_list:
        i = i * n
        if i > ERR:
            flag = True
            break

    if flag:
        print(-1)
    else:
        print(i)
Buggy python submission (verdict: Runtime Error):
inputs = list(map(lambda x: int(x), input().split()))
counter = ([1] * inputs[0]) + [0] * inputs[1] + [-1] * inputs[2]

if len(counter) < inputs[3]:
    inputs[3] = len(counter)
    
from functools import reduce

print(reduce(lambda x, y: x + y, counter[0:inputs[3]]))


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

max = 0
v = 1

for i in inputs[0:3]:
    if i > inputs[3]:
        i = inputs[3]
    max += v * i
    inputs[3] -= i
    v -= 1
    if inputs[3] <= 0:
        break

print(max)

Buggy python submission (verdict: Runtime Error):
inputs = list(map(lambda x: int(x), input().split()))
counter = [1] * inputs[0] + [0] * inputs[1] + [-1] * inputs[2]

from functools import reduce

print(reduce(lambda x, y: x + y, counter[0:inputs[3]]))


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

max = 0
v = 1

for i in inputs[0:3]:
    if i > inputs[3]:
        i = inputs[3]
    max += v * i
    inputs[3] -= i
    v -= 1
    if inputs[3] <= 0:
        break

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

huriwake = [0, 0, 0, 0, 0, 0, 0, 0]
rea = 0
count = 0

for i in list:
    if i < 400:
        huriwake[0] = 1
    elif i < 800:
        huriwake[1] = 1
    elif i < 1200:
        huriwake[2] = 1
    elif i < 1600:
        huriwake[3] = 1
    elif i < 2000:
        huriwake[4] = 1
    elif i < 2400:
        huriwake[5] = 1
    elif i < 2800:
        huriwake[6] = 1
    elif i < 3200:
        huriwake[7] = 1
    else:
        rea += 1

for h in huriwake:
    if h == 1:
        count += 1

if count == 0 && rea > 0:
    count += 1

min = count

if rea > 0:
    count += rea
    if count > 8: count = 8

max = count

print("{0} {1}".format(min, max))


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

huriwake = [0, 0, 0, 0, 0, 0, 0, 0]
rea = 0
count = 0

for i in list:
    if i < 400:
        huriwake[0] = 1
    elif i < 800:
        huriwake[1] = 1
    elif i < 1200:
        huriwake[2] = 1
    elif i < 1600:
        huriwake[3] = 1
    elif i < 2000:
        huriwake[4] = 1
    elif i < 2400:
        huriwake[5] = 1
    elif i < 2800:
        huriwake[6] = 1
    elif i < 3200:
        huriwake[7] = 1
    else:
        rea += 1

for h in huriwake:
    if h == 1:
        count += 1

if count == 0 and rea > 0:
    count += 1
    rea -= 1

min = count

if rea > 0:
    count += rea

max = count

print("{0} {1}".format(min, max))
Buggy python submission (verdict: Runtime Error):
a = int(input().rstrip())
b = [ int(i) for i in input().split() ]
print(max(b)-min(b))

Fixed submission:
num = input().split() 
temp = ''
for i in range(len(num)):
    temp = temp + num[i]
print( ['NO','YES'][int(temp)%4==0] )
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
temp = []
c,t = K,-1
for i in range(N):
    temp.append(list(map(int,input().split())))
    temp.sort()
while c>0:
    t += 1
    c -= temp[t][1]
print(temp[t][0])

Fixed submission:
N,K = map(int,input().split())
temp = []
c,t = K,-1
for i in range(N):
    temp.append(list(map(int,input().split())))
temp.sort()
while c>0:
    t += 1
    c -= temp[t][1]
print(temp[t][0])

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
arr = []
temp = []
j = 0
for i in range(N):
    temp.append(list(map(int,input().split())))
    temp.sort()
while len(arr)<K:
    [arr.append(temp[j][0]) for _ in range(temp[j][1])]
    j += 1
print(arr[K-1])

Fixed submission:
N,K = map(int,input().split())
temp = []
c,t = K,-1
for i in range(N):
    temp.append(list(map(int,input().split())))
temp.sort()
while c>0:
    t += 1
    c -= temp[t][1]
print(temp[t][0])
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
arr = list(map(int,input().split()))
def S1(a,b):
    c,last,ans = 0,0,0
    for t in range(N):
        c += 1
        if c % 2 == a:
            while last+arr[t] <= 0:
                ans += 1
                last += 1
        elif c % 2 == b:
            while last +arr[t] >= 0:
                ans +=1
                last -= 1
        last += arr[t]
    return ans
aa = S1(1,0)
bb = S1(0,1)
print(min(aa,bb))

Fixed submission:
N = int(input())
arr = list(map(int,input().split()))
def S1(a,b):
    c,total,ans = 0,0,0
    for t in arr:
        c += 1
        if c % 2 == a:
            if total+t <= 0:
                ans += abs(total+t)+1
                total = 1
                continue
        elif c % 2 == b:
            if total+t >= 0:
                ans += abs(total+t)+1
                total = -1
                continue
        total += t
    return ans
print(min(S1(1,0),S1(0,1)))
Buggy python submission (verdict: Runtime Error):
O,E=[input().rstrip() for _ in range(2)]
for i in range(len(O)):
    print(O[i]+E[i],end="")

Fixed submission:
o, e = [input().rstrip() for i in range(2)] 
ans = ""
for i in range(len(o)):
  ans += o[i]
  if len(e) > i: ans += e[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input() .split())
e = []
for i in range(a, b+1):
    d = i % c
    if d == 0:
        e.append(i)
print(len(e))

Fixed submission:
a, b, c = input() .split()
print("A" + b[0] + "C")
Buggy python submission (verdict: Time Limit Exceeded):
a, b, c = map(int, input() .split())
e = []
for i in range(a, b+1):
    d = i % c
    if d == 0:
        e.append(i)
print(len(e))

Fixed submission:
a,b,x = map(int,input().split())
cb = b//x
ca = (a-1)//x
c = cb - ca
print(c)
Buggy python submission (verdict: Runtime Error):
N,x=map(int,input().split())
S = map(int,input().split())
pre,ans = 0,0
for i in range(N):
    tmp = pre+S[i]
    if tmp > x:
        ans += tmp-x
        S[i] -= tmp-x
    pre = S[i]
print(ans)

Fixed submission:
N,x=map(int,input().split())
S = [int(i) for i in input().split()]
pre,ans = 0,0
for i in range(N):
    tmp = pre+S[i]
    if tmp > x:
        ans += tmp-x
        S[i] -= tmp-x
    pre = S[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
print(a*b)

Fixed submission:
a,b = map(int,input().split())
print(a*b)
Buggy python submission (verdict: Runtime Error):
s=set(list(input()))

if les(s)==1:
    print("Yes")
else:
    print("No")

Fixed submission:
s=set(list(input()))

if len(s)==1:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
n = int(input())
l=list(map(int ,input().split()))
ans=[]
for i in range(min(l)+1,max(l)):
    w=0
    for j in range(n):
        w+=(l[j]-i)**2
    ans.append(w)
    
print(min(ans))

Fixed submission:
n = int(input())
l=list(map(int ,input().split()))
ans=[]
for i in range(min(l)+1,max(l)):
    w=0
    for j in range(n):
        w+=(l[j]-i)**2
    ans.append(w)

if len(ans)==0:
    print(0)
else:
    print(min(ans))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int, input().split()))
cnt=0
for i in range(1,n+1):
	if l[i-1]==min(l[:i]):
		cnt+=1
print(cnt)

Fixed submission:
n=int(input())
l=list(map(int, input().split()))
cnt=1
nmin=l[0]
for i in range(1,n):
	if nmin>=l[i]:
		cnt+=1
		nmin=l[i]
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
l=list(map(int, input().split()))
cnt=0
for i in range(1,n+1):
	if l[i-1]==min(l[:i]):
		cnt+=1
print(cnt)

Fixed submission:
n=int(input())
l=list(map(int, input().split()))
cnt=1
nmin=l[0]
for i in range(1,n):
	if nmin>=l[i]:
		cnt+=1
		nmin=l[i]
print(cnt)
Buggy python submission (verdict: Runtime Error):
h = list(input())
w = list(input())
n = list(input())

print(n//max(h,w))

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

print(math.ceil(n/max(h,w)))
Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
p=[0]*(10**5+2)
s=[0]*m
for i in range(m):
	p[i],s[i]=map(str, input().split()) 
l=[0]*(m+1)
wal=[]
accnt=0
wacnt=0

for i in range(m):
	if l[int(p[i])]==0 and s[i]=='AC':
		l[int(p[i])]=1
		wal.append(wacnt)
		wacnt=0
	elif l[int(p[i])]==1 and s[i]=='AC':
		continue
	elif l[int(p[i])]==0 and s[i]=='WA':
		wacnt+=1
print(sum(l),sum(wal))

Fixed submission:
n,m=map(int, input().split())
acceted=set()
penalty=0
wa_cnt=[0]*(n+1)
for i in range(m):
    p,s=map(str, input().split())
    p=int(p)
    if p in acceted:
        continue
    if s=="AC":
        penalty+=wa_cnt[p]
        acceted.add(p)
    else:
        wa_cnt[p]+=1
print(len(acceted),penalty)

Buggy python submission (verdict: Runtime Error):
n,m = map(int, input().split())
p=[0]*m
s=[0]*m
for i in range(m):
	p[i],s[i]=map(str, input().split()) 
l=[0]*(m+1)
wal=[]
accnt=0
wacnt=0

for i in range(m):
	if l[int(p[i])]==0 and s[i]=='AC':
		l[int(p[i])]=1
		wal.append(wacnt)
		wacnt=0
	elif l[int(p[i])]==1 and s[i]=='AC':
		continue
	elif l[int(p[i])]==0 and s[i]=='WA':
		wacnt+=1
print(sum(l),sum(wal))

Fixed submission:
n,m=map(int, input().split())
acceted=set()
penalty=0
wa_cnt=[0]*(n+1)
for i in range(m):
    p,s=map(str, input().split())
    p=int(p)
    if p in acceted:
        continue
    if s=="AC":
        penalty+=wa_cnt[p]
        acceted.add(p)
    else:
        wa_cnt[p]+=1
print(len(acceted),penalty)
Buggy python submission (verdict: Runtime Error):
a,b,k = map(int ,input().split())
if a>=k:
    a=a-k
elif a<k:
    i=abs(a-k)
    a=0
b=max(0,(b-i))
print(a,b)

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


i=a-k
if i<=0:
    j=b+i
    if j<=0:
        j=0
    i=0
    print(i,j)
else:
    print(i,b)
Buggy python submission (verdict: Runtime Error):
a,b = map(int ,input().split())
l=[1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])

Fixed submission:
a = int(input())
b = int(input())

l=[1,2,3]
l.pop(l.index(a))
l.pop(l.index(b))
print(l[0])
Buggy python submission (verdict: Runtime Error):
x,y = map(int ,input().split())
l=[300000,200000,100000,0]
if x>=4:
    x=4
elif y>=4:
    y=4
        
if x==1 and y==1:
    print(1000000)
else:
    print(l[x-1]+l[y-1])

Fixed submission:
x,y = map(int ,input().split())
l=[300000,200000,100000,0]
if x>=4:
    x=4
if y>=4:
    y=4

if x==1 and y==1:
    print(1000000)
else:
    print(l[x-1]+l[y-1])
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=[]
for i in range(1,10**7):
    if i>=n:
        break
    elif n%i==0:
        ans.append(i+(n//i))
print(min(ans)-2)


Fixed submission:
n=int(input())
ans=[]
for i in range(1,10**7):
    if i>=n:
        break
    elif n%i==0:
        ans.append(i+(n//i))
print(min(ans)-2)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
ans=[]
for i in range(1,10**8):
    if i>=n:
        break
    elif n%i==0:
        ans.append(i+(n//i))
print(min(ans)-2)


Fixed submission:
n=int(input())
ans=[]
for i in range(1,10**7):
    if i>=n:
        break
    elif n%i==0:
        ans.append(i+(n//i))
print(min(ans)-2)

Buggy python submission (verdict: Time Limit Exceeded):
n= int(input())
l=[]
ll=[]
ans=[]
for i in range(n):
    if n%(i+1)==0:
        l.append(i+1)
        ll.append(int(n/(i+1)))
for i in range(len(l)):
    ans.append((l[i]-1)+(ll[i]-1))
print(min(ans))

Fixed submission:
n=int(input())
ans=[]
for i in range(1,10**7):
    if i>=n:
        break
    elif n%i==0:
        ans.append(i+(n//i))
print(min(ans)-2)
Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
l=list(map(int ,input().split()))
for i in range(a):
    print((l.index(i+1))+1, end=" ")

Fixed submission:
n=int(input())
l = list(map(int ,input().split()))
out=[0]*n
for i in range(n):
    out[l[i]-1]=i+1
for i in out:
    print(i, end=" ")

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
l=list(map(int ,input().split()))
for i in range(a):
    print((l.index(i+1))+1, end=" ")

Fixed submission:
n=int(input())
l = list(map(int ,input().split()))
out=[0]*n
for i in range(n):
    out[l[i]-1]=i+1
for i in out:
    print(i, end=" ")

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
l=list(map(int ,input().split()))
for i in range(a):
    print((l.index(i+1))+1)

Fixed submission:
n=int(input())
l = list(map(int ,input().split()))
out=[0]*n
for i in range(n):
    out[l[i]-1]=i+1
for i in out:
    print(i, end=" ")

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
l=list(map(int ,input().split()))
for i in range(a):
    print((l.index(i+1))+1)

Fixed submission:
n=int(input())
l = list(map(int ,input().split()))
out=[0]*n
for i in range(n):
    out[l[i]-1]=i+1
for i in out:
    print(i, end=" ")