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

if A % B == 0 :
  if A > B :
    print(B)
  else:
    print(A)

    exit()

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

a, b = prime_factorize(A), prime_factorize(B)

for i in range(0,len(a)):
  for j in range(0,len(b)):
    if a[i] != j[j] :
      X.append(j)

for i in range(0,len(X)):
  ans = ans / X[i]

Submission status: Runtime Error

Solution code:
a, b = map(int,input().split())
def gcd(a,b):
    x = max(a,b)
    y = min(a,b)
    if x//y == 0:
    while x // y != 0:
        z = x // y
        y = z
    else:
        return z
print(a * b / gcd(a,b))

Submission status: Runtime Error

Solution code:
n = raw_input().split(" ")
i0 = int(n[0]) 
i1 = int(n[1])
if i0 > i1:
  g = i0
  l = i1
else:
  g = i1
  l = i0
  
grem = -111
tt = l
while True:
  r0 = tt % g
  r1 = tt % l
  
  if  r0== 0 and  r1 == 0:
    r = tt 
    break
  else:
    if r0 > r1:
      grem = r1
    else:
      grem = r0
  tt += grem
  if grem == 0:
    tt +=1


  if tt >10:
    break

print(r)

Submission status: Runtime Error

Solution code:
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

Submission status: Runtime Error

Solution code:
num, bricks, count, smash = int(input()), [int(x) for x in input().split(" ")], 1, 0
for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

Submission status: Runtime Error

Solution code:

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

if a > 1 and a < 100000 and b > 1 and b < 100000:
  def sosu(num):
      num2 = num;
      list = [];
      i = 2;
      while i < num:
          if num2%i is 0:
              list.append(i)
              num2 = num2 // i
              if num2 is 1:
                  return list
          else:
              i += 1

  yaku_a = sosu(a)
  yaku_b = sosu(b)

  for i in range(len(yaku_a)):
      if yaku_a[i] in yaku_b:
          yaku_b.remove(yaku_a[i])

  marged = yaku_a + yaku_b

  candy = 1;
  for i in range(len(marged)):
      candy = candy * marged[i];

  print(candy)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

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

if a is not b and a > 1 and a < 100000 and b > 1 and b < 100000:
  def sosu(num):
      num2 = num;
      list = [];
      i = 2;
      while i < num:
          if num2%i is 0:
              list.append(i)
              num2 = num2 // i
              if num2 is 1:
                  return list
          else:
              i += 1

  yaku_a = sosu(a)
  yaku_b = sosu(b)

  for i in range(len(yaku_a)):
      if yaku_a[i] in yaku_b:
          yaku_b.remove(yaku_a[i])

  marged = yaku_a + yaku_b

  candy = 1;
  for i in range(len(marged)):
      candy = candy * marged[i];

  print(candy)

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:

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

if a is not b:
  def sosu(num):
      num2 = num;
      list = [];
      i = 2;
      while i < num:
          if num2%i is 0:
              list.append(i)
              num2 = num2 // i
              if num2 is 1:
                  return list
          else:
              i += 1

  yaku_a = sosu(a)
  yaku_b = sosu(b)

  for i in range(len(yaku_a)):
      if yaku_a[i] in yaku_b:
          yaku_b.remove(yaku_a[i])

  marged = yaku_a + yaku_b

  candy = 1;
  for i in range(len(marged)):
      candy = candy * marged[i];

  print(candy)

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

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

k = gcd(a,b)

print(a*b/k)

Submission status: Runtime Error

Solution code:
def gcd(a, b):
    return b if a == 0 else gcd(b%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())

k = gcd(a,b)

