Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
87175 | 丁俊杰 | 最大公约数和最小公倍数 | Python3 | Accepted | 34 MS | 3788 KB | 312 | 2024-08-04 16:00:12 |
import math def max_gongyueshu(a,b): return math.gcd(a,b) def min_gongbeishu(a,b): c=min(a,b) m=c while m>=c: if m%a==0 and m%b==0: print(m) break m+=c a,b=map(int,input().split()) print(max_gongyueshu(a,b),end=" ") min_gongbeishu(a,b)