Python3 题解 | #小乐乐与欧几里得#
小乐乐与欧几里得
http://www.nowcoder.com/practice/da13e0cf321e4df9acd0fdf0a433cbb0
#python3题解#
def getInnerNum(a, b):
return getInnerNum(b, a % b) if b else a
def getOuterNum(a, b, innerNum):
return a // innerNum * b
x, y = map(int, input().split())
innerNum = getInnerNum(min(x,y), max(x,y))
outerNum = getOuterNum(x, y, innerNum)
print(innerNum + outerNum)