ZhenlongDai/ACPR huggingface dataset:
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,S = map(int, input().split())
tmp = 1
a = 2
while (True):
  if N % a == 0 and S % a == 0:
    N,S = int(N / a), int(S / a)
    tmp *= a
    a = 1
  a += 1
  if N <= a or S <= a:
    break
print(tmp * S * N)

Failing test case input:
011100 10

Expected output:
11100


Actual output:
55500


Fixed submission (verdict: Accepted):
N,S = map(int, input().split())
tmp = 1
a = 1
while True:
  if N 
    break
  if N % a == 0 and S % a == 0:
    N,S = N 
    tmp *= a
    a = 1
  a += 1

print(tmp * S * N)

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B = map(int,input().split())

M = min(A,B)

flg = True

while flg:
  flg = False
  for m in range(M,1,-1):
    if A%m==0 and B%m==0:
      B=int(B/m)
      flg = True
      break
      
print(A*B)

Failing test case input:
010100 8

Expected output:
20200


Actual output:
10100


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())

flg = True

C=1
while flg:
  M = min(A,B)
  flg = False
  for m in range(M,1,-1):
    if A%m==0 and B%m==0:
      B=int(B/m)
      A=int(A/m)
      C=C*m
      flg = True
      break
      
print(A*B*C)

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b = map(int, input().split())
print(6 - (a + b))


Failing test case input:
010111 2

Expected output:
20222


Actual output:
-10107


Fixed submission (verdict: Accepted):
import fractions

a, b = map(int, input().split())
print(a

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split())) 
B = A[0]
C = A[1]

BB = []
CB = []

def myfunc(X, XX):
  for num in range(2, X+1):
    if(X%num == 0):
      XX.append(num)
      BA = int(X/num)
      myfunc(BA, XX)
      break

myfunc(B, BB)
myfunc(C, CB)

DB = []

for num1 in BB:
  for num2 in range(len(CB) - 1):
    if num1 == CB[num2]:
      DB.append(num1)
      CB.pop(num2)
      break

BB.extend(CB)

ANSWER = 1

for num in BB:
  ANSWER = num * ANSWER

if(B == C):
  ANSWER = B

print(ANSWER)

Failing test case input:
010010 77

Expected output:
10010


Actual output:
110110


Fixed submission (verdict: Accepted):
A = list(map(int, input().split())) 
B = A[0]
C = A[1]

BB = []
CB = []

def myfunc(X, XX):
  for num in range(2, X+1):
    if(X%num == 0):
      XX.append(num)
      BA = int(X/num)
      myfunc(BA, XX)
      break

myfunc(B, BB)
myfunc(C, CB)

for num1 in BB:
  for num2 in range(len(CB)):
    if num1 == CB[num2]:
      CB.pop(num2)
      break

BB.extend(CB)

ANSWER = 1

for num in BB:
  ANSWER = num * ANSWER

print(ANSWER)
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j


if k == 0:
    k = 1
    
res = A * B / k
print(int(res))


Failing test case input:
111000 84

Expected output:
777000


Actual output:
9324000


Fixed submission (verdict: Accepted):
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
        break


if k == 0:
    k = 1


res = A * B / k

print(int(res))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

C = 0

while C == 0:
  if A % B == 0:
    C = 1
  else:
    A += 1

print(A)

Failing test case input:
001000 22

Expected output:
11000


Actual output:
1012


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())

C = 0

for i in range(B):
  if A * (i+1) % B == 0:
    print(A*(i+1))
    break

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

print(large_num/div_result*small_num)

Failing test case input:
110000 121574

Expected output:
6686570000


Actual output:
6686570000.0


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

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

result = int(large_num/div_result*small_num)
print(result)

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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


Failing test case input:
011100 10

Expected output:
11100


Actual output:
111000


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

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b = map(int, input().split())
n = 1
while True:
    if n*a%a == 0 and n*a%b == 0:
        print(n)
        break
    n += 1

Failing test case input:
010110 8

Expected output:
40440


Actual output:
4


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
n = 1
for i in range(1, b+1):
    if (a*i) % b == 0:
        print(a*i)
        break
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())
def gcd(a,b):
    if a < b:
        temp = b
        b = a 
        a = temp
    remainder = a % b
    if remainder == 0:
        return b
    else:
        return gcd(remainder,b)
 
def gys(a,b):
    remainder = gcd(a,b)
    print(a*b/remainder)
print(gys(a,b))

Failing test case input:
001000 19

Expected output:
19000


Actual output:
19000.0
None


Fixed submission (verdict: Accepted):
a,b = map(int,input().split())
def gcd(a,b):
    if a < b:
        temp = b
        b = a 
        a = temp
    remainder = a % b
    if remainder == 0:
        return b
    else:
        return gcd(remainder,b)
 
def gys(a,b):
    remainder = gcd(a,b)
    print(int(a*b/remainder))
gys(a,b)

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=input().split()
a=int(A)
b=int(B)

c=min(a,b)