print(a*b//k)

Submission status: Runtime Error

Solution code:

a, b = map(int, input().split())
  
def sosu(num):
	num2 = num;
	list = [];
	i = 2;
	while i < num:
		if num2%i is 0:
			list.append(i)
			num2 = num2 // i
			if num2 is 1:
				return list
		else:
			i += 1

yaku_a = sosu(a)
yaku_b = sosu(b)

for i in range(len(yaku_a)):
	if yaku_a[i] in yaku_b:
		yaku_b.remove(yaku_a[i])

marged = yaku_a + yaku_b

candy = 1;
for i in range(len(marged)):
	candy = candy * marged[i];
    
print(candy)

Submission status: Runtime Error

Solution code:
import java.util.Scanner;

public class LCM {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        long m = in.nextLong();
        long n = in.nextLong();
        System.out.printf("%d%n", m, n, lcm(m, n));
    }
    
    private static long gcd(long m, long n) {
        if(m < n) return gcd(n, m);
        if(n == 0) return m;
        return gcd(n, m % n);
    }
    
    private static long lcm(long m, long n) {
        return m * n / gcd(m, n);
    }
}

Submission status: Runtime Error

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

input_nums = input().split(" ")
input_num_a = int(input_nums[0])
input_num_b = int(input_nums[1])

result = int(input_num_a * input_num_b / math.gcd(input_num_a, input_num_b))
print(result)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from math import gcd

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

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

print(k)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=input().split()
A=int(A)
B=int(B)
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

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 
x,y=map(int,input().split())
a=0
b=0
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().split()
 
print(math.gcd(int(A),int(B)))

Submission status: Runtime Error

Solution code:
joukyuukokuminndomo=input().split(' ')
joukyuukokuminn2=int(joukyuukokuminndomo[0])
simojimo2=int(joukyuukokuminndomo[1])
joukyuukokuminn=joukyuukokuminn2
simojimo=simojimo2

while joukyuukokuminn%simojimo!=0:
  if joukyuukokuminn>simojimo:
    joukyuukokuminn=joukyuukokuminn-simojimo
  elif joukyuukokuminn<simojimo:
    simojimo=simojimo-joukyuukokuminn

if joukyuukokuminn>simojimo:
  print(joukyuukokuminn2*simojinn2/simojimo)
elif joukyuukokuminn<simojimo:
  print(joukyuukokuminn2*simojinn2/joukyuukokuminn)

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)
else:
  for i in range(1, n+1):
      if i % a == 0 and i % b == 0 :
          print(i)
          break

Submission status: Runtime Error

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

print(math.gcd(A,B))

Submission status: Runtime Error

Solution code:
from sys import stdin
import math



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

a,b = stdin.readline().rstrip().split()


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

Submission status: Runtime Error

Solution code:
import math

a = list(map(int , input().split()))
A = a[0]
B = a[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())
def lcm(a, b):
    return (a * b) // math.gcd(a, b)
print(lcm(a, b))

Submission status: Runtime Error

Solution code:
//最小公倍数を求めるプログラム

value = input().split()
value_1 = [int(n) for n in value]

sea = value_1[0]
mou = value_1[1]

while sea != mou:
    if sea<mou:
        sea = sea+value_1[0]
    else:
        mou = mou+value_1[1]

print(sea)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
num = int(input())
bricks = [int(x) for x in input().split(" ")]
count = 1
smash = 0

for x in bricks:
    if count == x: count += 1
    else: smash += 1
