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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
mod2 = 998244353
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

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

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

Solution (Python):
from collections import Counter,defaultdict,deque
import sys
import bisect
import math
import itertools
import string
import queue
import copy


from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
 
def inp(): 
    return int(input())
def inpm(): 
    return map(int,input().split())
def inpl(): 
    return list(map(int, input().split()))
def inpls(): 
    return list(input().split())
def inplm(n): 
    return list(int(input()) for _ in range(n))
def inpll(n): 
    return [list(map(int, input().split())) for _ in range(n)]

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


def main():
    a,b=inpm()
    print(lcm(a,b))
    

if __name__ == "__main__":
    main()

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

Solution (Python):
def func(x,y):
    if y == 0:
        return x
    return func(y,x%y)

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

Solution (Python):
from fractions import gcd

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

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

Solution (Python):
def gcd(a: int, b: int) -> int:
    """a, bの最大公約数(greatest common divisor:GCD)を求める
    計算量: O(log(min(a, b)))
    """
    if b == 0:
        return a
    return gcd(b, a%b)


def lcm(a, b):
    """a, bの最小公倍数(least common multiple:LCM)を求める
    計算量: O(log(min(a, b)))"""
    return (a * b) // gcd(a, b)
  
a, b = map(int, input().split())

print(lcm(a, b))

Solution (Python):
from fractions import gcd
from functools import reduce

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

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



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

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

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

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

from fractions import gcd
g = gcd(a, b)
print(a * b // g)

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


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


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

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

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


A, B = read_ints()
from fractions import gcd
G = gcd(A, B)
a = A // G
b = B // G
print(G * a * b)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    def gcd(a,b):
        if a == 0:
            return b
        return gcd(b%a, a)
    a,b = LI()
    g = gcd(a,b)
    l = a*b//g
    print(l)
    return


if __name__ == "__main__":
    solve()

Solution (Python):

import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
minans = inf ;ans = 0 ;count = 0 ;pro = 1

def gcd(a, b):
    while(b != 0):
        a, b = b, a % b
    return a
    
def lcm(m,n):
    return (m*n)//gcd(m,n)

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

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

def gcd(x, y):
    while x != 0 and y != 0:
        x, y = max(x, y), min(x, y)
        x %= y
    return y

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

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


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

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

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

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

Solution (Python):
def gcd(a,b):
    if a < b:
        a, b = b, a
    while b >= 1:
        a, b = b, a % b
    return a
def lcm(a,b):
	return a * b // gcd(a,b)

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

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

Solution (Python):
from fractions import gcd
def lcm(a, b):
    return a * b // gcd(a, b)

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

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


A , B = list(map(int, sys.stdin.buffer.readline().split()))
print( int(A * B / gcd(A, B)))

Solution (Python):
import itertools, heapq, bisect
from collections import defaultdict as ddic, deque, Counter

rr = raw_input
rri = lambda: int(raw_input())
rrm = lambda: map(int, raw_input().split())
MOD = 10 ** 9 + 7


X, Y = rrm()
from fractions import gcd
def lcm(a,b):
    return a*b/gcd(a,b)
print lcm(X, Y)

Solution (Python):






from sys import stdin,setrecursionlimit









from fractions import gcd
setrecursionlimit(10**6)
input=stdin.readline

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
if sys.platform in (['ios','darwin','win32']):
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in 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)

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

if __name__ == '__main__':
	main()

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

A,B = inpl()
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))