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: Accepted

Solution code:
import fractions
 
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
 
if __name__ == '__main__':
    a,b  = map(int, input().split())
    ans = lcm(a,b)
    print(ans)

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
def gcd(a,b):#最大公約数を返す。Euclid
    if a<b:
        a,b=b,a
    c=a%b
    if c==0:
        return b
    return gcd(b,c)
print(int(A*B/gcd(A,B)))

Submission status: Accepted

Solution code:
import fractions

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

Submission status: Accepted

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

#最小公倍数が答え
gcd = fractions.gcd(A, B)
ans = A * B / gcd

print(int(ans))

Submission status: Accepted

Solution code:
#coding:utf-8
import fractions
#import math


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

if __name__ == "__main__":
    a, b = map(int, input().split())
    print(lcm(a, b))

Submission status: Accepted

Solution code:
from fractions import gcd
def lcm(a, b):
	return a * b // gcd (a, b)
A,B = map(int,input().split())
print(lcm(A,B))

Submission status: Accepted

Solution code:
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a


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

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

print(lcm(a,b))

Submission status: Accepted

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

from fractions import gcd

def lcm(a, b):
    """
    aとbの最小公倍数を計算します。
    """
    return a * b // gcd(a, b)

print(lcm(A, B))

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

Submission status: Accepted

Solution code:
import sys
import fractions
A, B = map(int, sys.stdin.readline().split())

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

Submission status: Accepted

Solution code:
def gcd(A,B):
    a=min(A,B)
    b=max(A,B)
    if a==0:
        return b
    else:
        return gcd(a,b%a)


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

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

Submission status: Accepted

Solution code:
def gcd(x, y):
    z = x % y
    if z == 0:
        return y
    return gcd(y, z)


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

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import fractions

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

x = A * B // fractions.gcd(A, B)

print(x)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


import fractions


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


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


ans = lcm(A, B)
print(ans)

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def lcm(a,b):
    return (a * b) // fractions.gcd(a, b)
    
print(lcm(a,b))

Submission status: Accepted

Solution code:
import fractions

i = input().split(" ")
a = int(i[0])
b = int(i[1])

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

Submission status: Accepted

Solution code:
import fractions

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

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

Submission status: Accepted

Solution code:
from fractions import gcd


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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd

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

Submission status: Accepted

Solution code:
import fractions


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

Submission status: Accepted

Solution code:
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


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

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

Submission status: Accepted

