编写题解 1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> //最大公约数 * 最小公倍数 =两个数相乘; int main(){ int m,n,i=2,x,…… 题解列表 2022年01月21日 0 点赞 0 评论 199 浏览 评分: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
最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){ if(b==0) { return a; } retu…… 题解列表 2022年02月27日 0 点赞 0 评论 140 浏览 评分:0.0
编写题解 1011: [编程入门]最大公约数与最小公倍数--简单解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n; scanf("%d %d",&m,&n); int min = (m<n)?m:n; int …… 题解列表 2022年03月09日 0 点赞 0 评论 133 浏览 评分:0.0
辗转相除法 摘要:```cpp #include using namespace std; int gcd(int a, int b){ return b ? gcd(b, a % b) : a; …… 题解列表 2022年03月15日 0 点赞 0 评论 143 浏览 评分:0.0
最大公约数与最小公倍数 摘要:##最大公约数和最小公倍数 ```c #include int main() { int a,b,t,m,n,i; scanf("%d %d",&a,&b); t=a0;i--){…… 题解列表 2022年03月16日 0 点赞 0 评论 206 浏览 评分:0.0
自己瞎想的 摘要:#include<stdio.h>int main(){ int n,m,max,min; scanf("%d",&n); scanf("%d",&m); max=n>m?n:m; min=n<m?n…… 题解列表 2022年03月19日 0 点赞 0 评论 251 浏览 评分:0.0
编写题解 1011: [编程入门]最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int x,y,a,b,p; cin>>x>>y; for…… 题解列表 2022年03月25日 0 点赞 0 评论 246 浏览 评分:0.0
C语言 先暴力一个再计算找另一个 摘要: #include int main(){ int a,b; int c=0,d=0; scanf("%d %d",&a,&b); in…… 题解列表 2022年03月29日 0 点赞 0 评论 202 浏览 评分:0.0