[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要:```python # coding=utf-8 i=input().split() i.sort() m=int(i[0]) n=int(i[1]) for a in range(1…… 题解列表 2020年06月04日 0 点赞 0 评论 589 浏览 评分:6.0
[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要: def gcd(a, b): if b == 0: return a return gcd(b, a%b) while True: try: a, b = …… 题解列表 2020年03月28日 0 点赞 0 评论 1030 浏览 评分:0.0
[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要: a,b=map(int,input().split()) x=min(a,b) o1=[] o2=[] for i in range(1,x+1): if a%i==0 and …… 题解列表 2020年03月18日 0 点赞 0 评论 561 浏览 评分:9.0
[编程入门]最大公约数与最小公倍数-题解(Python代码)利用列表来求解 摘要:```python a,b=input().split() a,b=int(a),int(b) c=[] d=[] for i in range(1,a+1): if a%i==0…… 题解列表 2020年02月10日 0 点赞 0 评论 1173 浏览 评分:9.0
[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要:将就着看吧 num1=[] m,n=map(int,input().split()) a=min(m,n) for i in range(1,a+1): if m%i==0 and …… 题解列表 2019年11月26日 0 点赞 0 评论 1100 浏览 评分:6.0
[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要:利用辗转相除法求出最大公约数,再将两数的积除以最大公约数得到最小公倍数 ```python def gcd(a, b): if a%b == 0: return b …… 题解列表 2019年11月22日 0 点赞 1 评论 2042 浏览 评分:7.7
[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要:```python def gcd(a,b): if b==0: return a return gcd(b,a%b) a,b=input().split()…… 题解列表 2019年11月20日 0 点赞 0 评论 758 浏览 评分:6.7