def sosu(x):
  for i in range(x):
    sum=0
    if x%(i+1)==0:
      sum+=1
    
    if sum==2:
      return True
    else:
      return False
j=2  
kobai=[]
while j<=c:
  if a%j==0 and b%j==0 and sosu(j):
    c=int(c/j)
    kobai.append(j)
    j=2
   
  else:
    j+=1

answer=a*b
for i in range(len(kobai)):
  answer=int(answer/kobai[i])

print(answer)

Failing test case input:
001000 22

Expected output:
11000


Actual output:
22000


Fixed submission (verdict: Accepted):
A,B=input().split()
a=int(A)
b=int(B)
 
c=min(a,b)
 
def sosu(x):
    sum=0
    for i in range(x):
        if x%(i+1)==0:
            sum+=1
    if sum==2:
        return True
    else:
        return False

j=2  
kobai=[]
while j<=c:
  if a%j==0 and b%j==0 and sosu(j):
    c=int(c/j)
    kobai.append(j)
    
    a=int(a/j)
    b=int(b/j)
    j=2
   
  else:
    j+=1

answer=int(A)*int(B)
for i in range(len(kobai)):
  answer=int(answer/kobai[i])

print(answer)

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = [int(s) for s in input().split()]

com = 1
tes = 2
if max(num)%min(num) == 0:
  print(max(num))
else:
  while tes < min(num)/2 +1:
    if min(num)%tes == 0 and max(num)%tes == 0:
      com *= tes
      num = [int(n/tes) for n in num]
    else:
      tes += 1

print(com*min(num)*max(num))

Failing test case input:
011100 10

Expected output:
11100


Actual output:
11100
111000


Fixed submission (verdict: Accepted):
num = [int(s) for s in input().split()]

com = 1
tes = 2
if max(num)%min(num) == 0:
  print(max(num))
else:
  while tes < min(num)/2 +1:
    if min(num)%tes == 0 and max(num)%tes == 0:
      com *= tes
      num = [int(n/tes) for n in num]
    else:
      tes += 1
  print(com*min(num)*max(num))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
def gcd(x, y):
    while x%y != 0:
        x, y = y, x%y
    return y
ans = a * b / gcd(a, b)
print(ans)

Failing test case input:
010010 549

Expected output:
5495490


Actual output:
5495490.0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
def gcd(x, y):
    while x%y != 0:
        x, y = y, x%y
    return y
ans = a * b / gcd(a, b)
print(int(ans))
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
complete = int(a) * int(b);
tmp = complete
for i in range(2, min(int(a), int(b)) + 1):
    tmp = complete / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        if tmp / int(b) > complete / int(b) or tmp / int(a) > complete / int(a):
            complete = tmp
print(int(complete))


Failing test case input:
001000 22

Expected output:
11000


Actual output:
22000


Fixed submission (verdict: Accepted):
a, b = input().split()
product = int(a) * int(b);
complete = product
tmp = product
for i in range(2, min(int(a), int(b)) + 1):
    tmp = product / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        complete = tmp
print(int(complete))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0

for i in range(min([A, B])):
    j = i + 1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
    else:
        break

res = A * B / k
print(int(res))


Failing test case input:
50 30

Expected output:
150


Actual output:
750


Fixed submission (verdict: Accepted):
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
        break


if k == 0:
    k = 1


res = A * B / k

print(int(res))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

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

abs = 1
for i in list(range(1,min(A,B)+1))[::-1]:
    if A%i==0 and B%i==0:
        print(i)
        abs = i
        break

print(int(A*B/abs))

Failing test case input:
111000 43

Expected output:
4773000


Actual output:
1
4773000


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

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

abs = 1
for i in list(range(1,min(A,B)+1))[::-1]:
    if A%i==0 and B%i==0:
        abs = i
        break

print(int(A*B/abs))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
L = N.split()
a = int(L[0])
b = int(L[1])

if a < b:
    c = a
    a = b
    b = c

r = a % b
    
while r != 0:
    a = b
    b = r
    r = a % b



print(int(L[0])*int(L[1])/b)

Failing test case input:
111000 43

Expected output:
4773000


Actual output:
4773000.0


Fixed submission (verdict: Accepted):
N = input()
L = N.split()
a = int(L[0])
b = int(L[1])

if a < b:
    c = a
    a = b
    b = c

r = a % b
    
while r != 0:
    a = b
    b = r
    r = a % b



print(int(int(L[0])*int(L[1])/b))
Problem: p02831
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=input().split()
a=int(a)
b=int(b)
e=a
d=b
c=1
d=0
if a>b:
  for i in range(1,e):
    if a%(e-i)==0 and b%(e-i)==0:
      a=a/(e-i)
      b=b/(e-i)
      c=c*(e-i)
  print(int(a*b*c))
if a<b:
  for i in range(1,d):
    if a%(d-i)==0 and b%(d-i)==0:
      a=a/(d-i)
      b=b/(d-i)
      c=c*(d-i)
  print(int(a*b*c))

Failing test case input:
123 456

Expected output:
18696

Actual output:
56088


