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:
from sys import stdin
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
import math


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


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


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


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


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


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


def si(): return stdin.readline()


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

Submission status: Runtime Error

Solution code:
from sys import stdin
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from math import gcd


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


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


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


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


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


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


def si(): return stdin.readline()


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

Submission status: Runtime Error

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

if gcd !=1:
    left = 1
    right = 10**5
    while right -left > 1:
        m = (right+left) // 2 
        if  gcd * m < a * b:
            left = m
        else:
            right = m

    print(right)

else:
    print(a*b)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B = list(map(int,input().split()))
for i in range():
  if i%A == 0 and i%B == 0:
    ans = i
  else:
    i += 0
print(ans)

Submission status: Runtime Error

Solution code:
A,B = list(map(int,input().split()))
list_ans = []
for i in range():
  if i%A == 0 and i%B == 0:
    ans = i
  else:
    i += 0
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy

def euclidean_algorithm(a, b):
    if a < b:
        tmp = b
        b = a
        a = tmp

    ｑ = a // b
    r = a % b
    while r != 0:
        a = b
        b = q
        q = a // b
        r = a % b
    
    return b


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

    # print(numpy.lcm(a, b)) # AtCoderでは使用不可

    #ユークリッド互除法(最大公約数)
    gcd = euclidean_algorithm(a, b)
 
    # 最小公倍数
    lcm = (a*b)//gcd
    print(lcm)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
def euclidean_algorithm(a, b):
    if a < b:
        tmp = b
        b = a
        a = tmp

    ｑ = a // b
    r = a % b
    while r != 0:
        a = b
        b = q
        q = a // b
        r = a % b
    
    return b


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

    #ユークリッド互除法(最大公約数)
    gcd = euclidean_algorithm(a, b)
    print(2)

    # 最小公倍数
    lcm = (a*b)//gcd
    print(lcm)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
# C - Snack
import numpy as n

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

print(res)

Submission status: Runtime Error

Solution code:
import math as m

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

print(res)

Submission status: Runtime Error

Solution code:
# C - Snack
import math as m

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

print(l)

Submission status: Runtime Error

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

N = input().split()
N = [int(i) for i in N]
print(lcm(N[0],N[1]))

Submission status: Runtime Error

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

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 numpy

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

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

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

x,y = map(int,input().split())

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

print(lcm(x,y))

Submission status: Runtime Error

Solution code:
import numpy

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

lcm = int(a * b / numpy.gcd(a, b))
print(lcm)

Submission status: Runtime Error

Solution code:
import numpy

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

lcm = int(a * b / numpy.gcd(a, b))
print(lcm)

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

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

print(lcm(A, B))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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


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


print(get_lcm(A, B))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

# 最小公約数
gcd = math.gcd(A,B)
# 最小公倍数
lcm = int(A*B/gcd)
print(lcm)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

def lcm(a, b):
    return abs(a*b) // math.gcd(a, b)
  
a, b = [int(x) for x in input().split()]
print(lcm(a,b))

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
import numpy as np

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

ans = np.lcm(a,b)

print(int(ans))

Submission status: Runtime Error

Solution code:
#AtCoder
import math
A, B = input().split()

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

print(lcm(int(A), int(B)))

Submission status: Runtime Error

Solution code:
import numpy as np

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

ans = np.lcm(a,b)

print(int(ans))

Submission status: Runtime Error

Solution code:
import numpy as np

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

ans = np.lcm(a,b)

print(ans)

Submission status: Runtime Error

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

print(np.lcm(A,B))

Submission status: Runtime Error

Solution code:
import math

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

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

print(lcm(a, b))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b = map(int,input().split())
#最大公約数
def gcd(a,b):#a<=b
    while b != 0:
        a = b
        b = b % a
    return a
#最小公約数
def lcm(a,b):
    return a*b / gcd(a,b)

print(lem(a,b))

Submission status: Runtime Error