Solution code:
import fractions
def main():
    a,b = map(int,input().split())
    print(int(a*b//fractions.gcd(a,b)))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

import fractions

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

Submission status: Accepted

Solution code:
def gcd(a, b):
    '''ユークリッド互除法を使った最大公約数の求め方'''
    while b != 0:
        a, b = b, a % b
    return(a)


def lcm(a, b):
    '''最小公倍数の求め方'''
    return a * b // gcd(a, b)

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

print(lcm(A,B))

Submission status: Accepted

Solution code:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

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

print(lcm(A, B))

Submission status: Accepted

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


def gcd(m, n):
    if m < n:
        m, n = n, m
    if n == 0:
        return m
    return gcd(n, m % n)


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

Submission status: Accepted

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

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

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

print(lcm(A,B))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(1,10000000):
    c = a * i
    if c % b == 0:
        print(c)
        break

Submission status: Accepted

Solution code:
from fractions import gcd

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


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


print(lcm(A, B))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
if a < b:
  tmp =a
  a = b
  b = tmp
r = a%b
x  =a * b
while(r!=0):
  a = b;
  b = r;
  r = a %b
print(int(x/b))

Submission status: Accepted

Solution code:
import sys

#read = sys.stdin.buffer.read
#input = sys.stdin.buffer.readline
#inputs = sys.stdin.buffer.readlines


# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
#import numpy as np
#from math import gcd
from fractions import gcd

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




	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def gcd(a, b):
    while b != 0:
        a,b = b,a%b
    return a
    

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

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

print(lcm(a,b))

Submission status: Accepted

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


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

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

print(ans)

Submission status: Accepted

Solution code:
def gdc(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    return a * b // gdc(a, b)

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

Submission status: Accepted

Solution code:
def euc(a,b):
  if b>a:
    return euc(b,a)
  res = a%b
  if res==0:
    return b
  else:
    return euc(b,res)

B,C = map(lambda x: int(x),input().split())
print(int(B*C/euc(B,C)))

Submission status: Accepted

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

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


print(lcm(a,b))

Submission status: Accepted

Solution code:
import fractions
temp=list(map(int, input().split()))
a=temp[0]
b=temp[1]

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
print(lcm(a,b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def gcd(x,y):
    while y>0:
        x,y = y,x%y
    return x
A,B = map(int,input().split())
a = gcd(A,B)
b = (A//a)*(B//a)*a
print(b)

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
#input = sys.stdin.readline
import math
import fractions
import itertools

#import bisect

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default


def main():
#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]
    a,b=map(int,input().split())
    print((a*b)//fractions.gcd(a,b))

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

print(lcm(A, B))

Submission status: Accepted

Solution code:
from fractions import gcd

def lcm(a,b):
    return (a*b)//gcd(a,b)
A,B=map(int,input().split())
print(lcm(A,B))

Submission status: Accepted

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

def gcd(a,b):
    if a<b:
        a,b = b,a
    while(a%b!=0):
        c = a%b
        a = b
        b = c
    return b

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

Submission status: Accepted

Solution code:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

def lcm(x, y):
    return (x * y) // gcd(x, y)
a , b = map(int,input().split())
print(lcm(a, b))

Submission status: Accepted

Solution code:
import fractions as math

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

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

Submission status: Accepted

Solution code:
import fractions

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
 #最大公約数
def gcd(a,b):
  while b!=0:
    a,b=b,a%b
  return a

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

print(lcm(A,B))

Submission status: Accepted

Solution code:
import sys
from fractions import gcd

stdin = sys.stdin

ri = lambda: int(rs())
rl = lambda: list(map(int, stdin.readline().split()))  # applies to only numbers
rs = lambda: stdin.readline().rstrip()  # ignores trailing space

A, B = rl()
answer = A * B // gcd(A, B)
print(answer)

Submission status: Accepted

Solution code:
from fractions import gcd

ab = list(map(int, input().split()))
a = ab[0]
b = ab[1]

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

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
ans=1
for g in range(1,100000):
  if A%g==0 and B%g==0:
    ans=g
print((A*B)//ans)

Submission status: Accepted

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

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

print(lcm(a, b))

Submission status: Accepted

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


import fractions

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

Submission status: Accepted

Solution code:
def gcd(a, b):
    while b!=0:
        a,b = b, a%b
    return a

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import fractions

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

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

print(lcm(a, b))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions

a, b = map(int, input().split())
c = fractions.gcd(a, b)


print(a * b // c)

Submission status: Accepted

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


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

# a,bの最小公倍数


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


print(lcm(A, B))

Submission status: Accepted

Solution code:
import sys, fractions
def input():
    return sys.stdin.readline()[:-1]
A,B = map(int,input().split(' '))
k = fractions.gcd(A,B)
a = A//k
b = B//k
print(k*a*b)

Submission status: Accepted

Solution code:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
from fractions import gcd
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

x,y = Is()
print((x * y) // gcd(x, y))

Submission status: Accepted

Solution code:
import fractions

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

GCD = fractions.gcd(A,B)
print(int(A*B/GCD))

Submission status: Accepted

Solution code:
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
a,b=[int(i)for i in input().split()]
print(a*b//gcd(a,b))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

Submission status: Accepted

Solution code:
from fractions import gcd

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

Submission status: Accepted

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


def lcm(A,B):
    if B>A:
        A,B=B,A
    while A%B!=0:
        A,B=B,A%B
    return B
    
print(A*B//lcm(A,B))

Submission status: Accepted

Solution code:
import sys, fractions
from collections import defaultdict
from copy import deepcopy
import itertools
input = sys.stdin.readline
# 文字列の場合は普通のinput()を使うか下を使う
# input = sys.stdin.readline().rstrip()


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

Submission status: Accepted

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

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

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

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

print(lcm(A, B))

Submission status: Accepted

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

#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

print(lcm(A,B))

Submission status: Accepted

Solution code:
def scm(s):
    x, y = s
    def gcd(x, y):
        while y:
            x, y = y, x % y
        return x
    gcd = gcd(x, y)
    print(x * y // gcd)

if __name__ == "__main__":
    import sys
    in_str = []
    for line in sys.stdin:
        in_str.append(line)
    scm([int(_) for _ in in_str[0].split()])

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def main():
    a,b = map(int,input().split())
    lcm = (a*b)/gcd(a,b)
    print(int(lcm))
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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


def f(m, n):
    while (m % n != 0):
        temp = n
        n = m % n
        m = temp
    return n


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

Submission status: Accepted

Solution code:
import sys, math, fractions
from itertools import permutations, combinations
from collections import defaultdict

sys.setrecursionlimit(10**7)
A, B = map(int, input().split())

ans = fractions.gcd(A, B)
print(A*B//ans)

Submission status: Accepted

Solution code:
import fractions

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

#A,Bの最小公倍数
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(A,B))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import fractions
a,b=map(int,input().split())
g=fractions.gcd(a,b)
print(a*b//g)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
def main():
    A,B = map(int,input().split())
    g = fractions.gcd(A,B)
    print(A*B//g)
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from fractions import gcd

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

Submission status: Accepted

Solution code:
k = [int(x) for x in input().split()]
summ = k[0]*k[1]
while(k[0]%k[1]!=0 and k[1]%k[0]!=0):
    if(k[0]>k[1]): k[0]=k[0]%k[1]
    else: k[1]=k[1]%k[0]
if(k[0]>k[1]): print(int(summ/k[1]))
else: print(int(summ/k[0]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time
from fractions import gcd
#import random


def I(): return int(input())


def MI(): return map(int, input().split())


def LI(): return [int(i) for i in input().split()]


def LI_(): return [int(i)-1 for i in input().split()]


def StoI(): return [ord(i)-97 for i in input()]


def ItoS(nn): return chr(nn+97)


def input(): return sys.stdin.readline().rstrip()


def show(*inp, end='\n'):
    if show_flg:
        print(*inp, end=end)


YN = ['No', 'Yes']
MOD = 10**9+7
inf = float('inf')
IINF = 10**10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']


# show_flg = False
show_flg = True

p = None
XY = None
N = None


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


def main():
    A, B = MI()
    print(lcm(A, B))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
def lcm(x,y):return x*y//gcd(x,y)
def lcmm(l):return reduce(lcm,l)


a,b=input().split()
List=[int(a),int(b)]
print(lcmm(List))

Submission status: Accepted

Solution code:
import fractions as fc

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

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

Submission status: Accepted

Solution code:
def gcd(a,b):
    if not b:
        return a
    while a%b:
        a, b = b, a%b
    return b

def lcm(a,b):
    if not a or not b:
        return 0  # ?
    g = gcd(a,b)
    return a*b//g

a, b = [int(s) for s in input().split()]
print(lcm(a,b))

Submission status: Accepted

Solution code:
import math
import fractions

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

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

print(lcm(A, B))

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
a = list(map(int, input().split()))
def lcm(x,y):
    return x*y//gcd(x,y)
def lcmm(l):
    return reduce(lcm,l)
print(lcmm(a))

Submission status: Accepted

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

def lcm (a, b):
    return a * b // gcd(a, b)
    
A, B = map(int, input().split())
print(lcm(A, B))

Submission status: Accepted

Solution code:
import math
A,B = map(int,input().split())
a = A
b = B
while a!=b:
  if a>b:
    a -= b
  else:
    b -= a
print(math.floor(A*B/a))

Submission status: Accepted

Solution code:
def lcm(x,y):
    return (x * y)// gcd(x,y)
def gcd(x,y):
    if x < y:
        x, y = y, x
    while y!=0:
        x,y=y,x%y
    return x
def main():
    A, B = map(int, input().split())
    print(lcm(A,B))
main()

Submission status: Accepted

Solution code:
import fractions
A,B = (int(i) for i in input().split())

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

print(lcm(A,B))

Submission status: Accepted

Solution code:
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

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


a,b = [int(_) for _ in input().split()]
print(lcm(a,b))

Submission status: Accepted

Solution code:
def gcd(a,b):
	while(b!=0):
		a,b=b,a%b
	return a

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from fractions import gcd

def solve():
    a,b = map(int, input().split())
    return str(a*b//gcd(a,b))

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

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

Submission status: Accepted

Solution code:
def gcd(x,y):
    while y != 0:
        x, y = y, x%y
#        print(x,y)
    return(x)

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

Submission status: Accepted

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

init = max(a, b)
minit = min(a, b)
step = init

while(True):
    if(init % minit == 0):
        break
    init += step
print(init)

Submission status: Accepted

Solution code:
A,B = list(map(int,input().split()))
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
C = max(A,B)
D = min(A,B)
E = gcd(C,D)
output = int(A*B/E)
print(output)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
a, b = [int(x) for x in input().split(' ')]

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import fractions

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

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

print(lcm(a, b))

Submission status: Accepted

Solution code:
def gcd(p,q):
  #print(str(p)+" "+str(q))
  big=max(p,q)
  small=min(p,q)
  if small==0:
    return big
  else:
    return gcd(big%small,small)

ab=input().split(" ")
a=int(ab[0])
b=int(ab[1])
print(a*b//gcd(a,b))

Submission status: Accepted

Solution code:
import fractions


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


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


main()

Submission status: Accepted

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

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(a, b):
    return a * b // gcd (a, b)
#from fractions import lcm
print(lcm(a,b))

Submission status: Accepted

Solution code:
def gcm(a,b):
    if a < b:
        a,b = b,a
    if b == 1:
        return 1
    if b == 0:
        return a
    return gcm(b,a%b)

a,b = (int(num) for num in input().split())
print(a*b // gcm(a,b))

Submission status: Accepted

Solution code:
def gcd(a,b):
	if not b:
		return a
	return gcd(b,a%b)

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

Submission status: Accepted

Solution code:
# coding: utf-8
from fractions import gcd


def solve(*args: str) -> str:
    a, b = map(int, args[0].split())
    return str(a*b//gcd(a, b))


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
def gcd(a, b):
  while b:
    a, b = b, a % b
  return a
def lcm(a, b):
  return (a * b) // gcd(a, b)
num = lcm(a, b)
print(num)

Submission status: Accepted

Solution code:
import fractions

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

Submission status: Accepted

Solution code:
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)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
# input = sys.stdin.readline
# from bisect import *
# from collections import *
# from heapq import *
# import functools
# import itertools
# import math
INF = 500000
MOD = 10**9+7

gcd = lambda a, b: a if b == 0 else gcd(b, a%b)
a, b = map(int, input().split())
print(a*b//gcd(a, b))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

A, B = MAP()

print(lcm(A, B))

Submission status: Accepted

Solution code:
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)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce

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

def gcd(a,b):
  while b:
    a,b = b,a%b
  return a

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
def gcd(x,y):
    while(x%y!=0):
        tmp=y
        y=x%y
        x=tmp
    return y
print(a*b//gcd(a,b))

Submission status: Accepted

Solution code:
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

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

Submission status: Accepted

Solution code:

import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
def solve():

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

    
    return lcm(A,B)
print(solve())

Submission status: Accepted

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


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

print(lcm(a, b))

Submission status: Accepted

Solution code:
b,a = [int(i) for i in input().split()]
c,d = b,a
while a%b!= 0:
    # print(a,b,a%b)
    a, b = b, a%b
print(c//b*d//b*b)

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

#最大公約数
def gcb(a,b):
    while b!=0:
        a,b=b,a%b
    return a
#最小公倍数
def lcm(a,b):
    return a * b // gcb(a, b)
    
print(lcm(a,b))

Submission status: Accepted

Solution code:
import math
import sys

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

m=10**9 + 7 
sys.setrecursionlimit(1000010)
(A,B) = list(map(int,input().split()))
# print(A,B)
print( lcm(A,B))

Submission status: Accepted

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

numer = a * b

if a < b:
  tmp = a
  a = b
  b = tmp
r = a % b
while r != 0:
  a = b
  b = r
  r = a % b


print(int(numer / b))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


def gcd(a, b):
    while b:
        a, b = b, a % b

    return a


a, b = [int(item) for item in input().split()]
print(a * b // gcd(a, b))

Submission status: Accepted

Solution code:
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

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

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

print lcm(A, B)

Submission status: Accepted

Solution code:
import fractions

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

gcd = fractions.gcd(A, B)
print(int(A * B / gcd))

Submission status: Accepted

Solution code:
# 2019/12/22

from fractions import gcd

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