Fixed submission (verdict: Accepted):
a,b=input().split()
a=int(a)
b=int(b)
e=a
d=b
c=1
if a>b:
  for i in range(1,e):
    if a%(e-i)==0 and b%(e-i)==0:
      a=a/(e-i)
      b=b/(e-i)
      c=c*(e-i)
  print(int(a*b*c))
if a<b:
  for i in range(1,d):
    if a%(d-i)==0 and b%(d-i)==0:
      a=a/(d-i)
      b=b/(d-i)
      c=c*(d-i)
  print(int(a*b*c))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
complete = int(a) * int(b);
tmp = complete
for i in range(2, max(int(a), int(b)) + 1):
    tmp = complete / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        complete = tmp

print(int(complete))



Failing test case input:
110000 52132

Expected output:
1433630000


Actual output:
2867260000


Fixed submission (verdict: Accepted):
a, b = input().split()
product = int(a) * int(b);
complete = product
tmp = product
for i in range(2, min(int(a), int(b)) + 1):
    tmp = product / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        complete = tmp
print(int(complete))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
str = list(map(int, input().split()))
a = str[0]
b = str[1]
i = 1
if a < b:
  big = b
  small = a
else:
  big = a
  small = b

while i != 0:
  i = big % small
  big = small
  small = i

print (a*b/big)

Failing test case input:
111001 2

Expected output:
222002


Actual output:
222002.0


Fixed submission (verdict: Accepted):
str = list(map(int, input().split()))
a = str[0]
b = str[1]
i = 1
if a < b:
  big = b
  small = a
else:
  big = a
  small = b

while i != 0:
  i = big % small
  big = small
  small = i

print (int(a*b/big))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int,input().split()))
def cud(a,b):
  if a%b==0:
    return b
  else:
    return cud(b,a%b)
print(a[0]*a[1]/cud(a[0],a[1]))

Failing test case input:
100000 99999

Expected output:
9999900000

Actual output:
9999900000.0


Fixed submission (verdict: Accepted):
a=list(map(int,input().split()))
def cud(a,b):
  if a%b==0:
    return b
  else:
    return cud(b,a%b)
print(int(a[0]*a[1]/cud(a[0],a[1])))
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1


if y%x==0:
    print(y)

else:
    root=round((x**(1/2)))
    for i in range(2,root):
        if x%i==0 and y%i==0:
            x/=i
            y/=i
            check*=i 
            i=2
            root=round((x**(1/2)))
    print(int(check*x*y))

      

Failing test case input:
111100 84

Expected output:
2333100


Actual output:
4666200


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1


if y%x==0:
    print(y)

else:
    
    while True:
        through=0
        for i in range(2,int(x)):
            if x%i==0 and y%i==0:
                x/=i
                y/=i
                check*=i 
                through=1
                break
        if through==0:
            break
    print(int(check*x*y))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(A,B): 
    if A == 0: 
        return B 
    return gcd(B % A, A) 
  
def lcm(A,B): 
    return (A*B) / gcd(A,B)

A,B = map(int,input().split())
print(lcm(A,B))


Failing test case input:
50 267

Expected output:
13350


Actual output:
13350.0


Fixed submission (verdict: Accepted):
def gcd(A,B): 
    if A == 0: 
        return B 
    return gcd(B % A, A) 
  
def lcm(A,B): 
    return (A*B) / gcd(A,B)

A,B = map(int,input().split())
print(int(lcm(A,B)))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def get_gcd(a, b):
    if a > b:
        r = a % b
    else:
        r = b % a
    if r == 0:
        return b
    else:
        return get_gcd(b, r)
    
    
a, b = map(int, input().split(' '))
g = get_gcd(a, b)
print(int(a * b / g))

Failing test case input:
2 54

Expected output:
54


Actual output:
2


Fixed submission (verdict: Accepted):
def get_gcd(a, b):
    if a < b:
        a, b = b, a
    r = -1
    while r:
        r = a % b
        a = b
        b = r
    return a

a, b = map(int, input().split())
g = get_gcd(a, b)
ans = int(a * b / g)
print(ans)
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b = INTM()
    c =min(a,b)
    d=max(a,b)
    if d%c ==0:
        print(int(d))
    else:
        while d%c!=0:
            e = d%c
            d = c
            c = e
            print(e)
        print(int(a*b/e))
if __name__ == '__main__':
    do()

Failing test case input:
111100 84

Expected output:
2333100


Actual output:
52
32
20
12
8
4
2333100


Fixed submission (verdict: Accepted):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b = INTM()
    c =min(a,b)
    d=max(a,b)
    if d%c ==0:
        print(int(d))
    else:
        while d%c!=0:
            e = d%c
            d = c
            c = e

        print(int(a*b/e))
if __name__ == '__main__':
    do()

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

lcm = 1
cont = 1

while cont == 1:
  if A % B == 0 or B % A == 0:
    lcm = min(A, B)
    break
  
  if A < B:
    B = B % A
  elif A > B:
    A = A % B

print(A * B / lcm)

Failing test case input:
000010 4

