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:
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

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

a, b = map(int, input().split())
print(lcm(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 = map(int, input().split())

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

print(ans)

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
ansl = []
for i in range(1,min(a,b)//2+1):
  if a%i == 0 and b%i == 0:
    ansl.append(i)
print(int(a*b/max(ansl)))

Submission status: Runtime Error

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

import math
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 sys
import math
input = sys.stdin.readline


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


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

Submission status: Runtime Error

Solution code:
import sys
import math
input = sys.stdin.readline

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)
result = 0
for i in range(2, max(A, B)):
    if i%A == 0 and i%B == 0:
        result = i
        break

print(result)

Submission status: Runtime Error

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

print(round(a*b/g))

Submission status: Runtime Error

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

print(round(a*b/g))

Submission status: Runtime Error

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

print(round(a*b/g))

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
from fractions import lcm

def solve():
    a, b = list(map(int, input().split()))
    print(lcm(a, b))

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

Solution code:
import math
def lcm(a, b):
    return a * b // math.gcd(a, b)

def solve():
    a, b = list(map(int, input().split()))
    print(lcm(a, b))

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = map(int, input().split())
print(a * b // 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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

Submission status: Runtime Error

Solution code:
import math
def lcm(x, y):
    return (x * y) // math.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(" ")]

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(input().split())
print(a * b / gcd(a, b))

Submission status: Runtime Error

Solution code:
import math

A, B = list(map(lambda x: int(x), input().split()))

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

Submission status: Runtime Error

Solution code:
import math

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

A, B = list(map(lambda x: int(x), input().split()))

print(lcm(A, B))

Submission status: Runtime Error

Solution code:
import math

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

A, B = list(map(lambda x: int(x), input().split()))

print(lcm(A, B))

Submission status: Runtime Error

Solution code:
import math
from functools import reduce

number = input().split(" ")
A = int(number[0])
B = int(number[1])

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

print(lcm(A, B))

Submission status: Runtime Error

Solution code:
import math

number = input().split(" ")
A = int(number[0])
B = int(number[1])

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())

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())
print(A * B // math.gcd(A, B))

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
x=min(A,B)
y=max(A,B)
check=1
##x<=y
#####while break##############
if y%x==0:
    print(y)
root=round((x**(1/2)))
#print(root)
else:
    for i in range(2,root):
        if x%i==0 and y%i==0:
            x/=i
            y/=i
            check*=i 
       # print(check)
        i=2
    #print(x,y)
        root=round((x**(1/2)))
    print(int(check*x*y))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math  
a,b=map(int,input().split())  
print(a*b//fractions.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=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()) 
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 sys
A,B=map(int,input().split())
if A<B:
  A,B=B,A
if B%A==0:
  print(A)
  sys.exit()
L=[]
for i in range(A/2):
  if A%i==0 and B%i==0:
    L.append(i)
print((a*b)/L[-1])

Submission status: Runtime Error

Solution code:
import math


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


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

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
from math import gcd


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


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

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import collections
from functools import reduce
from operator import mul

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

def prime_factorization(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
    
def my_index(l, x, default=-1):
    if x in l:
        return l.index(x)
    else:
        return default

prime_a = collections.Counter(prime_factorization(a))
prime_b = collections.Counter(prime_factorization(b))

a_keys = list(prime_a.keys())
b_keys = list(prime_b.keys())

ans = []
for a_key in a_keys:
    suffix = my_index(b_keys, a_key)
    if suffix != -1:
        if a_keys[suffix] > b_keys[suffix]:
            ans.append(a_key ** prime_a[a_key])
        else:
            ans.append(a_key ** prime_b[suffix])
    else:
        ans.append(a_key ** prime_a[a_key])

for b_key in b_keys:
    suffix = my_index(a_keys, b_key)
    if suffix == -1: ans.append(b_key ** prime_b[b_key])

print(reduce(mul, ans))

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())
c = int(a-b)
if c > 0:
  c=c
  d=int(b)
else:
  c=-c
  d=int(a)

if c = 0:
  print(c)
  
else:
e = int(0)
while d % c <>0:
    e=d % c
    d=c
    c=e

e=a*b/c    
print(e)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
c = int(a-b)
if c > 0:
  c=c
  d=int(b)
else:
  c=-c
  d=int(a)

e = 0
while d % c <>0:
    e=d%c
    d=c
    c=e
    
print(a*b/c)

Submission status: Runtime Error

Solution code:
import fractions as gcd

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

result=int(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:
#!/usr/bin/env python3
import numpy as np
import sys


def solve(A: int, B: int):
    print(np.lcm(A, B))

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import math
import sys

def solve(A: int, B: int):
    lcm = (A * B) // math.gcd(A, B)
    print(lcm)


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

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:
import math
def lcm(a,b):
    return (a*b) // math.gcd(a,b)

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

Submission status: Runtime Error

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *

a,b = list(map(int, stdin.readline().rstrip().split()))
print(0)

Submission status: Runtime Error

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(a,b):
	g = gcd(a,b)
	return a*b//g

a,b = list(map(int, stdin.readline().rstrip().split()))
ans = solve(a,b)
print(ans)

Submission status: Runtime Error

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *

'''

'''

def solve(a,b):
	g = gcd(a,b)
	return a*b//g

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

Submission status: Runtime Error

Solution code:
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from sys import stdin
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''

'''

def solve(a,b):
	g = gcd(a,b)
	return a*b//g

a,b = map(int, stdin.readline().rstrip().split())
ans = solve(a,b)
print(ans)

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:
import math
def lcm(A, B):
    return (A * B) // math.gcd(A, B)

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

Submission status: Runtime Error

Solution code:
import math
def lcm(A, B):
    return (A * B) // math.gcd(A, B)

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

Submission status: Runtime Error

Solution code:
# from fractions import gcd
# mod = 10 ** 9 + 7
# N = int(input())
# a = list(map(int,input().split()))
# a,b,c = map(int,input().split())
# ans = [0] * N
# math.ceilで切り上げ
# dp = [[0] * 4 for i in range(3)] #2次元配列初期化
# dp = [[[0] * 2 for i in range(3)] for j in range(5)]
# (ord('A'))でASCII出力 Aは65
import math
import statistics
import string


def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True

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

Submission status: Runtime Error

Solution code:
import math
import statistics
import string


def intinput():
    return int(input())
def listintinput():
    return list(map(int, input().split()))
def splitintinput():
    return map(int, input().split())
def factorialsurplus(x, y, z):  # xからyまでの階乗をzで割ったあまりを求める
    ret = 1
    for i in range(x, y + 1):
        ret = (ret * i) % z
    return (ret)
def isprime(x):
    if x == 1:
        return False
    if x == 2:
        return True
    sq = int(math.sqrt(x))
    for i in range(2,sq+1):
        if x % i == 0:
            return False
    return True

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

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())
print(int(A*B/math.gcd(A,B)))

Submission status: Runtime Error

Solution code:
def compute_lcm(x, y):

   # choose the greater number
   if x > y:
       greater = x
   else:
       greater = y

   while(True):
       if((greater % x == 0) and (greater % y == 0)):
           lcm = greater
           break
       greater += 1

   return lcm
a,b= input().split()
print(compute_lcm(int(a),int(b))

Submission status: Runtime Error

Solution code:
import numpy as np
def main(a,b):
    g = np.gcd(a,b)
    lcm = (x * y) // g
    return lcm

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

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
for i in range(1,n):
    if a*i%b==0:
        print(a*i)
        break
else:
    print(a*b)

Submission status: Runtime Error

Solution code:
a, b = [int(x) for x in input().split()]
# a = [int(input()) for _ in range(m)]
# a = [int(x) for x in input().split()]

import math


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

Submission status: Runtime Error

Solution code:
a, b = [int(x) for x in input().split()]
# a = [int(input()) for _ in range(m)]
# a = [int(x) for x in input().split()]

import math


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

Submission status: Runtime Error

Solution code:
import math

N=list(map(int,input().split()))
print(math.gcd(N[0].N[1]))

Submission status: Runtime Error

Solution code:
import sys
import socket
from math import gcd

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('c1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    A, B = read_int_list()
    print(A * B // gcd(A, B))


main()

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 gcd(A, B):
    return (A*B) // math.gcd(A, B)


print(gcd(A, B))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

i = list(map(int,input().split()))
A = i[0]
B = i[1]

ans = (A * B) // math.gcd(A, B)

print(ans)

Submission status: Runtime Error

Solution code:
[A,B] = input().split()
max_ab = max(A,B)
min_ab = min(A,B)

r = max_ab
s = min_ab

while s != 0:
  r,s = s,r % s
  if s == 0:
    break
print(int(r*(A/r)*(B/r)))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
max_ab = max(A,B)
min_ab = min(A,B)

r = max_ab
s = min_ab

while s != 0:
  r,s = s,r % s
  if s == 0:
    break
print(int(r*(A/r)*(B/r)))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
def fun(A, B, n=1):
  if n%B == 0: return n
  return fun(A, B, n+1)
print(fun(A, B))

Submission status: Runtime Error

Solution code:
def fun(A, B, n=1):
  if n%B == 0: return n
  return fun(A, B, n+1)
print(fun(*map(int, input().split())))

Submission status: Runtime Error

Solution code:
import numpy as np
A, B = map(int, input().split())
print(np.lcm(A, B))

Submission status: Runtime Error

Solution code:
import numpy as np
A, B = map(int, input().split())
print(np.gcd(A, B))

Submission status: Runtime Error

Solution code:
import numpy as np

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

print(np.lcm(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:
# coding: utf-8
import math

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

gcd = math.gcd(a,b)

print(a//gcd * b)

Submission status: Runtime Error

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

import math
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())
for i in range(1,B):
  if all((A*i)%B!=0):
    print(A*B)
  else:
    print(A*i)
  break

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
s=[]
if all((A*i)%B!=0 for i in range(1,B)):
  print(A*B)
else:
  s.append(i)
  print(A*s[0])

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
s=[]
if all((A*i)%B!=0 for i in range(1,B)):
  print(A*B)
else:
  s.append(i)
  b=s[0]
  print(A*b)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
s=[]
if any((A*i)%B==0 for i in range(1,B)):
  s.append(i)
  b=s[0]
  print(A*b)
else:
  print(A*B)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if any((A*i)%B==0 for i in range(1,B)):
  print(A*i)
  exit()
else:
  print(A*B)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if any((A*i)%B==0 for i in range(1,B)):
  print(A*i)
  break
else:
  print(A*B)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if any((A*i)%B==0 for i in range(1,B)):
  print(A*i)
else:
  print(A*B)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if all((A*i)%B!=0 for i in range(1,B+1)):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if all((A*i)%B!=0 for i in range(1,B)):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if all((A*i)%B!=0 for i in range(2,B)):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if all(A*i%B=0 for i in range(2,B):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if all(A*i%B!=0 for i in range(2,B+1)):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
while all((A*i)%B!=0 for i in range(2,B+1)):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
while all(A*i%B!=0 for i in range(2,B+1)):
  print(A*B)
else:
  print(A*i)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
while all(A*i%B!=0 for i in range(2,B)):
  print(A*B)
else:
  print(A*i)

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:
import math

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

try:
    listA = list(input().split())
    #listA<-[1,2,2,3,1]
    #print(listA)
    #ここに逐次処理を書けばいいと思う。
except:
    quit();
    #または、quit(),os.exit()をして止める。

a=int(listA[0])
b=int(listA[1])

print(lcm(a, b))

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:
import math

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

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())
print(int(A*B/math.gcd(A, B)))

Submission status: Runtime Error

Solution code:
A, B = map(int, input().split())
print(int(A*B/math.gcd(A, B)))

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 = [int(x) for x in input().split()]

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

Submission status: Runtime Error

Solution code:
import math
import numpy as np

N = input()
l = N.split()

print(np.lcm(int(l[0]), int(l[1])))

Submission status: Runtime Error

Solution code:
import math

input = input()
l = input.split()

print(math.gcd(int(l[0]), int(l[1])))

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())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def g(m,n):
    if m>n:
        m=m%n
        return g(m,n)
    elif m==0:
        return n
    elif n==0:
        return m
    else:
        n=n%m
        return g(m,n)

def h(m,n):
    return m*n//g(m,n)

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

print(h(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:
A,B=map(int, input().split()) 
N=max(A,B)
M=min(A,B)
for i in range(1,M+1):
    if M%(M-i)==0 and N%(M-i)==0:
        Max=i
        break
print(N*M//Max)

Submission status: Runtime Error

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

main()

Submission status: Runtime Error

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


print(math.gcd(A, B))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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:
import math
from fractions import gcd

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

n = math.gcd(a, b)

if n == 1:
  print(a*b)
else:
  a = a//n
  print(a*b)

Submission status: Runtime Error

Solution code:
import math

if __name__ == '__main__':

	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())
import fractions
def lcm(x,y):
    return (x,y)//fractions.gcd(x,y)
print(lcm(A,B))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def compute_lcm(x, y):
   # choose the greater number
   if x > y:
       greater = x
   else:
       greater = y
   while(True):
       if((greater % x == 0) and (greater % y == 0)):
           lcm = greater
           break
       greater += 1
   return lcm
a,b=map(int,input().split())
print(compute_lcm(num1, num2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()

print(int(A * B / gcd(A, B)))

Submission status: Runtime Error

Solution code:
from sys import stdin
import math


def ii(): return int(stdin.readline())


def fi(): return float(stdin.readline())


def mi(): return map(int, stdin.readline().split())


def fmi(): return map(float, stdin.readline().split())


def li(): return list(mi())


def lsi():
    x=list(stdin.readline())
    x.pop()
    return x


def si(): return stdin.readline()


def sieve(x):
    a=[True]*(x+1)
    sq=floor(sqrt(x))
    for i in range(3, sq+1, 2):
        if a[i]:
            for j in range(i*i, x+1, i):
                a[j]=False
    if x>1:
        p=[2]
    else:
        p=[]
    for i in range(3, x+1, 2):
        if a[i]:
            p.append(i)
    return p
#vowel={'a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y'}
#pow=[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592, 17179869184, 34359738368, 68719476736, 137438953472, 274877906944, 549755813888, 1099511627776, 2199023255552, 4398046511104, 8796093022208, 17592186044416, 35184372088832, 70368744177664, 140737488355328, 281474976710656, 562949953421312, 1125899906842624, 2251799813685248, 4503599627370496, 9007199254740992, 18014398509481984, 36028797018963968, 72057594037927936, 144115188075855872, 288230376151711744, 576460752303423488, 1152921504606846976, 2305843009213693952, 4611686018427387904, 9223372036854775808]
############# CODE STARTS HERE #############
a, b=mi()
print((a*b)//math.gcd(a, b))