Problem:


Score : 300 points

Problem Statement

Takahashi is organizing a party.

At the party, each guest will receive one or more snack pieces.

Takahashi predicts that the number of guests at this party will be A or B.

Find the minimum number of pieces that can be evenly distributed to the guests in both of the cases predicted.

We assume that a piece cannot be divided and distributed to multiple guests.

Constraints

1 \leq A, B \leq 10^5

A \neq B

All values in input are integers.

Input

Input is given from Standard Input in the following format:

A B

Output

Print the minimum number of pieces that can be evenly distributed to the guests in both of the cases with A guests and B guests.

Sample Input 1

2 3

Sample Output 1

6

When we have six snack pieces, each guest can take three pieces if we have two guests, and each guest can take two if we have three guests.

Sample Input 2

123 456

Sample Output 2

18696

Sample Input 3

100000 99999

Sample Output 3

9999900000



Sample input:
2 3


Sample output:
6

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
numberA = 0
numberB = 0
dataA = []
dataB = []
sosuA = []
sosuB = []
flagA = []
flagB = []
i = 1
boc = 0
while i <= A:
    dataA += [i]
    i += 1
i = 1
while i <= B:
    dataB += [i]
    i += 1
n = 1
while n <= A:
    if A == 1:
        sosuA += [n]
        numberA += 1
        break
    if A % n == 0:
        sosuA += [n]
        A = A / n
        numberA += 1
        if n == 1:
            n += 1
    else:
        n += 1
n = 1
while n <= B:
    if B == 1:
        sosuB += [n]
        numberB += 1
        break
    if B % n == 0:
        sosuB += [n]
        B = B / n
        numberB += 1
        if n == 1:
            n += 1
    else:
        n += 1