Expected output:
20


Actual output:
4.0


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
AA = A
BB = B
lcm = 1
cont = 1

while cont == 1:
  if A % B == 0 or B % A == 0:
    lcm = min(A, B)
    break
  
  if A < B:
    B = B % A
  elif A > B:
    A = A % B

ans = int(AA * BB / lcm)
print(ans)

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def GCD(x,y):
  if y == 0:
    return 1
  return GCD(y, x%y)

print(GCD(1,5))

Failing test case input:
010010 87

Expected output:
870870


Actual output:
1


Fixed submission (verdict: Accepted):
def GCD(x,y):
  if y == 0:
    return x
  return GCD(y, x%y)

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

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

p = 2


if A > B:
    for y in range(100000):
        e = (A * p) % B
        o = (A * p)
        if e == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000):
        e = (B * p) % A
        o = (B * p)
        if  e == 0:
            print(int(o))
            break
        else:
            p += 1

Failing test case input:
011100 10

Expected output:
11100


Actual output:
22200


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())

p = 1


if A > B:
    for y in range(100000000):
        e = (A * p) % B
        o = (A * p)
        if e == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000000):
        e = (B * p) % A
        o = (B * p)
        if  e == 0:
            print(int(o))
            break
        else:
            p += 1
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
c = b

if a < b:
  a, b = b, a
while a % b != 0:
  a, b = b, a%b
  
print(int(a*c/b))


Failing test case input:
85 179

Expected output:
15215


Actual output:
716


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
c = a
d = b

if a < b:
  a, b = b, a
while a % b != 0:
  a, b = b, a%b
  
print(int(c*d/b))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b=(int(x) for x in input().split())
gcc=1
i=2
while True:
    if(a<i or b<i):
        break
    elif (a%i==0 and b%i==0):
        print(i)
        gcc*=i
        a/=i
        b/=i
        i=2
    else:
        i+=1

print(int(a*b*gcc))

Failing test case input:
001000 22

Expected output:
11000


Actual output:
2
11000


Fixed submission (verdict: Accepted):
a,b=(int(x) for x in input().split())
gcc=1
i=2
while True:
    if(a<i or b<i):
        break
    elif (a%i==0 and b%i==0):
        gcc*=i
        a/=i
        b/=i
        i=2
    else:
        i+=1

print(int(a*b*gcc))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())
a , c = 0, 0
ans = 0

if B > A:
  c = B
  B = A
  A = c
 
for i in range(1, B):
  a = A * i
  if ans != 0:
    break
  if a % B == 0:
    ans = a
    break
print(ans)

Failing test case input:
011100 13

Expected output:
144300


Actual output:
0


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())
a , c = 0, 0
ans = 0

if B > A:
  c = B
  B = A
  A = c
 
for i in range(1, B+1):
  a = A * i
  if ans != 0:
    break
  if a % B == 0:
    ans = a
    break
print(ans)

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
gcd = 1
for i in range(1, a+1):
    if a % i == b % i == 0:
        gcd *= i
print(int(a * b / gcd))


Failing test case input:
010100 8

Expected output:
20200


Actual output:
10100


Fixed submission (verdict: Accepted):
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
a, b = map(int, input().split())
print(int(a * b / gcd(a, b)))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = map(int, input().split())

memo = 0
i = 1
if A < B:
    A, B = B, A

while memo < 100000:
    memo = A * i
    if memo % B == 0:
        break
    else:
        i += 1
print(memo)

Failing test case input:
110000 87

Expected output:
9570000


Actual output:
110000


Fixed submission (verdict: Accepted):
A, B = map(int, input().split())

memo = 0
if A < B:
    A, B = B, A

for i in range(1, 100000):
    memo = A * i
    if memo % B == 0:
        break
print(memo)
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a, b = i2()
a = min(a,b)
b = max(a,b)
for i in range(1,b+1):
    if a*i%b == 0:
        print(a*i)
        exit()


Failing test case input:
111001 2

Expected output:
222002


Actual output:
2


Fixed submission (verdict: Accepted):
import sys
import math
def i():return int(sys.stdin.readline().replace("\n",""))
def i2():return map(int,sys.stdin.readline().replace("\n","").split())
def s():return str(sys.stdin.readline().replace("\n",""))
def l():return list(sys.stdin.readline().replace("\n",""))
def intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def lx():return list(map(lambda x:int(x)*-1,sys.stdin.readline().replace("\n","").split()))
def t():return tuple(map(int,sys.stdin.readline().replace("\n","").split()))

if __name__ == "__main__":pass
a, b = i2()
c = min(a,b)
d = max(a,b)
for i in range(1,d+1):
    if (c*i)%d == 0:
        print(c*i)
        exit()

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
C=A*B
if A<B :
    A,B=B,A
while A%B!=0:
    A,B=B,A%B 
D=C/B
print(D)
    

Failing test case input:
110010 87

Expected output:
3190290


Actual output:
3190290.0


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
C=A*B
if A<B :
    A,B=B,A
while A%B!=0:
    A,B=B,A%B 
