B27 - Calculate LCM
https://atcoder.jp/contests/tessoku-book/tasks/tessoku_book_cz
提出
code: python
def gcd(a, b):
while a >= 1 and b >= 1:
if a >= b:
a = a % b
else:
b = b % a
if a >= 1:
return a
return b
a, b = map(int, input().split())
print(a*b // gcd(a, b))
解答