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
a,b=[int(i) for i in input().split()]
def lcm(x,y):
    return int((x*y) / math.gcd(x,y))

  
  
z=lcm(a,b) 
print(z)

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 numpy as np
A, B = list(map(int,input().split()))
ans = np.lcm(A, B)
print(ans)

Submission status: Runtime Error

Solution code:
import fractions

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

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

Submission status: Runtime Error

Solution code:
import math
nums = input().split(" ")
a = int(nums[0])
b = int(nums[1])

# 最小公倍数を計算すれば良い。
def lcm(x, y):
  return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
s=input().split()
i=int(s[0])
j=int(s[1])
amari=[]
a=""
if i<j:
  p_1=j
  p_2=i
elif i==j:
  a=i
elif i>j:
  p_1=i
  p_2=j
while a=0:
  am=p_1%p_2
  if am==0:
    break
  amari.append(am)
  p_1=p_2
  p_2=am
a=str(amari[-1])
print(a)

Submission status: Runtime Error

Solution code:
import math

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

A, B = [int(i) for i in 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=map(int,(input().split()))    
print(lcm(A, B))

Submission status: Runtime Error

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

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=int(input())
B=int(input())
x = A * B // gcd(A, B)
print(x)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!

import math

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

a = list(map(int,input().split()))
ans = lcm(a[0], a[1])
print(ans)

Submission status: Runtime Error

Solution code:
import math
import sys
sys.setrecursionlimit(100000)

a, b = map(int, input().split())
gcd = math.gcd(a, b)
if gcd <= 0:
    print(0)
else:
    result = int(a*b / gcd)
    print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
A=int(input())
B=int(input())
x = A * B / gcd(A, B)
print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import math
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    def lcm(a, b):
        g = math.gcd(a, b)
        c = a * b
        return math.ceil(c / g)
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

Solution code:
import math
a,b=[int(i) for i in input().split()]
def lcm(x,y):
    return int((x*y) / math.gcd(x,y))

  
  
m=lcm(a,b) 
print(m)

Submission status: Runtime Error

Solution code:
import numpy as np

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


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

Submission status: Runtime Error

Solution code:
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = max(A,B)
n = min(A,B)
while m % n != 0:
    mt = m // n
    nt = m % n
    m = mt
    n = nt
    gmc = m // n
if gmc != 0:
    print(A*B//gmc)
else:
    print(A*B)

Submission status: Runtime Error

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

l = a * b / math.gcd(a, b)
l = int(l)
print("{}".format(l))

Submission status: Runtime Error

Solution code:
import numpy as np

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

print(int(lcm(a,b)))

Submission status: Runtime Error

Solution code:
import math

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

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

print(int(R))

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:
import sys
input = sys.stdin.readline
import math
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    def lcm(a, b):
        g = math.gcd(a, b)
        c = a * b
        return c//g
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

a, b = map(int, input().split())
def lcm(s, t):
    ans = s * t // (math.gcd(s, t))
    return ans
print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math

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

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

print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math

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

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

print(R)

Submission status: Runtime Error

Solution code:
import math

A,B=map(int,input().split())
g=math.gcd(A,B)

n=int(A*B/g)

print(n)

Submission status: Runtime Error

Solution code:
import math
a,b=[int(i) for i in input().split()]
def lcm1(x,y):
    return (x*y) // math.gcd(x,y)

  
  
m=lcm1(a,b) 
print(m)

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:
# ABC148 C

import math

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

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import math
import numpy as np
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    def lcm(a, b):
        g = math.gcd(a, b)
        c = a * b
        return c//g
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

a, b = map(int, input().split())
#print(a)print(type(a))print(b)print(type(b))
def lcm(s, t):
    ans = s * t // (math.gcd(s, t))
    return ans
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=map(int,input().strip().split())
print(lcm(a, b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
a,b=[int(i) for i in input().split()]
def lcm1(x, y):
    return (x * y) // math.gcd(x, y)

  
  
m=lcm1(a,b) 
print(m)

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(int(lcm(a,b)))

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 sys
input = sys.stdin.readline
import math
import numpy as np
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    def lcm(a, b):
        g = math.gcd(a, b)
        c = a * b
        return c // g
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(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)

  
  
m=lcm(a,b) 
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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)

  
  
m=lcm(a, b)  
print(m)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import math
import numpy as np
def lcm(a, b):
    g = math.gcd(a, b)
    c = a * b
    return c // g
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

print(lcm(A, B))

Submission status: Runtime Error

Solution code:
# import sys
# sys.stdin = open("Test.txt",'r')
# sys.stdout = open("Output.txt",'w')
import math
a,b = (int(x) for x in input().split())
ans = (a*b)//math.gcd(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(int(lcm(a, b)))

Submission status: Runtime Error

Solution code:
def check(a, b):
  return b if a == 0 else check(b%a, a)
n = [int(i) for i in input().split(" ")]
print(int(n[0]*n[1]/check(n[0], n[1])))*

Submission status: Runtime Error

Solution code:
import math

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

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

print(lcm(a,b))

Submission status: Runtime Error

Solution code:
import math

a = input().split()
a = list(map(int, a))
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
print(lcm(a[0],a[1]))

Submission status: Runtime Error

Solution code:

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A<=B:
    if B%A==0:
        print(B)
    else:
        for k in range(2,int(B**(1/2)+2)):
            if A%k==0 and B%k==0:
                A=A/k
                B=B/k
                C=int(A*B*k)
        print(C)
else:
    if A%B==0:
        print(A)
    else:
        for k in range(2,int(A**(1/2)+2)):
            if A%k==0 and B%k==0:
                A=A/k
                B=B/k
                C=int(A*B*k)
        print(C)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import math
import numpy as np
def lcm(a, b):
    return a * b // math.gcd(a, b)
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(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)

m=lcm(a, b)  
#print(m)

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)

m=lcm(a,b)  
#print(m)

Submission status: Runtime Error

Solution code:
a, b =[int(x) for x in input().split()]
import numpy as np
n=a*b
A = np.array(a)
B = np.array(b)
if np.gcd(A, B) == 1:
  print(n)

elif a > b:
  for i in range(a, n+1):
    if (i%a == 0)and(i%b == 0):
      print(i)
      break
else:
  for i in range(b, n+1):
    if (i%a == 0)and(i%b == 0):
      print(i)
      break

Submission status: Runtime Error

Solution code:
import math
li = input().split()	
x=int(li[0])
y=int(li[1])
print((x * y) // math.gcd(x, y))

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
count = 0
position = 0
while position < N:
  for j in range(1,N+1):
    for i in range(position,N):
      if A[i] == j:
        count = count + 1
        break
      else:
        position = position + 1

if count != 0:
    print(N-count)
else:
    print(-1)

Submission status: Runtime Error

Solution code:
from fractions import math
(A, B) = list(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
num=list(map(int,input().split()))
A=num[0]
B=num[1]
print(A*B//math.gcd(A,B))

Submission status: Runtime Error

Solution code:
import numpy as np

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

n=a*b
A = np.array(a)
B = np.array(b)
if np.gcd(A, B) == 1:
  print(n)

elif a > b:
  for i in range(a, n+1):
    if (i%a == 0)and(i%b == 0):
      print(i)
      break
else:
  for i in range(b, n+1):
    if (i%a == 0)and(i%b == 0):
      print(i)
      break

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(int(lcm(a,b)))

Submission status: Runtime Error

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

n=int(A*B/math.gcd(A,B))

print(n)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
m,n=max(a,b),min(m,n)
while m%n!=0:
    m%=n
    m,n=max(m,n),min(m,n)
print(int(a*b/n))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
import math
import numpy as np

def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    """
    print(np.lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

Solution code:
import sys
import math

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

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

main()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys
import itertools#これは色々使える組み込み関数みたいなやつ
import math#数学的計算はこれでいける。普通に0.5乗しても計算可能
#w=input()
i=0
#N=int(input())
A, B=input().split()
A=int(A)
B=int(B)
print(int((A*B)/math.gcd(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)

m=lcm(a, b)  
print(m)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
strings = input().split(' ')
A = int(strings[0])
B = int(strings[1])

i = min(A,B)
m = A
n = B
while max(m,n) % min(n,m) != 0:
    mt = max(m,n) // min(m,n)
    nt = max(m,n) % min(m,n)
    m = mt
    n = nt
    gmc = max(m,n) // min(n,m)

At = A // gmc
Bt = B // gmc
print(gmc * At * Bt)

Submission status: Runtime Error

Solution code:
from fracrions import gcd
def lcm(x, y):
    return (x * y) // gcd(x, y)
 
d = [int(i) for i in input().split()]
 
print(lcm(d[0],d[1]))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
def lcm(a):
    from fractions import gcd
    x = a[0]
    for i in range(1, len(a)):
        x = (x * a[i]) // gcd(x, a[i])
    return x

m = int(input())
n = int(input())
a =  [m, n]
print(lcm(a))

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

Submission status: Runtime Error

Solution code:
import math

input_nums = list(map(int, input().split()))
num1 = input_nums[0]
num2 = input_nums[1]

print(num1 * num2 // math.gcd(num1, num2))

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

s = input().split()
a, b = int(s[0]), int(s[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())
#最小公倍数least common multiple (lcm)を定義する
def lcm(A,B):
    return (A*B)// math.gcd(A, B)

print(lcm(A,B))

Submission status: Runtime Error

Solution code:
import math
(A, B) = list(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())
def func(x, y):
    return (x * y) / int(math.gcd(x, y))

print(int(func(x, y)))

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
x, y = map(int, input().split())
def func(x, y):
    return (x * y) / math.gcd(x, y)

print(int(func(x, y)))

Submission status: Runtime Error

Solution code:
from sys import stdin
import fractions

a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def lcm(x,y):
    return int((x*y)/gcd(x,y))
n=input().split()
a=int(n[0])
b=int(n[1])
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) // 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:
import fractions

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

def least_common_multiple(x,y):
    return int((x * y) / math.gcd(x, y))
    
a,b = map(int,input().split(" "))

print(least_common_multiple(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
num=list(input().split())
A=num[0]
B=num[1]
print(A*B//math.gcd(A,B))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

print(lcm)

Submission status: Runtime Error

Solution code:
#LCMを求めれば良い
a, b = map(int, input().split())

import math

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=input().split(' ')
a=int(n[0]);b=int(n[1])
import sympy
print(sympy.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(int(lcm(a, b)))

Submission status: Runtime Error

Solution code:
from sys import stdin
import math

a = int(stdin.readline().rstrip())
b = int(stdin.readline().rstrip())

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import math
a,b = (int(i) for i in input().split())
print(a * b // math.gcd(a, b))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python
import math

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

(a, b) = [int(e) for e in input().split(" ")][:2]
print(int(lcm(a, 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:
import math
A,B=input().rstrip()
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=[int(i) for i in input().split()]
print(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 = [int(n) for n in input().split()]

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

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a = input("")
b = input("")

A = int(a)
B = int(b)

if (A < B):
    tmb = A
    A = B
    B = tmb

while (A > 0)and (B >0):
    A = A - B
    if (A < B):
        abc = A
        A = B
        B = abc
c = str(A)
d = str(B)
if (A > B):
    GCM=int(c)
elif (A < B):
    GCM=int(d)
P=int(a)*int(b)
lcm=P//GCM
print(str(lcm))

Submission status: Runtime Error

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


from math import gcd

def lcm(x, y):
    return (x * y) // 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:
a, b = [int(i) for i in 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: Runtime Error

Solution code:
a,b=[int(i) for i in input().split()]
import math
print(math.gcd(a, b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b=[int(i) for i in input().split()]
print(math.gcd(a, b))

Submission status: Runtime Error

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

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


#複数入力
n,m=(int(x) for x in input().split())

print(lcm(n,m))

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    return b if a == 0 else gcd(b%a, a)
num = [int(x) for x in input().split(" ")]
print(int(num[0]*num[1]/gcd(num[0], num[1])))

Submission status: Runtime Error

Solution code:
from math import gcd
a,b = map(int,input().split())
def lcm(a,b):
    return a*b//gcd(a,b)
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 = [int(i) for i in input().split()]

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

Submission status: Runtime Error

Solution code:
import fractions

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

Submission status: Runtime Error

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

x = max(a, b)
y = min(a, b)

while x % y != 0:
    z = x % y
    x = y
    y = z

ans = int(a * b / z)

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fractions

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

Submission status: Runtime Error

Solution code:
import math

def least_common_multiple(x,y):
    return (x * y) / math.gcd(x, y)
    
a,b = map(int,input().split(" "))

print(int(least_common_multiple(a,b)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import fraction

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def euclidean(a,b):
    r=a%b
    if r==0:
        return b
    return euclidean(b,r)

Submission status: Runtime Error

Solution code:
l = input().split()
a = int(l[0])
b = int(l[1])

def gcd(ac, bc):
  x = max(ac, bc)
  y = min(ac, bc)

  while x%y != 0:
    z = x%y
    x = y
    y = z
  else:
    return z

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

Submission status: Runtime Error

Solution code:
import math
s, t = input().split()
s = int(s)
t = int(t)
result = s * t / math.gcd(s,t)
print(int(result))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
import sys
sys.setrecursionlimit(200000)
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 = [int(i) for i in input().split()]

print(math.gcd(a, 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:
import math
s, t = input().split()
s = int(s)
t = int(t)
result = s * t // math.gcd(s,t)
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
m = int(input())
n = int(input())

x = max(m, n)
y = min(m, n)
if x % y == 0:
  print(x)
else:
  while x%y!=0:
    z = x % y
    x = y
    y = z
  
print(int(m * n / z))

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

print(int(lcm(a, b)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

def least_common_multiple(x,y):
    return (x * y) / math.gcd(x, y)
    
a,b = map(int,input().split(" "))

print(int(least_common_multiple(a,b)))

Submission status: Runtime Error

Solution code:
import math
from fractions import gcd

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

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

Submission status: Runtime Error

Solution code:
# https://atcoder.jp/contests/abc148/tasks/abc148_c
import math


def main():
    (a, b) = [int(i) for i in input().split(" ")]
    print(int(a * b / math.gcd(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

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

k = math.gcd(a, b)

ans = (a * b) // k

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import math

str = sys.stdin.readline()

a = int(str.split()[0])
b = int(str.split()[1])

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