D=C/B
print(int(D))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split())
n,m=N,M
if n<m:
    t=n;n=m;m=t
while n%m:
    t=n%m;n=m;m=t
print(N*M/m)

Failing test case input:
110000 52132

Expected output:
1433630000


Actual output:
1433630000.0


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
n,m=N,M
if n<m:
    t=n;n=m;m=t
while n%m:
    t=n%m;n=m;m=t
print(int(N*M/m))

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
a, b = map(int, input().split())
c = a*b
if b > a:
    b, a = a, b
while True:
    r = a%b
    a = b
    b = r
    if b == 0:
        gcd = a  
        break
print(c/gcd)

Failing test case input:
110010 87

Expected output:
3190290


Actual output:
3190290.0


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
c = a*b
if b > a:
    b, a = a, b
while True:
    r = a%b
    a = b
    b = r
    if b == 0:
        gcd = a  
        break
print(c
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A = list(map(int, input().split())) 
B = A[0]
C = A[1]

BB = []
CB = []

def myfunc(X, XX):
  for num in range(2, X+1):
    if(X%num == 0):
      XX.append(num)
      BA = int(X/num)
      myfunc(BA, XX)
      break

myfunc(B, BB)
myfunc(C, CB)

DB = []

for num1 in BB:
  for num2 in range(len(CB) - 1):
    if num1 == CB[num2]:
      DB.append(num1)
      CB.pop(num2)
      break

BB.extend(CB)

ANSWER = 1

for num in BB:
  ANSWER = num * ANSWER

print(ANSWER)

Failing test case input:
101010 2

Expected output:
101010


Actual output:
202020


Fixed submission (verdict: Accepted):
A = list(map(int, input().split())) 
B = A[0]
C = A[1]

BB = []
CB = []

def myfunc(X, XX):
  for num in range(2, X+1):
    if(X%num == 0):
      XX.append(num)
      BA = int(X/num)
      myfunc(BA, XX)
      break

myfunc(B, BB)
myfunc(C, CB)

for num1 in BB:
  for num2 in range(len(CB)):
    if num1 == CB[num2]:
      CB.pop(num2)
      break

BB.extend(CB)

ANSWER = 1

for num in BB:
  ANSWER = num * ANSWER

print(ANSWER)

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B=list(map(int,input().split()))
if(A>=B):
  num=A
else:
  num=B
i=2
while True:
  ans=num*i
  if(ans%A==0 and ans%B==0):
    print(ans)
    break
  i+=1
  


Failing test case input:
1 13

Expected output:
13


Actual output:
26


Fixed submission (verdict: Accepted):
A,B=list(map(int,input().split()))
if(A>=B):
  num=A
else:
  num=B
i=1
while True:
  ans=num*i
  if(ans%A==0 and ans%B==0):
    print(ans)
    break
  i+=1

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = input().split()
complete = int(a) * int(b);
tmp = complete
for i in range(2, min(int(a), int(b)) + 1):
    tmp = complete / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        complete = tmp
print(int(complete))


Failing test case input:
111000 84

Expected output:
777000


Actual output:
1554000


Fixed submission (verdict: Accepted):
a, b = input().split()
product = int(a) * int(b);
complete = product
tmp = product
for i in range(2, min(int(a), int(b)) + 1):
    tmp = product / i
    if tmp % int(b) == 0 and tmp % int(a) == 0:
        complete = tmp
print(int(complete))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
num = [int(s) for s in input().split()]

com = 1
tes = 2
if max(num)%min(num) == 0:
  print(max(num))
else:
  while tes < min(num)/2:
    if min(num)%tes == 0 and max(num)%tes == 0:
      com *= tes
      num = [int(n/tes) for n in num]
    else:
      tes += 1

print(com*min(num)*max(num))

Failing test case input:
2 54

Expected output:
54


Actual output:
54
108


Fixed submission (verdict: Accepted):
num = [int(s) for s in input().split()]

com = 1
tes = 2
if max(num)%min(num) == 0:
  print(max(num))
else:
  while tes < min(num)/2 +1:
    if min(num)%tes == 0 and max(num)%tes == 0:
      com *= tes
      num = [int(n/tes) for n in num]
    else:
      tes += 1
  print(com*min(num)*max(num))
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

input = sys.stdin.readline

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

for i in range(1, 100000):
    if i % A == 0 and i % B == 0:
        print(i)
        exit()

Failing test case input:
110000 549

Expected output:
60390000


Actual output:

Fixed submission (verdict: Accepted):
import sys

input = sys.stdin.readline

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

for i in range(100000, 0, -1):
    if A % i == 0 and B % i == 0:
        print(A * B 
        exit()

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

p = 2


if A > B:
    for y in range(100000):
        t = (A * p) / B
        o = (A * p)
        if t % 2 == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000):
        t = (B * p) / A
        o = (B * p)
        if t % 2 == 0:
            print(int(o))
            break
        else:
            p += 1

Failing test case input:
011101 8

Expected output:
88808


Actual output:
177616


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())

p = 1


