牛客华为机试HJ108
作者:互联网
1. 题目描述
2. Solution
import sys
if sys.platform != "linux":
sys.stdin = open("input/HJ108.txt")
def gcd(a, b):
return a if b == 0 else gcd(b, a % b)
def lcm(a, b):
return a // gcd(a, b) * b
for line in sys.stdin:
a, b = map(int, line.strip().split())
print(lcm(a, b))
标签:return,gcd,sys,牛客,HJ108,机试,line,lcm 来源: https://www.cnblogs.com/junstat/p/16181419.html