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

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

Submission status: Accepted

Solution code:
# C - Snack
# https://atcoder.jp/contests/abc148/tasks/abc148_c

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:
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:
import fractions
a,b = map(int, input().split())
def lcm(x,y):
    return x*y / fractions.gcd(x,y)
print(int(lcm(a,b)))

Submission status: Accepted

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

import fractions
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())
g = gcd(a, b)
print((a*b)//g)

Submission status: Accepted

Solution code:
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))



A,B=nm()

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import *

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

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

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

Submission status: Accepted

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

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:
A, B = map(int, input().split())
a_cnt = 1
a_tmp = A
b_cnt = 1
b_tmp = B

while True:
    if a_tmp == b_tmp:
        print(a_tmp)
        exit(0)
    elif a_tmp > b_tmp:
        b_tmp = B*b_cnt
        b_cnt += 1
    else:
        a_tmp = A*a_cnt
        a_cnt += 1

Submission status: Accepted

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

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

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

print(lcm(a,b))

Submission status: Accepted

Solution code:
from fractions import gcd

n, m = map(int, input().split())

print(n * m // gcd(n, m))

Submission status: Accepted

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

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 gcd(a,b):
    if b == 0:
        return a
    return gcd(b,a%b)
def lcm(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())
g = gcd(a, b)
L = a * b // g
print(L)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,b=map(int, input().split())
    import fractions


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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
import fractions
#import math
from functools import reduce
def lcm_base(x, y):
  return (x * y) // fractions.gcd(x, y)
  #return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
  return reduce(lcm_base, numbers, 1)

print(lcm_base(a, b))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
import fractions

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

Submission status: Accepted

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

Submission status: Accepted

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

c = a
d = b
r = c // d
m = c % d

while True:
    if m == 0:
        break
    else:
        c = d
        d = m
        m = c % d

print(int(a * b / d))

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
Flag = True
i = max(A,B)
s = max(A,B)
while Flag == True and i <= A*B:
  if i%A ==0 and i%B == 0:
    Flag = False
  i += s
print(i-s)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
n = 1
while True:
  A_ = A * n
  if A_ % B == 0:
    print(A_)
    exit()
  n += 1

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:
import fractions
A,B=map(int,input().split())
ans=A*B//fractions.gcd(A,B)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd

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

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 fractions import gcd

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def lcm(a, b):
    return int((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())
import fractions

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

Submission status: Accepted

Solution code:
# C - Snack
# https://atcoder.jp/contests/abc148/tasks/abc148_c

import fractions

# 最小公倍数を求める問題
A,B = map(int,input().split())

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

Submission status: Accepted

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

print(int(A*B/fractions.gcd(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(a,b):
    while b:
        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())
ans = 0
for i in range(1, b+1):
    ans = a * i
    if ans % b == 0:
        print(ans)
        break

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 sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
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()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue
import fractions

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

# lcm = lambda x, y: (x * y) // math.gcd(x, y)
lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

print(lcm(p, q))

Submission status: Accepted

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

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

print(lcm(A,B))

Submission status: Accepted

Solution code:
import fractions

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

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

Submission status: Accepted

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

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
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

A,B=list(map(int,input().split()))
print(lcm_list([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 fractions

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

Submission status: Accepted

Solution code:
# abc148_c.py
import sys
import time
import unittest
from io import StringIO
import fractions as math


def resolve():
    A, B = [int(i) for i in input().split()]
    print(int(A * B / math.gcd(A, B)))


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def setUp(self):
        self.startTime = time.time()

    def tearDown(self):
        t = time.time() - self.startTime
        print('%s: %.3f' % (self.id(), t), flush=True)

    def test_入力例_1(self):
        input = """2 3"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """123 456"""
        output = """18696"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """100000 99999"""
        output = """9999900000"""
        self.assertIO(input, output)


if __name__ == "__main__":
    if "IS_LOCAL" in locals():
        suite = unittest.TestLoader().loadTestsFromTestCase(TestClass)
        unittest.TextTestRunner(verbosity=0).run(suite)
    else:
        resolve()

Submission status: Accepted

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

if a>b:
    if a%b==0:
        gcd=b
    else:
        p=a
        q=b
        r=p%q
        while r!=0:
            p=q
            q=r
            r=p%q
            if r==0:
            	gcd=q
            	break
elif a<b:
    if b%a==0:
    	gcd=a
    else:
        p=b
        q=a
        r=p%q
        while r!=0:
            p=q
            q=r
            r=p%q
            if r==0:
            	gcd=q
            	break
A=a//gcd
B=b//gcd
print(A*B*gcd)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b = map(int, input().split())
child = a*b
if a < b:
  a,b = b,a

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

print(child//b)

Submission status: Accepted

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

import fractions

gcd = fractions.gcd(a, b)

print(int(a*b/gcd))

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:
import math
a, b = list(map(int, input().split()))
print(a * b //math.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:
from fractions import gcd
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 sys import stdin, setrecursionlimit


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


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
i=min(a,b)
j=max(a,b)
while not(i==0) and not(j==0):
  x=i
  i=j%i
  j=x
print(int(a*b/j))

Submission status: Accepted

Solution code:
import fractions

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

A, B = list(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())
 
import fractions
l = A * B / fractions.gcd(A, B)
print(int(l))

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    from fractions import gcd

    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 = map(int, input().split())
def lcm(a, b):
    g = fractions.gcd(a, b)
    L = a * b // g
    return L

print(lcm(A, B))

Submission status: Accepted

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

#from math import gcd
from fractions import gcd

f = gcd(a,b)
f2 = a*b//f

print(f2)

Submission status: Accepted

Solution code:
import fractions
n,m = map(int,input().split())
def lcb(n,m):
    return (n*m)//fractions.gcd(n,m)
    
print(lcb(n,m))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


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


import fractions


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

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())
import fractions as fr
print(int(a*b/fr.gcd(a,b)))

Submission status: Accepted

Solution code:

def gcd(a,b):
    ma = max(a,b)
    mi = min(a,b)
    while(True):
        los = ma % mi
        ma = mi
        mi = los
        if los == 0:
            result = ma
            break
    return result

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

Submission status: Accepted

Solution code:
def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        return z


def lcm(m, n):
    return (m * n) // gcd(m, n)


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

# lcm
snack = lcm(A, B) 

print(snack)

Submission status: Accepted

Solution code:
def euclid(m, n):
    while n != 0:
        m, n = n, m % n
    return m

# ABC148C

a, b = map(int, input().split())
print(a * b // euclid(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
a,b = map(int, input().split())
f = fractions.gcd(a,b) # 最大公約数
f2 = a*b // f # 最小公倍数
print(f2)

Submission status: Accepted

Solution code:

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

def gcd(a,b):
    if a%b==0:
        return b
    else:
        return gcd(b,a%b)
ans = a*b//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:
x = input().split()
a = int(x[0])
b = int(x[1])

def gcd(s,t):
  if(s>=t):
    m = s
    n = t
  else:
    m = t
    n = s
  while True:
    if(m%n == 0):
      return n
    else:
      temp = n
      n = m % n
      m = temp

f = int(a*b/gcd(a,b))
print(f)

Submission status: Accepted

Solution code:
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect
import itertools
import heapq


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(input):
    nums = string_to_int(input)

    def euclid(large, small):
        if small == 0:
            return large
        l = large % small
        return euclid(small, l)

    nums.sort(reverse=True)
    eee = euclid(nums[0], nums[1])
    return int((nums[0] * nums[1]) / eee)


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(input())
    print(ret)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import fractions
a, b = map(int, input().split())
#a,bの最小公倍数
def lcm(a, b):
  return a * b // fractions.gcd (a, b)
print(lcm(a, b))

Submission status: Accepted

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

def lcm(k):
    ans = k[0]
    for i in range(1, len(k)):
        ans = ans * k[i] // fractions.gcd(ans, k[i])
    return ans
  
print(lcm(k))

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:
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:09:21 2020

@author: shinba
"""

import fractions

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

from fractions import gcd

res=a*b/gcd(a,b)
print(int(res))

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

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:
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10**9)
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))
#%%code
from fractions import gcd
def resolve():
    A,B=pin()
    print(A*B//(gcd(A,B)))
#%%submit!
resolve()

Submission status: Accepted

Solution code:
def calcgcd(a, b):
  if a > b:
    a, b = b, a
  while a > 0:
    a, b = b%a, a
  return b
def calclcm(a, b):
  return a*b//calcgcd(a, b)

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

Submission status: Accepted

Solution code:
import math
import sys
input = sys.stdin.readline
a,b=map(int,input().split())
i=1
while True:
  if a*i % b == 0:
    print(a*i)
    break
  i+=1

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())  # '123' -> 123
def Is(): return map(int, input().split())  # '123 456' -> 123, 456
def LI(): return list(map(int, input().split()))  # '123 456' -> [123, 456]
def TI(): return tuple(map(int, input().split()))  # '123 456' -> (123, 456)
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()  # 'aa bb' -> 'aa','bb' or ['aa','bb']
def LS(): return list(input())  # 'abc123' -> ['a','b','c','1','2','3']
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(1000000)
MOD = 1000000007
INF = float('inf')

a, b = Is()
l = a * b / gcd(a, b)
print(int(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# C - Snack

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 gcd(x, y):
    if y < x:
        x,y = y,x
    while x%y != 0:
        x,y = y,x%y
    return y

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

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:
def gcd(m,n):
    x = max(m,n)
    y = min(m,n)
    while x%y != 0:
        z = x%y
        x = y
        y = z
    else:
        return y
def lcm(m,n):
    return int(m * n /gcd(m,n))

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

Submission status: Accepted

Solution code:
def main():
    x, y = map(int, input().split())
    mul_xy = x * y
    while True:
        x, y = y, x % y
        if not y:
            break
    print(int(mul_xy / x))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

print(lcm(a, b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import fractions


def lcm(A):
    value = A[0]
    for i in range(1, len(A)):
        value = value * A[i] // fractions.gcd(value, A[i])
    return value


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

print(lcm(A))

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

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:
import fractions
A, B = map(int, input().split())
lcm = int(A/fractions.gcd(A,B) * B)
print(lcm)

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
A, B = [int(_) for _ in input().split()]
print(A * B // fractions.gcd(A, B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions


def main():
    n, m = list(map(int, input().split()))
    print((n * m) // fractions.gcd(n, m))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

# ==================== gcd   最大公約数
from fractions import gcd
#from math import gcd

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

print(lcm(a,b))

Submission status: Accepted

Solution code:
from fractions import gcd  # use math module for python 3.5~


def main():
    A, B = list(map(int, input().split(' ')))
    gcd_ab = gcd(A, B)
    lcm = A * B // gcd_ab
    print(lcm)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import fractions as f

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

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

Submission status: Accepted

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

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:
def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y % x, x)


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:
from fractions import gcd
A,B=map(int,input().split())
lcm=A*B/gcd(A,B)
print(int(lcm))

Submission status: Accepted

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

from fractions import gcd

lcm = a * b // gcd(a, b)

print(lcm)

Submission status: Accepted

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