if A > B:
    for y in range(100000000):
        e = (A * p) % B
        o = (A * p)
        if e == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000000):
        e = (B * p) % A
        o = (B * p)
        if  e == 0:
            print(int(o))
            break
        else:
            p += 1

Problem: p02831
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())
for i in range(1,b+1):
  if (a*i)%b==0:
    print(a*i)

Failing test case input:
110100 99999

Expected output:
3669963300


Actual output:
3669963300
7339926600
11009889900


Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
for i in range(1,b+1):
  if (a*i)%b==0:
    print(a*i)
    break

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1


if y%x==0:
    print(y)
else:
    root=round((x**(1/2)))
    for i in range(2,root):
        if x%i==0 and y%i==0:
            x/=i
            y/=i
            check*=i 
       
        i=2
    
        root=round((x**(1/2)))
    print(int(check*x*y))

      

Failing test case input:
50 30

Expected output:
150


Actual output:
750


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1


if y%x==0:
    print(y)

else:
    
    while True:
        through=0
        for i in range(2,int(x)):
            if x%i==0 and y%i==0:
                x/=i
                y/=i
                check*=i 
                through=1
                break
        if through==0:
            break
    print(int(check*x*y))
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
L = N.split()
a = int(L[0])
b = int(L[1])

if a < b:
    c = a
    a = b
    b = a

r = a % b
    
while r != 0:
    a = b
    b = r
    r = a % b



print(int(L[0])*int(L[1])/b)

Failing test case input:
010010 549

Expected output:
5495490


Actual output:
5495490.0


Fixed submission (verdict: Accepted):
N = input()
L = N.split()
a = int(L[0])
b = int(L[1])

if a < b:
    c = a
    a = b
    b = c

r = a % b
    
while r != 0:
    a = b
    b = r
    r = a % b



print(int(int(L[0])*int(L[1])/b))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a,b):
  if a %b == 0:
    return b
  else:
    return gcd(b,a%b)

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

tmp = gcd(max(a,b),min(a,b))

n = a * b * tmp
print(n)


Failing test case input:
010010 77

Expected output:
10010


Actual output:
59349290


Fixed submission (verdict: Accepted):
def gcd(a,b):
  if a %b == 0:
    return b
  else:
    return gcd(b,a%b)

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

tmp = gcd(max(a,b),min(a,b))

n = a * b / tmp
print(int(n))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
S = input().split()
A = int(S[0])
B = int(S[1])
C = 0



for i in range(1,1000000,1):
  if A > B:
  	C = A * i
  else:
    C = B *i
    
  if C % B == 0:
    print(C)
    break

Failing test case input:
110001 118998

Expected output:
4363299666


Actual output:
118998


Fixed submission (verdict: Accepted):
S = input().split()
A = int(S[0])
B = int(S[1])
C = 0
D = 0



for i in range(1,100000,1):
  if A > B:
  	C = A * i
  else:
    C = B *i
  
  if A > B:
  	D = B
  else:
    D = A
    
  if C % D == 0:
    print(C)
    break

Problem: p02831
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=map(int,input().split())
for i in range(2,100001):
    if b*i%a==0:
        print(b*i)
        break

Failing test case input:
110001 52132

Expected output:
5734572132


Actual output:

Fixed submission (verdict: Accepted):
a,b=map(int,input().split())
for i in range(1,a+1):
    if b*i%a==0:
        print(b*i)
        break

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())
m,n=max(a,b),min(a,b)
if m%n==0:
    print(m)
else:
    while m%n!=0:
        m%=n
        m,n=max(m,n),min(m,n)
print(int(a*b/n))

Failing test case input:
2 68

Expected output:
68


Actual output:
68
68


Fixed submission (verdict: Accepted):
a, b = map(int, input().split())
m,n=max(a,b),min(a,b)
if m%n==0:
    print(m)
else:
    while m%n!=0 and n!=1:
        m%=n
        m,n=max(m,n),min(m,n)
    print(int(a*b/n))
Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
p=input().split()
a=int(p[1])
b=int(p[0])
k=a*b
if(a==0 or b==0):
    print(max(a,b))
else:
 i=1
 while i<=min(a,b):
    if(a%i==0 and b%i==0):
        k=k/i
    i+=1
 print(int(k))


    

Failing test case input:
108 124

Expected output:
3348


Actual output:
1674


Fixed submission (verdict: Accepted):
p=input().split()
a=int(p[1])
b=int(p[0])
i=1
while i<=b:
    if(a==0 or b==0):
        print(max(a,b))
        break
    elif((a*i)%b==0):
        print(a*i)
        break
    i+=1

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = list(map(int, input().split()))

large = A if A > B else B
small = A if A < B else B

multi = small

reminder = large % small
while reminder != 0:
    multi = reminder
    reminder = small % reminder

cross = large/multi

print(cross*small)


Failing test case input:
2 43

Expected output:
86


Actual output:
86.0


Fixed submission (verdict: Accepted):
A, B = list(map(int, input().split()))

large = A if A > B else B
small = A if A < B else B

