[编程入门]最大公约数与最小公倍数 摘要:解题思路:最大公约数a:满足 、m%a=0 and n%a=0.最小公倍数b:m*n/最大公约数.注意事项:b是一个大于或者等于m、n其中的最大整数的整数,它是m、n的整数倍。参考代码:a,b=map…… 题解列表 2023年03月18日 0 点赞 0 评论 157 浏览 评分:0.0
T1011最大公约数和最小公倍数 摘要:解题思路:注意事项:参考代码:#(method 1th:)a,b=map(int ,input().strip().split())def gcd(a,b): if b==0…… 题解列表 2025年05月02日 0 点赞 0 评论 232 浏览 评分:0.0
编写题解 1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:用列表很方便参考代码:a,b=map(int,input().split()) lis1=[] lis2=[] def f1(x,y): for i in range(1,x…… 题解列表 2023年03月29日 0 点赞 0 评论 148 浏览 评分:0.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 评论 1005 浏览 评分:0.0
递归实现python 递归 摘要:def max(a,b): r = a % b while r != 0: a = b b =&n 题解列表 2024年06月27日 1 点赞 0 评论 336 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:mun1,mun2=list(map(int,input().split())) max_num=max(mun1,mun2) min_num=min(mun1,mu…… 题解列表 2024年04月27日 0 点赞 0 评论 308 浏览 评分:0.0
【入门编程】最大公因数与最小公倍数-题解(Python代码0 摘要:解题思路:注意事项:参考代码:a, b = map(int, input().split()) # !!!!!!!!!!!!!!!!max_n = max(a, b)min_n = min(a, …… 题解列表 2021年12月21日 0 点赞 0 评论 287 浏览 评分:0.0
1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:注意事项:最小公倍数=两数之积/最大公因数参考代码:列表a, b = map(int,input().split())l = []s = []for i in range(1, min(a,…… 题解列表 2024年01月09日 0 点赞 0 评论 187 浏览 评分:0.0
[编程入门]最大公约数与最小公倍数 摘要:```python def gcd(a, b): return a if b == 0 else gcd(b,a%b) a,b = map(int,input().split()) …… 题解列表 2022年01月22日 0 点赞 0 评论 251 浏览 评分:0.0
编写题解 1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:其中有为最大公因数,最小公倍数的先讨论;eg 6 2然后是找最小数的因数再找共同的因数注意事项:参考代码:def f(a,b): yinshu=[] gys=[] q=0 …… 题解列表 2022年02月07日 0 点赞 0 评论 252 浏览 评分:0.0