Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
val = 7
count = 1
if(k % 2 == 0 or k % 5 == 0):
	print(-1)
	exit()
while(True):
	if(val % k == 0):
		break
	if(count >= 100000):
		print(-1)
		exit()
	count += 1
	val = val * 10 + 7
print(count)	

Fixed submission:
k = int(input())
val = 7
val %= k
for i in range(k+1):
	if(val ==0):
		print(i+1)
		break
	val = (val * 10 + 7) % k
else:
	print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
val = 7
count = 1
while(True):
	if(val % k == 0):
		break
	if(count >= 100000):
		print(-1)
		exit()
	count += 1
	val = val * 10 + 7
print(count)

Fixed submission:
k = int(input())
val = 7
val %= k
for i in range(k+1):
	if(val ==0):
		print(i+1)
		break
	val = (val * 10 + 7) % k
else:
	print(-1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
ans = 1
a = sorted(a,reverse=True)
for i in a:
	ans *=i
	if(0 in a):
		print(0)
		exit()
	if(ans>1000000000000000000):
		print(-1)
		exit()
print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
a = sorted(a,reverse=True)
if(0 in a):
	print(0)
	exit()
for i in a:
	if(len(str(i)) + len(str(ans)) > 20):
		print(-1)
		exit()
	ans *=i

print(ans if(ans<=pow(10,18)) else -1)

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

for i in a:
	ans *=i
	if(0 in a):
		print(0)
		exit()
	if(ans>1000000000000000000):
		print(-1)
		exit()
print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
ans = 1
a = sorted(a,reverse=True)
if(0 in a):
	print(0)
	exit()
for i in a:
	if(len(str(i)) + len(str(ans)) > 20):
		print(-1)
		exit()
	ans *=i

print(ans if(ans<=pow(10,18)) else -1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list=[]
count = 0

for i in range(n):
	
	str = input()
	if (not str in list):
		count += 1
		list.append(str)

print(count)

Fixed submission:
import collections
n = int(input())
list=[]
count = 0

for i in range(n):
	
	str = input()
	list.append(str)

c = collections.Counter(list)
print(len(c))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list=[]

for i in range(n):
	
	str = input()
	if (not str in list):
		list.append(str)

print(len(list))

Fixed submission:
import collections
n = int(input())
list=[]
count = 0

for i in range(n):
	
	str = input()
	list.append(str)

c = collections.Counter(list)
print(len(c))
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
mem=[0]*10

for i in a:
	mem[i-1]+=1

for i in mem:
	print(i)

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
mem=[0]*n

for i in a:
	mem[i-1]+=1

for i in mem:
	print(i)

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

for i in range(n):
	mem.append(a.count(i+1))
	print(mem[i])

Fixed submission:
n=int(input())
a=list(map(int,input().split()))
mem=[0]*n

for i in a:
	mem[i-1]+=1

for i in mem:
	print(i)
Buggy python submission (verdict: Runtime Error):
n = input()

if n[2] == 'f' and n[3] == 'f' and n[4] == 'e' and n[5] = 'e':
	print("Yes")
else:
	print("No")

Fixed submission:
n = input()

if n[2] == n[3]  and n[4] == n[5] :
	print("Yes")
else:
	print("No")
Buggy python submission (verdict: Runtime Error):
n,r = int(input().split())
if n<10:
	r = 100*(10-n)
print(r)


Fixed submission:
n,r = map(int,input().split())
if n<10:
	r = 100*(10-n)+r
print(r)
Buggy python submission (verdict: Runtime Error):
 int(input())
d = dict()
 
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1
 
M = max(d.values())
 
ans_list = []
for k,v in d.items():
    if v == M:
        ans_list.append(k)
 
ans_list.sort()
for i in ans_list:
    print(i)

Fixed submission:
n = int(input())
d = dict()

for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

M = max(d.values())

ans_list = []
for k,v in d.items():
    if v == M:
        ans_list.append(k)

ans_list.sort()
for i in ans_list:
    print(i)

Buggy python submission (verdict: Time Limit Exceeded):
import collections
n = int(input())
s = [input() for i in range(n)]
c = collections.Counter(s)
num = c.most_common()[0][1]
list=[]
for i in range(len(c)):
	if num == c.most_common()[i][1]:
		list.append(c.most_common()[i][0])
list = sorted(list)
for i in list:
	print(i)

Fixed submission:
n = int(input())
d = dict()

for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

M = max(d.values())

ans_list = []
for k,v in d.items():
    if v == M:
        ans_list.append(k)

ans_list.sort()
for i in ans_list:
    print(i)
Buggy python submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
a.sort()
for i in range(n-1):
	if a[i]==a[i+1]:
		print("NO")
		break
else:
	print("YES")

Fixed submission:
s=input()
print("x"*len(s))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
list=[]
for i in a:
	if i in list:
		print("NO")
		break
	list.append(i)
else:
	print("YES")



Fixed submission:
n=int(input())
a=list(map(int,input().split()))
a.sort()
for i in range(n-1):
	if a[i]==a[i+1]:
		print("NO")
		break
else:
	print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=list(map(int,input().split()))
count=0
for i in range(n):
	val=i+1
	l=[]
	for j in range(val):
		l.append(p[j])
	if min(l)==p[j]:
		count+=1
print(count)

Fixed submission:
n=int(input())
p=list(map(int,input().split()))
count=0
min=100000000
for i in range(n):
	if min>=p[i]:
		count+=1
		min=p[i]
print(count)
Buggy python submission (verdict: Runtime Error):
import sys
import math

N = int(input())

list = []

for i in range(n):
    S, P = input().split()
    list.append((S, int(P), i+1))

list = sorted(list, key=lambda x:x[1],reverse = True) 
list = sorted(list, key=lambda x:x[0]) 
for j in range(N):
	print(list[j][2])


Fixed submission:
import sys
import math

N = int(input())

list = []

for i in range(N):
    S, P = input().split()
    list.append((S, int(P), i+1))

list = sorted(list, key=lambda x:x[1],reverse = True) 
list = sorted(list, key=lambda x:x[0]) 
for j in range(N):
	print(list[j][2])
Buggy python submission (verdict: Runtime Error):

s = input()
mm1 = False
mm2 = False

if 0 < int(s[:2]) < 13:
    mm1 = True
if 0 < int(s[-2:]) < 13:
    mm2 = True

if mm1 == True and mm2 == True:
    print("AMBIGUOUS")
    return 
if mm1 == False and mm2 == False:
    print("NA")
    return
if mm1 == True and mm2 == False:
    print("MMYY")
    return
if mm1 == False and mm2 == True:
    print("YYMM")
    return
print("NA")

Fixed submission:
import sys
s = input()
mm1 = False
mm2 = False

if 0 < int(s[:2]) < 13:
    mm1 = True
if 0 < int(s[-2:]) < 13:
    mm2 = True

if mm1 == True and mm2 == True:
    print("AMBIGUOUS")
    sys.exit()
if mm1 == False and mm2 == False:
    print("NA")
    sys.exit()
if mm1 == True and mm2 == False:
    print("MMYY")
    sys.exit()
if mm1 == False and mm2 == True:
    print("YYMM")
    sys.exit()
print("NA")
Buggy python submission (verdict: Runtime Error):
import sys
import math
import itertools

a,b,k=list(map(int,input().split()))
ans=[]
for i in range (1,max(a,b),1):
	if a%i==0 and b%i==0:
		ans.append(i)
print(ans[-k])

Fixed submission:
import sys
import math
import itertools

a,b,k=list(map(int,input().split()))
ans=[]
for i in range (1,max(a,b)+1,1):
	if a%i==0 and b%i==0:
		ans.append(i)
print(ans[-k])
Buggy python submission (verdict: Runtime Error):
import sys
import math
import itertools

n=int(input())
if n==5 or n==7 or n==3
	print("Yes")
else :
	print("No")

Fixed submission:
import sys
import math
import itertools

n=int(input())
if n==5 or n==7 or n==3 :
	print("YES")
else :
	print("NO")
Buggy python submission (verdict: Runtime Error):

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
for i in range(1,min(a)+1):
	if i in b:
		b.remove(i)
for i in range(1,min(b)+1):
	if i in c:
		c.remove(i)
count=0
for i in range(n):
	for j in range(n):
		if a[i]<b[j]:
			for k in range(n):
				if b[j]<c[k]:
					count+=1
print(count)			

Fixed submission:
import bisect
N=int(input())
A=sorted(list(map(int,input().split())))
B=sorted(list(map(int,input().split())))
C=sorted(list(map(int,input().split())))
ans=0
for i in B:
  a=bisect.bisect_left(A,i)
  b=N-bisect.bisect_right(C,i)
  ans+=a*b
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
count=0
for i in range(n):
	for j in range(n):
		if a[i]<b[j]:
			for k in range(n):
				if b[j]<c[k]:
					count+=1
print(count)			

Fixed submission:
import bisect
N=int(input())
A=sorted(list(map(int,input().split())))
B=sorted(list(map(int,input().split())))
C=sorted(list(map(int,input().split())))
ans=0
for i in B:
  a=bisect.bisect_left(A,i)
  b=N-bisect.bisect_right(C,i)
  ans+=a*b
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
count=0
for i in range(n):
	for j in range(n):
		for k in range(n):
			if a[i]<b[j] and b[j]<c[k]:
				count+=1
print(count)			

Fixed submission:
import bisect
N=int(input())
A=sorted(list(map(int,input().split())))
B=sorted(list(map(int,input().split())))
C=sorted(list(map(int,input().split())))
ans=0
for i in B:
  a=bisect.bisect_left(A,i)
  b=N-bisect.bisect_right(C,i)
  ans+=a*b
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
paper=[]
for i in range(n):
	a=input()
	if a in paper:
		paper.remove(a)
	else :
		paper.append(a)
print(len(paper))

Fixed submission:
import collections
n = int(input())
list = []
count = 0
for i in range(n):
    a = int(input())
    list.append(a)
ans = collections.Counter(list)
for j in ans.values():
    if j % 2 == 1:
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
import sys
import fractions

n=int(input())
list=[]
count=1
ans=1
for i in range(n):
	t=int(input())
	if not t in list:
		list.append(t)
		count*=t
		ans = fractions.gcd(ans, list[i])
print(count//ans)

Fixed submission:
import sys
import fractions

n=int(input())
list=[]
ans=1
for i in range(n):
	t=int(input())
	list.append(t)
	ans =ans * list[i] // fractions.gcd(ans, list[i])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

n,m=map(int,input().split())
a=[]
b=[]
for i in range(m):
	numa,numb=map(int,input().split())
	a.append(numa)
	b.append(numb)
bb=[]
if not 1 in a or not n in b:
	print("IMPOSSIBLE")
	sys.exit()
for j in range(len(a)):
    if 1==a[j]:
        bb.append(b[j])
if len(bb)==0:
	print("IMPOSSIBLE")
	sys.exit()
for k in range(len(bb)):
	for l in range(len(a)):
		if bb[k]==a[l] and b[l]==n :
			print("POSSIBLE")
			sys.exit()
print("IMPOSSIBLE")

Fixed submission:
import sys

n,m=map(int,input().split())
a=[]
b=[]
for i in range(m):
	numa,numb=map(int,input().split())
	a.append(numa)
	b.append(numb)
bb=[]
aa=[]
if not 1 in a or not n in b:
	print("IMPOSSIBLE")
	sys.exit()
for j in range(len(a)):
    if 1==a[j]:
        bb.append(b[j])
for k in range(len(b)):
    if n==b[k]:
        aa.append(a[k])
list=set(aa) & set(bb)
print("IMPOSSIBLE" if len(list)==0 else "POSSIBLE")

Buggy python submission (verdict: Time Limit Exceeded):
import sys

n,m=map(int,input().split())
a=[]
b=[]
for i in range(m):
	numa,numb=map(int,input().split())
	a.append(numa)
	b.append(numb)
bb=[]
for j in range(len(a)):
    if 1==a[j]:
        bb.append(b[j])
if len(bb)==0:
	print("IMPOSSIBLE")
	sys.exit()
for k in range(len(bb)):
	for l in range(len(a)):
		if bb[k]==a[l] and b[l]==n :
			print("POSSIBLE")
			sys.exit()
print("IMPOSSIBLE")



Fixed submission:
import sys

n,m=map(int,input().split())
a=[]
b=[]
for i in range(m):
	numa,numb=map(int,input().split())
	a.append(numa)
	b.append(numb)
bb=[]
aa=[]
if not 1 in a or not n in b:
	print("IMPOSSIBLE")
	sys.exit()
for j in range(len(a)):
    if 1==a[j]:
        bb.append(b[j])
for k in range(len(b)):
    if n==b[k]:
        aa.append(a[k])
list=set(aa) & set(bb)
print("IMPOSSIBLE" if len(list)==0 else "POSSIBLE")
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
list=[0]*4
for i in range(m):
	a,b=map(int,input().split())
	list[a-1]+=1
	list[b-1]+=1
for j in range(n):
	print(list[j])

Fixed submission:
n,m=map(int,input().split())
list=[0]*n
for i in range(m):
	a,b=map(int,input().split())
	list[a-1]+=1
	list[b-1]+=1
for j in range(n):
	print(list[j])
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
if a>b:
	print("GREATER")
else if a==b:
	print("LESS")
else:
	print("EQUAL")

Fixed submission:
a=int(input())
b=int(input())
if a>b:
	print("GREATER")
elif a<b:
	print("LESS")
else:
	print("EQUAL")
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=[input() for num in range(n)]
for i in range(97,97+26,1):
	s0=s[0].count(chr(i))
	s1=s[1].count(chr(i))
	s2=s[2].count(chr(i))
	count=(min(s0,min(s1,s2)))
	for j in range(count):
		print(chr(i),end="")

Fixed submission:
n=int(input())
s=[input() for num in range(n)]
for i in range(97,97+26,1):
	list=[]
	for j in range(n):
		list.append(s[j].count(chr(i)))
	print(chr(i)*min(list),end="")
Buggy python submission (verdict: Time Limit Exceeded):
k,s=list(map(int,input().split()))
count=0
for i in range(k+1):
	x=i
	for j in range(k+1):
		y=j
		for l in range(k+1):
			z=l
			if (x+y+z==s):
				count+=1
print (count)

Fixed submission:
k,s=list(map(int,input().split()))
count=0
for i in range(k+1):
	x=i
	for j in range(k+1):
		y=j
		if (s-x-y<=k and x+y<=s):
			count+=1
print (count)
Buggy python submission (verdict: Time Limit Exceeded):
s=input()
count=0
while(True):

	if not 'W' in s or not 'B' in s :
		print(count)
		break

	if s[0]=='W':
		point=s.find('B')
		for i in range(point):
			s=s[:i]+'B'+s[i+1:]
	elif s[0]=='B':
		point=s.find('W')
		for i in range(point):
			s=s[:i]+'W'+s[i+1:]

	count+=1

Fixed submission:
s=input()
count=0
for i in range(0,len(s)-1):
	if s[i]!=s[i+1]:
		count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
from math import floor
A,B,N = map(int,input().split())
if N <= B:
    print(floor(A*N/B)-A*floor(N/B))
else:
    print("1"*"1")
    print(max(floor(A*N/B)-A*floor(N/B),floor(A*(B+1)/B)-A*floor((B+1)/B)))


Fixed submission:
from math import floor
A,B,N = map(int,input().split())
x = min(B-1,N)
print(floor(A*x/B)-A*floor(x/B))

Buggy python submission (verdict: Time Limit Exceeded):
from math import floor
A,B,N = map(int,input().split())
ans = []
for x in range(min(B+1,N+1)):
    ans.append(floor((A*x)/B)-A*floor(x/B))
print(max(ans))


Fixed submission:
from math import floor
A,B,N = map(int,input().split())
x = min(B-1,N)
print(floor(A*x/B)-A*floor(x/B))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
L = Counter(A)
anss = {}
for k,v in L.items():
    L[k] -= 1
    anss[k] = sum([i*(i-1)//2 for i in list(L.values()) if i >= 2])
    L[k] += 1
for i in A:
    print(anss[i])


Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
L = Counter(A)
anss = {}
sum_ans = sum([i*(i-1)//2 for i in L.values() if i >= 2])
for k,v in L.items():
    anss[k] = sum_ans - (v*(v-1)//2) + ((v-1)*(v-2)//2)
for i in A:
    print(anss[i])

Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
L = Counter(A)
for i in A:
    ans = []
    L_cp = L.copy()
    L_cp[i] -= 1
    print(sum([i*(i-1)//2 for i in L_cp.values() if i >= 2]))


Fixed submission:
from collections import Counter
N = int(input())
A = list(map(int,input().split()))
L = Counter(A)
anss = {}
sum_ans = sum([i*(i-1)//2 for i in L.values() if i >= 2])
for k,v in L.items():
    anss[k] = sum_ans - (v*(v-1)//2) + ((v-1)*(v-2)//2)
for i in A:
    print(anss[i])
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
Q = int(input())
rev = False
for i in range(Q):
    query = input()
    if query == "1":
        T = 1
        rev = not(rev)
    else:
        T,F,C = query.split()
        if rev:
            if F == "1":
                S = S + C
            else:
                S = C + S
        else:
            if F == "1":
                S = C + S
            else:
                S = S + C
if rev:
    print("".join(list(reversed(S))))
else:
    print(S)


Fixed submission:
from collections import deque
S = deque(list(input()))
Q = int(input())
rev = False
for i in range(Q):
    query = input()
    if query == "1":
        rev = not(rev)
    else:
        T,F,C = query.split()
        if rev:
            if F == "1":
                S.append(C)
            else:
                S.appendleft(C)
        else:
            if F == "1":
                S.appendleft(C)
            else:
                S.append(C)
if rev:
    print("".join(list(reversed(S))))
else:
    print("".join(S))
Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
p_list = list(map(int,input().split()))
ans_list = []
def E(me):
    if me == 1:
        return 1
    else:
        return ((1+me)*me/2)/me
E_list = [E(i) for i in p_list]
ans = 0
for i in range(N-K+1):
    ans = max(sum(E_list[i:i+K]),ans)
print(ans)


Fixed submission:
N,K = map(int,input().split())
p_list = list(map(int,input().split()))
ans_list = []
def E(me):
    if me == 1:
        return 1
    else:
        return ((1+me)*me/2)/me
E_list_ruisekiwa = [0,]
for i in range(N):
    E_list_ruisekiwa.append(E_list_ruisekiwa[i]+E(p_list[i]))

ans = 0
for i in range(N-K+1):
    ans = max(E_list_ruisekiwa[i+K]-E_list_ruisekiwa[i],ans)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N,K = map(int,input().split())
p_list = list(map(int,input().split()))
ans_list = []
def E(me):
    if me == 1:
        return 1
    else:
        return ((1+me)*me/2)/me
E_list = [E(i) for i in p_list]
for i in range(N-K+1):
    ans_list.append(sum(E_list[i:i+K]))
print(max(ans_list))


Fixed submission:
N,K = map(int,input().split())
p_list = list(map(int,input().split()))
ans_list = []
def E(me):
    if me == 1:
        return 1
    else:
        return ((1+me)*me/2)/me
E_list_ruisekiwa = [0,]
for i in range(N):
    E_list_ruisekiwa.append(E_list_ruisekiwa[i]+E(p_list[i]))

ans = 0
for i in range(N-K+1):
    ans = max(E_list_ruisekiwa[i+K]-E_list_ruisekiwa[i],ans)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
ans = 0
for i in range(N):
    P_j = P[:i]
    if P_j == []:
        ans += 1
    elif min(P_j) >= P[i]:
        ans += 1
print(ans)

Fixed submission:
N = int(input())
P = list(map(int,input().split()))
P_min = [2*(10**5)]
for i in range(N-1):
    P_min.append(min(P_min[i],P[i]))
ans = 0
for i in range(N):
    if P_min[i] >= P[i]:
        ans += 1
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
P = list(map(int,input().split()))
ans = 0
for i in range(N):
    P_j = P[:i]
    if P_j == []:
        ans += 1
    elif min(P_j) > P[i]:
        ans += 1
print(ans)


Fixed submission:
N = int(input())
P = list(map(int,input().split()))
P_min = [2*(10**5)]
for i in range(N-1):
    P_min.append(min(P_min[i],P[i]))
ans = 0
for i in range(N):
    if P_min[i] >= P[i]:
        ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
A,B,K = map(int,input().split())
"""
for i in range(K):
    if(A >= 1):
        A -= 1
    elif(B >= 1):
        B -= 1
    else:
        continue
"""
if K >= A:
    _A = 0
else:
   _A = A - K

if K-A >= 1:
    _B = B-(K-A)
print(_A,_B)


Fixed submission:
A,B,K = map(int,input().split())
"""
for i in range(K):
    if(A >= 1):
        A -= 1
    elif(B >= 1):
        B -= 1
    else:
        continue
"""

"""
if K >= A:
    _A = 0
else:
   _A = A - K

if K-A >= 1:
    _B = B-(K-A)
print(_A,_B)
"""

if K <= A:
    A_ = A - K
    B_ = B
elif K >= A + B:
    A_ = 0
    B_ = 0
else:
    A_ = 0
    B_ = B - (K - A)
print(A_,B_)
Buggy python submission (verdict: Runtime Error):
from math import gcd
A,B = map(int,input().split())

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

print(lcm(A,B))


Fixed submission:
#from math import gcd
from fractions import gcd
A,B = map(int,input().split())

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

print(lcm(A,B))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A_list = list(map(int, input().split()))
i = 0
while(True):
    try:
        if A_list[i] != i+1:
            del A_list[i]
        else:
            i += 1
    except:
        if A_list == []:
            print(-1)
        else:
            print(N-len(A_list))
        exit()


Fixed submission:
"""TLE
N = int(input())
A_list = list(map(int, input().split()))
i = 0
while(True):
    try:
        if A_list[i] != i+1:
            del A_list[i]
        else:
            i += 1
    except:
        if A_list == []:
            print(-1)
        else:
            print(N-len(A_list))
        exit()
"""

N = int(input())
A_list = list(map(int, input().split()))
iirenga = 1
kudaita = 0
for i in range(N):
    if A_list[i] == iirenga:
        iirenga += 1
    else:
        kudaita += 1
if kudaita == N:
    print(-1)
    exit()
print(kudaita)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
for i in range(N):
    if i != N-1:
        print(A.index(i+1)+1,end=" ")
    else:
        print(A.index(i+1)+1)

Fixed submission:
N = int(input())
ans = [0 for i in range(N)]
for num,i in enumerate(list(map(int,input().split()))):
    ans[i-1] = num + 1
print(*ans)
Buggy python submission (verdict: Time Limit Exceeded):
A = [int(input()) for i in range(int(input()))]
max_A = max(A)
for i in A:
    if i == max_A:
        print(sorted(A)[-2])
    else:
        print(max_A)


Fixed submission:
A = [int(input()) for i in range(int(input()))]
first = max(A)
second = sorted(A)[-2]
for i in A:
    if i == first:
        print(second)
    else:
        print(first)

Buggy python submission (verdict: Time Limit Exceeded):
A = [int(input()) for i in range(int(input()))]
for i in range(len(A)):
    print(max(A[:i]+A[i+1:]))


Fixed submission:
A = [int(input()) for i in range(int(input()))]
first = max(A)
second = sorted(A)[-2]
for i in A:
    if i == first:
        print(second)
    else:
        print(first)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = []
for i in range(N):
    A.append(int(input()))
for num,a in enumerate(A):
    del A[num]
    print(max(A))
    A.insert(num,a)


Fixed submission:
A = [int(input()) for i in range(int(input()))]
first = max(A)
second = sorted(A)[-2]
for i in A:
    if i == first:
        print(second)
    else:
        print(first)