def gcd(large, small):
    r = large % small
    while r != 0:
        large = small
        small = r
        r = large % small
    return small

print(large*small

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

x = a*b
l = a if a<b else b

for i in range(2, l+1):
    if a%i == 0 and b%i == 0:
        x /= i

print(int(x)) 

Failing test case input:
111000 84

Expected output:
777000


Actual output:
5395


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

l = a if a<b else b
x = a*b

for i in range(l, 0, -1):
    if a%i == 0 and b%i == 0:
        print(int(x / i))
        exit()

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
	A,B = map(int, input().split())
	A,B = max(A,B), min(A,B)
	G = gcd(A,B)
	
	
	L=A*B/G
	print(int(L))

def gcd(a,b):
	print(a,b,divmod(a,b))
	if a%b==0:
		return b
	return gcd(b, a%b)


if __name__ == '__main__':
	main()

Failing test case input:
111000 43

Expected output:
4773000


Actual output:
111000 43 (2581, 17)
43 17 (2, 9)
17 9 (1, 8)
9 8 (1, 1)
8 1 (8, 0)
4773000


Fixed submission (verdict: Accepted):
def main():
	A,B = map(int, input().split())
	A,B = max(A,B), min(A,B)
	G = gcd(A,B)
	
	
	L=A*B/G
	print(int(L))

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


if __name__ == '__main__':
	main()
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = map(int,input().split())

p = 2


if A > B:
    for y in range(100000000):
        e = (A * p) % B
        o = (A * p)
        if e == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000000):
        e = (B * p) % A
        o = (B * p)
        if  e == 0:
            print(int(o))
            break
        else:
            p += 1

Failing test case input:
010110 1

Expected output:
10110


Actual output:
20220


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())

p = 1


if A > B:
    for y in range(100000000):
        e = (A * p) % B
        o = (A * p)
        if e == 0:
            print(int(o))
            break
        else:
            p += 1
else:
    for r in range(100000000):
        e = (B * p) % A
        o = (B * p)
        if  e == 0:
            print(int(o))
            break
        else:
            p += 1

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
ints = [ int(i) for i in input().split(" ") ]

maxInt = max(ints)
minInt = min(ints)

count = 1
while True:
  count += 1

  if maxInt * count % minInt == 0:
    print(maxInt * count)
    break

Failing test case input:
2 68

Expected output:
68


Actual output:
136


Fixed submission (verdict: Accepted):
ints = [ int(i) for i in input().split(" ") ]

maxInt = max(ints)
minInt = min(ints)

count = 1
while True: 

  if maxInt * count % minInt == 0:
    print(maxInt * count)
    break
  
  count += 1

Problem: p02831
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b=input().split()
a=int(a)
b=int(b)
c=1
d=0
if a>b:
  for i in range(1,a):
    if a%i==0 and b%i==0:
      a=a/i
      b=b/i
      c=c*i
  print(int(a*b*c))
if a<b:
  for i in range(1,b):
    if a%i==0 and b%i==0:
      a=a/i
      b=b/i
      c=c*i
  print(int(a*b*c))

Failing test case input:
011100 8

Expected output:
22200


Actual output:
44400


Fixed submission (verdict: Accepted):
a,b=input().split()
a=int(a)
b=int(b)
e=a
d=b
c=1
if a>b:
  for i in range(1,e):
    if a%(e-i)==0 and b%(e-i)==0:
      a=a/(e-i)
      b=b/(e-i)
      c=c*(e-i)
  print(int(a*b*c))
if a<b:
  for i in range(1,d):
    if a%(d-i)==0 and b%(d-i)==0:
      a=a/(d-i)
      b=b/(d-i)
      c=c*(d-i)
  print(int(a*b*c))
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b = map(int,input().split())

def coprime_checker(x,y):
    if min(x,y) == 1:
        return 1
    else:
        for i in range(2,min(x,y) + 1):
            if x % i == 0 and y % i == 0:
                return i
                break
        return 1

gcd = 1
x = a
y = b
while coprime_checker(int(x),int(y)) != 1:
    gcd *= coprime_checker(int(x),int(y))
    x /= coprime_checker(int(x),int(y))
    y /= coprime_checker(int(x),int(y))
least_common_multiple  = (a*b) / gcd
print(int(least_common_multiple))


Failing test case input:
010010 77

Expected output:
10010


Actual output:
110110


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

def coprime_checker(x,y):
    if min(x,y) == 1:
        return 1
    else:
        for i in range(2,min(x,y) + 1):
            if x % i == 0 and y % i == 0:
                return i
                break
        return 1

gcd = 1
x = a
y = b
while coprime_checker(int(x),int(y)) != 1:
    c = coprime_checker(int(x),int(y))
    gcd *= c
    x /= c
    y /= c
least_common_multiple  = (a*b) / gcd
print(int(least_common_multiple))

Problem: p02831
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from math import gcd
a, b = map(int,input().split())

print(a * b / gcd(a, b))

Failing test case input:
110000 549

Expected output:
60390000


Actual output:
60390000.0