i = 0
n = 0
rase = 0
while i <= numberA - 1:
    if i != 0 and sosuA[i] == sosuA[i - 1]:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
        continue
    if sosuA[i] == sosuB[n]:
        kai = sosuA[i]
        flagA += [kai]
        n += 1
        rase = 1
        boc = n
        if n == numberB - 1 or numberB:
            i += 1
            n = 0
            rase = 0
            continue
        if i == numberA - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuA[i] != sosuB[n] and n == numberB - 1:
        kai = sosuA[i]
        flagA += [kai]
        if i == numberA - 1:
            break
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
rase = 0
while i <= numberB - 1:
    if i != 0 and sosuB[i] == sosuB[i - 1]:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
        continue
    if sosuB[i] == sosuA[n]:
        kai = sosuB[i]
        flagB += [kai]
        n += 1
        rase = 1
        if n == numberA - 1 or numberA:
            i += 1
            n = 0
            rase = 0
            continue
        if i == numberB - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuB[i] != sosuA[n] and n == numberA - 1:
        kai = sosuB[i]
        flagB += [kai]
        if i == numberB - 1:
            break
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
tuika = []
if len(flagA) >= len(flagB):
    while i <= numberB - 1:
        if sosuB[i] == flagA[n]:
            n += 1
            i += 1
            if n == len(flagA):
                sai = len(sosuB) - i
                for m in range(sai - 1):
                    tuika += [sosuB[i]]
                    i += 1
                break
        elif n == numberA - 1:
            kai = sosuB[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuB[i] < sosuA[n]:
            kai = sosuB[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagA += tuika
    ans = 1
    for i in flagA:
        ans = ans * i
    print(ans)
else:
    while i <= numberA - 1:
        if sosuA[i] == flagB[n]:
            n += 1
            i += 1
        if n == len(flagB):
                sai = len(sosuA) - i
                for m in range(sai - 1):
                    tuika += [sosuA[i]]
                    i += 1
                break
        elif n == numberB - 1:
            kai = sosuA[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuA[i] < sosuB[n]:
            kai = sosuA[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagB += tuika
    ans = 1
    for i in flagB:
        ans = ans * i
    print(ans)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
numberA = 0
numberB = 0
dataA = []
dataB = []
sosuA = []
sosuB = []
flagA = []
flagB = []
i = 1
boc = 0
while i <= A:
    dataA += [i]
    i += 1
i = 1
while i <= B:
    dataB += [i]
    i += 1
n = 1
while n <= A:
    if A == 1:
        sosuA += [n]
        numberA += 1
        break
    if A % n == 0:
        sosuA += [n]
        A = A / n
        numberA += 1
        if n == 1:
            n += 1
    else:
        n += 1
n = 1
while n <= B:
    if B == 1:
        sosuB += [n]
        numberB += 1
        break
    if B % n == 0:
        sosuB += [n]
        B = B / n
        numberB += 1
        if n == 1:
            n += 1
    else:
        n += 1
i = 0
n = 0
rase = 0
while i <= numberA - 1:
    if i != 0 and sosuA[i] == sosuA[i - 1]:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
        continue
    if sosuA[i] == sosuB[n]:
        kai = sosuA[i]
        flagA += [kai]
        n += 1
        rase = 1
        boc = n
        if n == numberB - 1 or numberB:
            i += 1
            n = 0
            rase = 0
            continue
        if i == numberA - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuA[i] != sosuB[n] and n == numberB - 1:
        kai = sosuA[i]
        flagA += [kai]
        if i == numberA - 1:
            break
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
rase = 0
while i <= numberB - 1:
    if i != 0 and sosuB[i] == sosuB[i - 1]:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
        continue
    if sosuB[i] == sosuA[n]:
        kai = sosuB[i]
        flagB += [kai]
        n += 1
        rase = 1
        if n == numberA - 1 or numberA:
            i += 1
            n = 0
            rase = 0
            continue
        if i == numberB - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuB[i] != sosuA[n] and n == numberA - 1:
        kai = sosuB[i]
        flagB += [kai]
        if i == numberB - 1:
            break
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
tuika = []
if len(flagA) >= len(flagB):
    while i <= numberB - 1:
        if sosuB[i] == flagA[n]:
            n += 1
            i += 1
        elif n == numberA - 1:
            kai = sosuB[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuB[i] < sosuA[n]:
            kai = sosuB[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagA += tuika
    ans = 1
    for i in flagA:
        ans = ans * i
    print(ans)
else:
    while i <= numberA - 1:
        if sosuA[i] == flagB[n]:
            n += 1
            i += 1
        elif n == numberB - 1:
            kai = sosuA[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuA[i] < sosuB[n]:
            kai = sosuA[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagB += tuika
    ans = 1
    for i in flagB:
        ans = ans * i
    print(ans)

Submission status: Runtime Error

Solution code:
from fractions import gcd
A,B=map(int,input().split())
def lcd(x,y)
  return (x * y) // gcd(x, y)
print(lcd(A,B))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
numberA = 0
numberB = 0
dataA = []
dataB = []
sosuA = []
sosuB = []
flagA = []
flagB = []
i = 1
boc = 0
while i <= A:
    dataA += [i]
    i += 1
i = 1
while i <= B:
    dataB += [i]
    i += 1
n = 2
while n <= A:
    if A % n == 0:
        sosuA += [n]
        A = A / n
        numberA += 1
    else:
        n += 1
n = 2
while n <= B:
    if B % n == 0:
        sosuB += [n]
        B = B / n
        numberB += 1
    else:
        n += 1
i = 0
n = 0
rase = 0
while i <= numberA - 1:
    if i != 0 and sosuA[i] == sosuA[i - 1]:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
        continue
    if sosuA[i] == sosuB[n]:
        kai = sosuA[i]
        flagA += [kai]
        n += 1
        rase = 1
        boc = n
        if n == numberB - 1:
            i += 1
            n = 0
            continue
        if i == numberA - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuA[i] != sosuB[n] and n == numberB - 1:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
while i <= numberB - 1:
    if i != 0 and sosuB[i] == sosuB[i - 1]:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
        continue
    if sosuB[i] == sosuA[n]:
        kai = sosuB[i]
        flagB += [kai]
        n += 1
        rase = 1
        boc = n
        if n == numberA - 1:
            i += 1
            n = 0
            continue
        if i == numberB - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuB[i] != sosuA[n] and n == numberA - 1:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
tuika = []
if len(flagA) >= len(flagB):
    while i <= numberB - 1:
        if sosuB[i] == flagA[n]:
            n += 1
            i += 1
        elif n == numberA - 1:
            kai = sosuB[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuB[i] < sosuA[n]:
            kai = sosuB[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagA += tuika
    ans = 1
    for i in flagA:
        ans = ans * i
    print(ans)
else:
    while i <= numberA - 1:
        if sosuA[i] == flagB[n]:
            n += 1
            i += 1
        elif n == numberB - 1:
            kai = sosuA[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuA[i] < sosuB[n]:
            kai = sosuA[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagB += tuika
    ans = 1
    for i in flagB:
        ans = ans * i
    print(ans)

Submission status: Runtime Error

Solution code:
A,B = map(int, input().split())
numberA = 0
numberB = 0
dataA = []
dataB = []
sosuA = []
sosuB = []
flagA = []
flagB = []
i = 1
boc = 0
while i <= A:
    dataA += [i]
    i += 1
i = 1
while i <= B:
    dataB += [i]
    i += 1
n = 2
while n <= A:
    if A % n == 0:
        sosuA += [n]
        A = A / n
        numberA += 1
    else:
        n += 1
n = 2
while n <= B:
    if B % n == 0:
        sosuB += [n]
        B = B / n
        numberB += 1
    else:
        n += 1
i = 0
n = 0
rase = 0
while i <= numberA - 1:
    if i != 0 and sosuA[i] == sosuA[i - 1]:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
        continue
    if sosuA[i] == sosuB[n]:
        kai = sosuA[i]
        flagA += [kai]
        n += 1
        rase = 1
        boc = n
        if n == numberB - 1:
            i += 1
            n = 0
            continue
        if i == numberA - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuA[i] != sosuB[n] and n == numberB - 1:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
while i <= numberB - 1:
    if i != 0 and sosuB[i] == sosuB[i - 1]:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
        continue
    if sosuB[i] == sosuA[n]:
        kai = sosuB[i]
        flagB += [kai]
        n += 1
        rase = 1
        boc = n
        if n == numberA - 1:
            i += 1
            n = 0
            continue
        if i == numberB - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuB[i] != sosuA[n] and n == numberA - 1:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
tuika = []
if len(flagA) >= len(flagB):
    while i <= numberB - 1:
        if sosuB[i] == flagA[n]:
            n += 1
            i += 1
        elif n == numberA - 1:
            kai = sosuB[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuB[i] < sosuA[n]:
            kai = sosuB[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagA += tuika
    ans = 1
    for i in flagA:
        ans = ans * i
    print(ans)
else:
    while i <= numberA - 1:
        if sosuA[i] == flagB[n]:
            n += 1
            i += 1
        elif n == numberB - 1:
            kai = sosuA[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuA[i] < sosuB[n]:
            kai = sosuA[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagB += tuika
    ans = 1
    for i in flagB:
        ans = ans * i
    print(ans)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
numberA = 0
numberB = 0
dataA = []
dataB = []
sosuA = []
sosuB = []
flagA = []
flagB = []
i = 1
boc = 0
while i <= A:
    dataA += [i]
    i += 1
i = 1
while i <= B:
    dataB += [i]
    i += 1
n = 2
while n <= A:
    if A % n == 0:
        sosuA += [n]
        A = A / n
        numberA += 1
    else:
        n += 1
n = 2
while n <= B:
    if B % n == 0:
        sosuB += [n]
        B = B / n
        numberB += 1
    else:
        n += 1

i = 0
n = 0
rase = 0
while i <= numberA - 1:
    if i != 0 and sosuA[i] == sosuA[i - 1]:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
        continue
    if sosuA[i] == sosuB[n]:
        kai = sosuA[i]
        flagA += [kai]
        n += 1
        rase = 1
        boc = n
        if i == numberA - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuA[i] != sosuB[n] and n == numberB - 1:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
while i <= numberB - 1:
    if i != 0 and sosuB[i] == sosuB[i - 1]:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
        continue
    if sosuB[i] == sosuA[n]:
        kai = sosuB[i]
        flagB += [kai]
        n += 1
        rase = 1
        boc = n
        if i == numberB - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuB[i] != sosuA[n] and n == numberA - 1:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
    else:
        n += 1
i = 0
n = 0
tuika = []
if len(flagA) >= len(flagB):
    while i <= numberB - 1:
        if sosuB[i] == flagA[n]:
            n += 1
            i += 1
        elif n == numberA - 1:
            kai = sosuB[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuB[i] < sosuA[n]:
            kai = sosuB[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagA += tuika
    ans = 1
    for i in flagA:
        ans = ans * i
    print(ans)
else:
    while i <= numberA - 1:
        if sosuA[i] == flagB[n]:
            n += 1
            i += 1
        elif n == numberB - 1:
            kai = sosuA[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuA[i] < sosuB[n]:
            kai = sosuA[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagB += tuika
    ans = 1
    for i in flagB:
        ans = ans * i
    print(ans)

Submission status: Runtime Error

Solution code:
str = list(map(int, input().split()))
A = str[0]
B = str[1]
numberA = 0
numberB = 0
dataA = []
dataB = []
sosuA = []
sosuB = []
flagA = []
flagB = []
i = 1
boc = 0
while i <= A:
    dataA += [i]
    i += 1
i = 1
while i <= B:
    dataB += [i]
    i += 1
n = 2
while n <= A:
    if A % n == 0:
        sosuA += [n]
        A = A / n
        numberA += 1
    else:
        n += 1
print(sosuA)
n = 2
while n <= B:
    if B % n == 0:
        sosuB += [n]
        B = B / n
        numberB += 1
    else:
        n += 1
print(sosuB)

i = 0
n = 0
rase = 0
while i <= numberA - 1:
    if i != 0 and sosuA[i] == sosuB[boc]:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
        continue
    if sosuA[i] == sosuB[n]:
        kai = sosuA[i]
        flagA += [kai]
        n += 1
        rase = 1
        boc = n
        if i == numberA - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuA[i] != sosuB[n] and n == numberB - 1:
        kai = sosuA[i]
        flagA += [kai]
        i += 1
        n = 0
    else:
        n += 1
print(flagA)
i = 0
n = 0
while i <= numberB - 1:
    if i != 0 and sosuB[i] == sosuA[boc]:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
        continue
    if sosuB[i] == sosuA[n]:
        kai = sosuB[i]
        flagB += [kai]
        n += 1
        rase = 1
        boc = n
        if i == numberB - 1:
            break
    elif rase == 1:
        i += 1
        n = 0
        rase = 0
    elif sosuB[i] != sosuA[n] and n == numberA - 1:
        kai = sosuB[i]
        flagB += [kai]
        i += 1
        n = 0
    else:
        n += 1
print(flagB)
i = 0
n = 0
tuika = []
if len(flagA) >= len(flagB):
    while i <= numberB - 1:
        if sosuB[i] == flagA[n]:
            n += 1
            i += 1
        elif n == numberA - 1:
            kai = sosuB[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuB[i] < sosuA[n]:
            kai = sosuB[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagA += tuika
    ans = 1
    for i in flagA:
        ans = ans * i
    print(ans)
else:
    while i <= numberA - 1:
        if sosuA[i] == flagB[n]:
            n += 1
            i += 1
        elif n == numberB - 1:
            kai = sosuA[i]
            tuika += [kai]
            i += 1
            n = 0
        elif sosuA[i] < sosuB[n]:
            kai = sosuA[i]
            tuika += [kai]
            n = 0
            i += 1
        else:
            n += 1
    flagB += tuika
    ans = 1
    for i in flagB:
        ans = ans * i
    print(ans)

Submission status: Runtime Error

Solution code:
import math
a,b = map(int,input().split())

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

Submission status: Runtime Error

Solution code:
import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y

def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math
a,b = list(map(int, input().split()))

def gcd( x, y ):
    while y != 0:
        x, y = y, x%y

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math
a,b = list(map(int, input().split()))

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
c=int(a*b//math.gcd(a,b))
print(c)

Submission status: Runtime Error

Solution code:
import math
a,b=map(int,input().split())
c=a*b//math.gcd(a,b)
print(c)

Submission status: Runtime Error

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    a, b = LI()
    gcd = math.gcd(a, b)
    print(a*b//gcd)
        

main()

Submission status: Runtime Error

Solution code:
import math
a, b = map(int, input().split())

print(int(a * b / math.gcd(a, b)))

Submission status: Runtime Error

Solution code:
from fractions import gcd
 
c,d = [int(i) for i in readline().split()]
 
print(c*d//gcd(c,d))

Submission status: Runtime Error

Solution code:
def gcd(x,y):
   tmp = x
    x = x if x >= y else y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)
    
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // gcd(x, y)
print(lcm(A,B))

Submission status: Runtime Error

Solution code:
def gcd(x,y):
   tmp = x
    x = x if x >= y else x=y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)
    
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(A,B))

Submission status: Runtime Error

Solution code:
def gcd(x,y):
   tmp = x
    x = x if x >= y else y
    if tmp != x:
        y = tmp
    if y == 0:
        return x
    return gcd(x%y, y)
    
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(A,B))

Submission status: Runtime Error

Solution code:
import math
A,B =  [int(x) for x in input().split(" ")]
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(A,B))

Submission status: Runtime Error

Solution code:
import math
a, b = list(map(int,input().split()))
g = math.gcd(a, b)
print(a * b // g)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
import math
print(math.gcd(a, b))

Submission status: Runtime Error

Solution code:
import math as ma


def lcm(x, y):
    return (x * y) // ma.gcd(x, y)


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

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math as ma

def lcm(x, y):
    return (x * y) // ma.gcd(x, y)

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

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math

a,b = [int(i) for i in input().split()]

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

Submission status: Runtime Error

Solution code:
import math
a,b = input().split()
a,b = int(a), int(b)
gcd = int(math.gcd(a,b))
glm = a * b /gcd
print(round(glm))

Submission status: Runtime Error

Solution code:
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
a,b =map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

def lcm(x, y):
    return (x * y) // math.gcd(x, y)


def main():
    a,b = mi()

    print(lcm(a, b))

    
main()

Submission status: Runtime Error

Solution code:
from sys import stdin
import math


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

A, B= [int(x) for x in stdin.readline().rstrip().split()]



print(lcm(A,B))

Submission status: Runtime Error

Solution code:
#abc148c
import math

a,b=map(int,input().split())
print((a*b)//math.gcd(a,b))

Submission status: Runtime Error

Solution code:

import math

(A,B) = map(int,input().split(" "))
ans = (A * B) // math.gcd(A, B)
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

if __name__ == "__main__":
    x,y = [int(x) for x in input().split()]
    print(np.lcm(x,y))

Submission status: Runtime Error

Solution code:
#最小公倍数を求める
import math

(A,B) = map(int,input().split(" "))
ans = (A * B) // math.gcd(A, B)
print(ans)

Submission status: Runtime Error

Solution code:
import math

if __name__ == "__main__":
    x,y = [int(x) for x in input().split()]
    print(x*y // math.gcd(x, y))

Submission status: Runtime Error

Solution code:
#最小公倍数を求める
import math

def lcm(x, y):
    return (x * y) // math.gcd(x, y)
    
(A,B) = input().split(" ")

print(lcm(int(A),int(B)))

Submission status: Runtime Error

Solution code:
import math

a, b = map(int, input().split())
print(a*b//math.gcd(a,b))

Submission status: Runtime Error

Solution code:
import math
A, B = map(int, input().split())

def func(a, b):
#     print(a, b)
    if a < b:
        return func(b, a)
    elif a > b:
        return func(b, a-b)
    else:
        return a
      
# print(func(4, 6))
print(A*B//func(A,B))

Submission status: Runtime Error

Solution code:
import math
A, B = map(int, input().split())

print(A*B//math.gcd(A,B))

Submission status: Runtime Error

Solution code:
import math
#x=int(input())
a,b=map(int,input().split())
c=math.gcd(a,b)
print((a*b)//c)

Submission status: Runtime Error

Solution code:
import math
#x=int(input())
a,b=map(int,input().split())
c=math.gcd(a,b)
print((a*b)/c)

Submission status: Runtime Error

Solution code:
a,b =list(map(int,input().split()))
import math
print(a*b//math.gcd(a,b))

Submission status: Runtime Error

Solution code:
import fractions
a,b = map(int,input().split())
print(a*b//gcd(a,b))

Submission status: Runtime Error

Solution code:
A,B = input().split()

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
li = []
for i in range(1, 10**5+1):
  if a%i=0 and b%i=0:
    li.append(i)
print((a*b)/li[-1])

Submission status: Runtime Error

Solution code:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**6)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

a,b = MAP()

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import fractions
n1,n2=(int(x) for x in input().split())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if n1 > n2:
  ans = max(prime_factorize(n2)) * n1
else:
  ans = max(prime_factorize(n1)) * n2
print(ans)

Submission status: Runtime Error

Solution code:
import math

def solve():
    a, b = map(int, input().split())
    ans = a * b / math.gcd(a, b)
    print(int(ans))

if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import math
a,b = map(int,input().split())

ans = a * b // math.gcd(a,b)
print(ans)

Submission status: Runtime Error

Solution code:
import math as m
from array import *
import sys
import datetime
import calendar

a=input()
b=a.split(" ")
c=int(b[0])
d=int(b[1])
t=m.gcd(c,d)
print(int((c*d)/t))

Submission status: Runtime Error

Solution code:
import math as m
from array import *
import sys
import datetime
import calendar

a=input()
b=a.split(" ")

t=m.gcd(int(b[0]),int(b[1]));
print(int((int(b[0])*int(b[1]))/t))

Submission status: Runtime Error

Solution code:
import math as m
from array import *
import sys
import datetime
import calendar

a=input()
b=a.split(" ")

t=m.gcd(int(b[0]),int(b[1]));
print((int(b[0])*int(b[1]))/t)

Submission status: Runtime Error

Solution code:
import math as m
from array import *
import sys
import datetime
import calendar

a=(input())
b=(a.split(" "))

t=m.gcd(int(b[0]),int(b[1]));
print((int(b[0])*int(b[1]))/t)

Submission status: Runtime Error

Solution code:
import math

a, b = map(int, input().split())
c = math.gcd(a, b)
print(a*b//c)

Submission status: Runtime Error

Solution code:
import math
a,b = int(input().split())
print(abs(a*b) // math.gcd(a, b))

Submission status: Runtime Error

Solution code:
import math
a,b = input().split()
print(abs(a*b)/math.gcd(a, b))

Submission status: Runtime Error

Solution code:
import math
a,b=map(int, input().split())
print((a*b)//math.gcd(a,b))

Submission status: Runtime Error

Solution code:
import math
a,b = input().split()
print(abs(a*b) // math.gcd(a, b))

Submission status: Runtime Error

Solution code:
from math import gcd
a, b = map(int, input().split())
g = gcd(a, b)
print(a * b // g)

Submission status: Runtime Error

Solution code:
import math
a = list(map(int, input().split()))
print(a[0]*a[1] // math.gcd(a[0], a[1]))

Submission status: Runtime Error

Solution code:
import math
a = list(map(int, input().split()))
print(str(int(a[0]*a[1] / math.gcd(a[0], a[1]))))

Submission status: Runtime Error

Solution code:
import math
a = list(map(int, input().split()))
print(int(a[0]*a[1] / math.gcd(a[0], a[1])))

Submission status: Runtime Error

Solution code:
a = list(map(int, input().split()))
def lcm(x, y):

print(lcm(a[0], a[1]))

Submission status: Runtime Error

Solution code:
A,B = int(input().split(' '))
def lcm(x, y):
    return (x * y)
print(lcm(A, B))

Submission status: Runtime Error

Solution code:
#c
a, b = map(int ,input().split())
from math import *
print(a*b//math.gcd(a, b))

Submission status: Runtime Error

Solution code:
#c
a, b = map(int ,input().split())
import math
print(a*b//math.gcd(a, b))

Submission status: Runtime Error

Solution code:
#c
a, b = map(int ,input().split())
from math import gcd
print(a*b//gcd(a, b))

Submission status: Runtime Error

Solution code:
import math

A, B = [int(i) for i in input().split()]

result = (A * B) // math.gcd(A, B)
print(result)

Submission status: Runtime Error

Solution code:
import math


a,b=map(int,input().split())
print((a*b)//math.gcd(a,b))

Submission status: Runtime Error

Solution code:

a, b = map(int, input().split())
  
def sosu(num):
	num2 = num;
	list = [];
	i = 2;
	while i <= num:
		if num2%i is 0:
			list.append(i)
			num2 = num2 // i
			if num2 is 1:
				return list
		else:
			i += 1

yaku_a = sosu(a)
yaku_b = sosu(b)

for i in range(len(yaku_a)):
	if yaku_a[i] in yaku_b:
		yaku_b.remove(yaku_a[i])

marged = yaku_a + yaku_b

candy = 1;
for i in range(len(marged)):
	candy = candy * marged[i];
    
print(candy)

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())

if A % B == 0 :
  if A > B :
    print(B)
  else:
    print(A)

    exit()

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

a, b = list(set(prime_factorize(A))), prime_factorize(B)

X = []
for i in range(0,len(a)):
  for j in range(0,len(b)):
    if a[i] == b[j] :
      X.append(b[j])

y=list(set(a)^set(b))
X.append(y[0])

ans = 1
for i in range(0,len(X)):
  ans = ans * X[i]
  
print(ans)