Solution code:
a,b = (int(i) for i in 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:
n = int(input())
nums = map(int, input().split())

start_num = 1
result_list = []
for num in nums:
    if num == start_num:
        result_list.append(num)
        start_num += 1

if len(result_list) == 0:
    print(-1)
else:
    print(n - len(result_list))

Submission status: Runtime Error

Solution code:
import math

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

    answer = least_common_multiple(A, B)    
    print(answer)

def least_common_multiple(a, b):
    if b > a:
        a, b = b, a
    
    ab = a*b

    while (a%b) != 0
        a, b = b, a%b

    return int(ab/b)

if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

Solution code:
import math

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

    answer = least_common_multiple(A, B)
    #answer = greatest_common_divisor(A, B)

    print(answer)
    

def trial_division(n):
    prime_factors = []
    if n <= 2:
        prime_factors.append(1)
        if n != 1:
            prime_factors.append(n)
        return prime_factors
    for i in range(1, math.ceil(int(n/2))):
        if (n%i) == 0:
            prime_factors.append(i)
    prime_factors.append(n)
    return prime_factors

def greatest_common_divisor(a, b):
    a_list = trial_division(a)
    b_list = trial_division(b)
        a_b_and_list = set(a_list) & set(b_list)
    gcd = 1
    if a_b_and_list:
        for i in a_b_and_list:
            gcd = gcd * i
    return gcd

# using Euclidean algorithm
def least_common_multiple(a, b):
    gcd = greatest_common_divisor(a, b)
    lcm = int((a*b) / gcd)
    return lcm

if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
from math import gcd
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

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

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

Submission status: Runtime Error

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

from math import gcd

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
AB = []
for _ in range(N):
    AB.append([int(i) for i in input().split()])
colors = 10**6+2
E = [0] * colors
for ab in AB:
    E[ab[0]] += 1
    E[ab[1]+1] -= 1
max_E = 0
for c in range(1,10**6 + 1):
    E[c] = E[c-1] + E[c]
    if E[c] > max_E:
        max_E = E[c]
print(max(E))

Submission status: Runtime Error

Solution code:
A = int(input())
B = int(input())
C = 1
delta = 0.00000001
while( C < B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)

Submission status: Runtime Error

Solution code:
C = 1
delta = 0.00000001
while( C >= B ):
  if C*A % B < delta:
    break
  C+=1
  
print(C*A)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys
from math import gcd

lines = sys.stdin.readlines()

a, b = map(int, lines[0].split())

x = gcd(a, b)

print(x * (a//x) * (b//x))

Submission status: Runtime Error

Solution code:
import sys
from math import gcd

lines = sys.readlines()

a, b = map(int, lines[0].split())

x = gcd(a, b)

print(x * (a//x) * (b//x))

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

def gcd(a,b):
    return math.gcd(a,b)

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

print(lcm(A,B))

Submission status: Runtime Error

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

def gcd(a,b):
    return m.gcd(a,b)

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

print(lcm(A,B))

Submission status: Runtime Error

Solution code:
from math import gcd

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

# output
print(int(a*b/gcd(a, b)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
from sys import stdin
import sys
##  input functions for me
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def rip(sep = ''):
    if sep == '' :
        return map(int, input().split()) 
    else: return map(int, input().split(sep))
def ria(sep = ''): 
    return list(rip(sep))
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##
import math
def main():
    A, B = rip()
    g = math.gcd(A, B)
    print(A // g * B)
    

if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math
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(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 = map(int, input().split(" "))

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

print(lcm(A, B))

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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

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

print(lcm(A, B))

Submission status: Runtime Error

Solution code:
# -*- coding:utf-8 -*-
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:
'''input
123 456
'''
# A coding delight
from sys import stdin
from collections import defaultdict
from math import gcd

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

# main starts
print(gcd(12, 2))
a, b = list(map(int, stdin.readline().split()))

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

Submission status: Runtime Error

Solution code:
'''input
123 456
'''
# A coding delight
from sys import stdin
from collections import defaultdict
from math import gcd


# main starts
a, b = list(map(int, stdin.readline().split()))

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

Submission status: Runtime Error

Solution code:
'''input
2
ip cc
'''
# A coding delight
from sys import stdin
from collections import defaultdict
from math import gcd


# main starts
a, b = list(map(int, stdin.readline().split()))

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

Submission status: Runtime Error

Solution code:

# Beginners Contest (C)

import sys
sys.setrecursionlimit(10**6)

# 約数に分解
def calc_divisor(n, div_dic = None):
	if n == 1: return div_dic
	# 初回呼び出し時の初期化
	if div_dic is None: div_dic = {}
	for i in range(n):
		# 1を除く
		if (i+1) == 1: continue
		# 約数の場合
		if n%(i+1) == 0:
			if (i+1) not in div_dic: div_dic[i+1] = 0
			div_dic[i+1] += 1
			return calc_divisor(n//(i+1), div_dic)

# 入力取得
a,b = [int(e) for e in input().split(" ")]

# 約数に分解
div_dic_a = calc_divisor(a)
div_dic_b = calc_divisor(b)

# 約数の和集合を計算
div_ls = list(div_dic_a) + list(div_dic_b)
div_ls = list({k: 1 for k in div_ls})
div_dic = {k:div_dic_a[k] if div_dic_a.get(k,0) > div_dic_b.get(k,0) else div_dic_b[k] for k in div_ls}
# print(div_dic)

# 最小公約数を計算
ans = 1
for k in div_dic:
	ans *= k ** div_dic[k]

print(ans)

Submission status: Runtime Error

Solution code:

# Beginners Contest (C)

import sys

# 約数に分解
def calc_divisor(n, div_dic = None):
	if n == 1: return div_dic
	# 初回呼び出し時の初期化
	if div_dic is None: div_dic = {}
	for i in range(n):
		# 1を除く
		if (i+1) == 1: continue
		# 約数の場合
		if n%(i+1) == 0:
			if (i+1) not in div_dic: div_dic[i+1] = 0
			div_dic[i+1] += 1
			return calc_divisor(n//(i+1), div_dic)

# 入力取得
a,b = [int(e) for e in input().split(" ")]

# 約数に分解
div_dic_a = calc_divisor(a)
div_dic_b = calc_divisor(b)

# 約数の和集合を計算
div_ls = list(div_dic_a) + list(div_dic_b)
div_ls = list({k: 1 for k in div_ls})
div_dic = {k:div_dic_a[k] if div_dic_a.get(k,0) > div_dic_b.get(k,0) else div_dic_b[k] for k in div_ls}
# print(div_dic)

# 最小公約数を計算
ans = 1
for k in div_dic:
	ans *= k ** div_dic[k]

print(ans)

Submission status: Runtime Error

Solution code:
# Snack
from collections import deque
import numpy as np
import math


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

# solve
# -----------------
# 約数列挙
def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = deque()
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)

        return list(divisor_list)
# -----------------

div_A = make_divisor_list(A)
div_B = make_divisor_list(B)

for b in [b for b in div_B if b not in div_A]:
    if A * b % B == 0:
        res = A * b
        break

# output
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

class Solution:
    def solve(self, a: int, b: int) -> int:

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


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(a, b))

Submission status: Runtime Error

Solution code:
import math


class Solution:
    def solve(self, a: int, b: int) -> int:

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


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(a, b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
from sys import stdin
import math

# A = int(stdin.readline().rstrip())
A, B = [int(x) for x in stdin.readline().rstrip().split()]
# print(A, B)

if A < B:
    A, B = B, A

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

Submission status: Runtime Error

Solution code:
from sys import stdin
import math

# A = int(stdin.readline().rstrip())
A, B = [int(x) for x in stdin.readline().rstrip().split()]
# print(A, B)

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

Submission status: Runtime Error

Solution code:
import sys
a, b = input().split()

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

Adiv = A
Bdiv = B
k = 0




for i in reversed(range(min([A, B]))):
    j = i+1
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
    else:
        break

res = A * B / k
print(int(res))

Submission status: Runtime Error

Solution code:
import sys
a, b = input().split()

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

Adiv = A
Bdiv = B
k = 0

n = int(10000)
primeN = []
for i in range(2, n):
    for j in range(2, i+1):
        if i % j == 0:
            if i == j:
                primeN.append(i)
            else:
                break



for i in range(min([A, B])):
    j = primeN[i]
    if Adiv % j == 0 and Bdiv % j == 0:
        k = j
    else:
        break

res = A * B / k
print(int(res))

Submission status: Runtime Error

Solution code:
from sys import stdin
import math

A, B = [int(x) for x in stdin.readline().rstrip().split()]


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


print(lcm(A, B))

Submission status: Runtime Error

Solution code:
from sys import stdin
import math

# A = int(stdin.readline().rstrip())
A, B = [int(x) for x in stdin.readline().rstrip().split()]
# print(A, B)


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 = list(map(int, input().split()))

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

print(ans)

Submission status: Runtime Error

Solution code:
import fraction

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

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

Submission status: Runtime Error

Solution code:
import math

A, B = input().split()

A = int(A)
B = int(B)


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

print(lcm(A, B))