Fixed submission (verdict: Accepted):
from math import gcd
a, b = map(int,input().split())
 
print(int(a * b / gcd(a, b)))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def yukurid(a,b):
    if a>b:
        a,b = b,a
    while b%a != 0:
        a,b = b%a,a
    return int(a)

A,B = map(int, input().split())
x = yukurid(A,B)
print(A*B/x)



Failing test case input:
000011 4

Expected output:
44


Actual output:
44.0


Fixed submission (verdict: Accepted):
def yukurid(a,b):
    if a>b:
        a,b = b,a
    while b%a != 0:
        a,b = b%a,a
    return int(a)

A,B = map(int, input().split())
x = yukurid(A,B)
print(int(A*B/x))

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j


res = A * B / k
print(int(res))


Failing test case input:
108 124

Expected output:
3348


Actual output:
13392


Fixed submission (verdict: Accepted):
import sys
a, b = input().split()

A = int(a)
B = int(b)

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
        break


if k == 0:
    k = 1


res = A * B / k

print(int(res))
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B=map(int,input().split())
N=min(A,B)
i=0

for i in range(N+1,1,-1):
  if A%i==0 and B%i==0:
    print(round(A*B/i))
    break
  else:
    print(round(A*B))
    break



Failing test case input:
2 68

Expected output:
68


Actual output:
136


Fixed submission (verdict: Accepted):
A,B=map(int,input().split())
N=min(A,B)
i=X=0

for i in range(N+1,1,-1):
  if A%i==0 and B%i==0:
    X=round(A*B/i)
    break
  else:
    X=round(A*B)

print(X)

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
A, B = map(int, input().split())
for i in range(1, B):
    if A*i % B == 0:
        print(A*i)
        break


Failing test case input:
123 361

Expected output:
44403


Actual output:

Fixed submission (verdict: Accepted):
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
A, B = map(int, input().split())
for i in range(1, B+1):
    if A*i % B == 0:
        print(A*i)
        break

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B = list(map(int, input().split()))

large = A if A > B else B
small = A if A < B else B

multi = small

reminder = large % small
while reminder != 0:
    multi = reminder
    reminder = small % reminder

cross = large/multi

print(int(cross*small))


Failing test case input:
110000 121574

Expected output:
6686570000


Actual output:
75983750


Fixed submission (verdict: Accepted):
A, B = list(map(int, input().split()))

large = A if A > B else B
small = A if A < B else B

def gcd(large, small):
    r = large % small
    while r != 0:
        large = small
        small = r
        r = large % small
    return small

print(large*small
Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def gcd(a, b):
  if a <= b:
    a, b = b, a
  while a % b:
  	a, b = b, a % b
  return a

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

A, B = map(int, input().split())
print(lcm(A, B))

Failing test case input:
101000 43

Expected output:
4343000


Actual output:
620428


Fixed submission (verdict: Accepted):
def gcd(a, b):
  if a <= b:
    a, b = b, a
  while a % b:
  	a, b = b, a % b
  return b

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

A, B = map(int, input().split())
print(lcm(A, B))

Problem: p02831
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A,B = map(int,input().split())

flg = True

while flg:
  M = min(A,B)
  flg = False
  for m in range(M,1,-1):
    if A%m==0 and B%m==0:
      B=int(B/m)
      flg = True
      break
      
print(A*B)




Failing test case input:
15 306

Expected output:
1530


Actual output:
510


Fixed submission (verdict: Accepted):
A,B = map(int,input().split())

flg = True

C=1
while flg:
  M = min(A,B)
  flg = False
  for m in range(M,1,-1):
    if A%m==0 and B%m==0:
      B=int(B/m)
      A=int(A/m)
      C=C*m
      flg = True
      break
      
print(A*B*C)

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

x = a*b
l = a if a<b else b

for i in range(l, 1, -1):
    if a%i == 0 and b%i == 0:
        x /= i

print(int(x)) 

Failing test case input:
108 124

Expected output:
3348


Actual output:
1674


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

l = a if a<b else b
x = a*b

for i in range(l, 0, -1):
    if a%i == 0 and b%i == 0:
        print(int(x / i))
        exit()

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B = input().split()
A=int(A)
B =int(B)
if A<B:
  for i in range(1,B+1):
    if A*i%B ==0:
      print(A*i)
else:
  for i in range(1,A+1):
    if B*i%A ==0:
      print(B*i)

Failing test case input:
50 306

Expected output:
7650


Actual output:
7650
15300


Fixed submission (verdict: Accepted):
A,B = input().split()
A=int(A)
B =int(B)
if A<B:
  for i in range(1,B+1):
    if A*i%B ==0:
      print(A*i)
      break
else:
  for i in range(1,A+1):
    if B*i%A ==0:
      print(B*i)
      break

Problem: p02831
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b = map(int, input().split())

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

print(large_num/div_result*small_num)

Failing test case input:
110001 118998

Expected output:
4363299666


Actual output:
4363299666.0


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

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

result = int(large_num/div_result*small_num)
print(result)