print(smash if smash != len(bricks) else 0 if len(bricks) == 1 else -1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n = raw_input().split(" ")
i0 = int(n[0])
i1 = int(n[1])
if i0 > i1:
  g = i0
  l = i1
else:
  g = i1
  l = i0

for i in range(l,17000000):
  if  i % g== 0 and  i % l == 0:
    r = i 
    break
    
print(r)

Submission status: Runtime Error

Solution code:
from math import gcd
a,b=input().strip().split(" ")
a,b=[int(a),int(b)]
c=gcd(a,b)
d=a*b
ans=d//c
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

if __name__ == "__main__":
    A, B = input().split()
    A = int(A)
    B = int(B)
    ret = (A * B) // math.gcd(A, B)
    print(ret)

Submission status: Runtime Error

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

print(str(x))

Submission status: Runtime Error

Solution code:
import math

if __name__ == "__main__":
    A, B = input().split()
    A = int(A)
    B = int(B)
    print((A * B) // math.gcd(A, B))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(str(x))

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

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A//B==0:
  print(A*B//2)
elif A*B//3==0:
  print(A*B//3)
elif A*B//5==0:
  print(A*B//5)
elif A*B//7==0:
  print(A*B//7)
elif A*//11==0:
  print(A*B//11)
elif A*B//13==0:
  print(A*B//13)
else:
  print(A*B)

Submission status: Runtime Error

Solution code:
A,B=map(int,input().split())
if A//B==0:
  print(A*B//2)
elif A*B//3==0:
  print(A*B//3)
elif elif A*B//5==0:
  print(A*B//5)
elif A*B//7==0:
  print(A*B//7)
elif elif A*B//11==0:
  print(A*B//11)
elif elif A*B//13==0:
  print(A*B//13)
else:
  print(A*B)

Submission status: Runtime Error

Solution code:
import math


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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(x)

Submission status: Runtime Error

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
	else:
      	    return z

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

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

print(lcm(AB[0],AB[1]))

Submission status: Runtime Error

Solution code:
import math


def main():
    a, b = map(int, input().split())
    ans = "{:.0f}".format(a * b / math.gcd(a, b))
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
X = input().split(" ")
A = int(X[0])
B = int(X[1])
C = A * B
D = fractions.gcd(A,B)
print(round(C / D))

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:
ndef 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 math


def main():
    a, b = map(int, input().split())
    ans = "{:.0f}".format(a * b / math.gcd(a, b))
    print(ans)


if __name__ == '__main__':
    main()

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

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

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

Submission status: Runtime Error

Solution code:
import math
X = input().split(" ")
A = int(X[0])
B = int(X[1])
C = A * B
D = math.gcd(A,B)
print(round(C / D))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

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

import math

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

Submission status: Runtime Error

Solution code:
# coding: utf-8

import math

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

Submission status: Runtime Error

Solution code:
import math
X = input().split(" ")
A = int(X[0])
B = int(X[1])
C = A * B
D = math.gcd(A,B)
print(C // D)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

# 最小公倍数を計算すれば良い。
def gcd(x,y):
  if a < b:
    c = a
  elif a > b:
    c = b
  else:
    c = a
  pro = 1
  for i in range(0,c):
    X = x
    Y = y
    while x % i == 0 and y % i == 0:
      pro = pro * i
      X = X // i
      Y = Y // i
  return pro

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
import math

def solve(A: int, B: int):
    print( (A*B) // math.gcd(A, B))
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math

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

print((AB[0]*AB[1])//math.gcd(AB[0],AB[1]))

Submission status: Runtime Error

Solution code:
import math
a, b = map(int,stdin.readline().split())
gcd = math.gcd(a,b)
print((a*b)//math.gcd(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 int((x * y) / math.gcd(x, y))


print(lcm(a, b))

Submission status: Runtime Error

Solution code:
import math

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

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 sys import stdin
import math
a, b = map(int,stdin.readline().split())
gcd = math.gcd(a,b)
print((a*b)//math.gcd(a,b))

Submission status: Runtime Error

Solution code:
import math

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

c, d = map(int, input().split())

print(lcm(c, d))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

print(lcm(a[0], a[1]))

Submission status: Runtime Error

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

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:
# coding: utf-8

import math

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

def lcm(x, y):
    return int((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()]
from math import *
#def lcm(x,y):
    #return (x*y) // math.gcd(x,y)

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

Submission status: Runtime Error

Solution code:

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

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

Submission status: Runtime Error

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

import numpy as np
import sys
n=a*b

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

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

Submission status: Runtime Error

Solution code:
joukyuukokuminn=input().split(' ')[0]
simojimo=input().split(' ')[1]

while True:
  if(int(joukyuukokuminn)%int(simojimo)=0):
    break
  def(int(joukyuukokuminn)%int(simojimo))

def(a,b):
  if a>b:
    a=a-b
  elif a<b:
    b=b-a

Submission status: Runtime Error

Solution code:
import math

s = input().split()
a, b = int(s[0]), int(s[1])


def lcm(x, y):
    return int((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:
from fractions import gcd


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

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

print(lcm(a, b))

Submission status: Runtime Error

Solution code:

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

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

Submission status: Runtime Error

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

maxi = A[0]
for  i in range(N):
    if A[i] >= maxi:
        maxi = A[i]
    else:
        maxi = maxi
        
count = 0
position = 0
while position < N:
  for j in range(1,maxi+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 math import *
a,b=[int(i) for i in input().split()]
#def lcm(x,y):
    #return (x*y) // math.gcd(x,y)

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

Submission status: Runtime Error

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

print(lcm(p[0], p[1]))

Submission status: Runtime Error

Solution code:
a = int(input())
b = int(input())
if a<b:
    print (a)
elif b<a:
    print(b)
else:
    print(a)

Submission status: Runtime Error

Solution code:
n,m = int(input()), int(input())
i =1
while true:
  if i%n == 0 and i%m == 0:
    print(i)
    break
  i+= 1

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=str(i)
elif i>j:
  p_1=i
  p_2=j
while a=="":
  am=p_1%p_2
  if am==0:
    break
  amari.append(am)
  p_1=p_2
  p_2=am
a=j*i/amari[-1]
print(str(a))

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:
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
if __name__ == '__main__':
    # test
    A, B = map(int, input().rstrip().split())
    print(math.ceil(A * B / math.gcd(A, B)))

Submission status: Runtime Error

Solution code:
A,B = (int(x) for x in input().split())
a=A//2
d=1
s=0
d=int(d)
for i in range(a): 
  if A%d==0 and B%d==0:
    s=d
  d+=1
if s==1:
  print(int(A*B))
else:
  print(int(A*(B/s)))

Submission status: Runtime Error

Solution code:
N=int(input())
A=list(map(int,input().split()))
max = A[0]
for  i in range(N):
    if A[i] >= max:
        max = A[i]
    else:
        max = max
        
count = 0
position = 0
while position < N:
  for j in range(1,max):
    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:
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:
l=list(map(int,input().split()))
a = l[0]
b = l[1]
n = 0
for i in range(1, min(a, b)+1): 
    if a%i==b%i==0: 
        n+=1
n+=1
print(int((a/n)*(b/n))

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
    """
    print(math.ceil(A * B / math.gcd(A, B)))
if __name__ == '__main__':
    # test
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

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

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

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)
      quit()
else:
  for i in range(b, n+1):
    if (i%a == 0)and(i%b == 0):
      print(i)
      quit()

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=str(i)
elif i>j:
  p_1=i
  p_2=j
while a=="":
  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 sys
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:
##C
a,b = map(int,input().split())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

aa = (prime_factorize(a))
bb = (prime_factorize(b))

def f(a1, b1):
  result = []
  for i in sorted(set(a1 + b1)):
    aa1 = [x for x in a1 if x == i]
    bb1 = [x for x in b1 if x == i]
    result += aa1 if len(aa1) < len(bb1) else bb1
  return result

from operator import mul
from functools import reduce

aabb = reduce(mul,f(aa,bb))

print(int(a*b/aabb))

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)

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

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:
# -*- coding: utf-8 -*-
import(math)

S, T=map(int, input().split())
def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(S, T))

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
    """
    print(A * B // math.gcd(A, B))
if __name__ == '__main__':
    # test
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)

Submission status: Runtime Error

Solution code:
A,B = (int(x) for x in input().split())
a=A//2
d=1
s=0
d=int(d)
for i in range(a): 
  if A%d==0 and B%d==0:
    s=d
  d+=1
print(int(A*(B/s)))

Submission status: Runtime Error

Solution code:
import fractions
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 sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
#+++++
import math
a,b = map(int, input().split())
#n = int(input().strip())
#s,t=input().split(' ')
ans = a*b//math.gcd(a,b)
print(ans)

Submission status: Runtime Error

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

def lcm(a, b):
    y = a*b / math.gcd(a, b)
    return int(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 math.ceil(c / g)
    print(A * B // math.gcd(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)

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

Submission status: Runtime Error

Solution code:
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 = input()
b = input()
c = a+b 
print(c)

Submission status: Runtime Error

Solution code:
a, b = input().split()
complete = a * b;
tmp = complete
for i in range(1, min(a, b) + 1):
    tmp /= i
    if tmp % b == 0 and tmp % a == 0:
        complete = tmp

print(complete)

Submission status: Runtime Error

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

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

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

print(func_ABC148(N[0], N[1]))