二级C语言-公约公倍(最单纯的for循环) 摘要: #include int main(){ int m, n; int k = 0, s = 0; sca…… 题解列表 2022年07月16日 0 点赞 0 评论 254 浏览 评分:9.9
二级C语言-公约公倍 摘要:```cpp #include using namespace std; int main() { int a,b,m,n,r; cin>>m>>n; a=m; …… 题解列表 2022年08月15日 0 点赞 0 评论 582 浏览 评分:9.9
最简便易懂 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int gcd(int a,int b) { if(b==0) return a; return gcd(…… 题解列表 2022年10月13日 0 点赞 0 评论 160 浏览 评分:9.9
公约公倍(c++) 摘要:解题思路:最大公约数好求,最小公倍数=乘积/最大公约数注意事项:参考代码:#include<iostream>using namespace std;int main(){ int m,n,i,…… 题解列表 2022年10月23日 0 点赞 0 评论 212 浏览 评分:9.9
常规思路——辗转相除法 摘要:解题思路:辗转相除法注意事项:接受辗转相除法;熟悉交换两个数的值。参考代码:#include<stdio.h>int main(){ int m,n,a,b,temp; scanf("%d…… 题解列表 2022年11月04日 0 点赞 0 评论 210 浏览 评分:9.9
编写题解 1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>int gys(int a,int b){ if(b==0)return a; else return gys(b,a%b)…… 题解列表 2022年12月05日 0 点赞 0 评论 146 浏览 评分:9.9
1062: 二级C语言-公约公倍 辗转相除法 摘要:解题思路:数学题,把公式带入。注意事项:参考代码:def gcd(x, y): m = max(x, y) n = min(x, y) while m % n: m, n = …… 题解列表 2022年12月29日 0 点赞 0 评论 235 浏览 评分:9.9
二级C语言-公约公倍(水题) 摘要:解题思路:注意事项:参考代码#include <stdio.h>int gcd(int x,int y){ int r; r=x%y; do{ x=y; y=r; r=x%y; }while(r…… 题解列表 2023年01月09日 0 点赞 0 评论 127 浏览 评分:9.9
二级C语言-公约公倍 (用c写的) 简单步骤!!!!! 摘要: #include int gcd(int c,int d) { if(c%d==0) return d; else gcd(d,c%d…… 题解列表 2023年01月17日 0 点赞 0 评论 246 浏览 评分:9.9
1062: 二级C语言-公约公倍 摘要:```cpp #include using namespace std; int main() { int a,b,r,D,M; cin >> a >> b; M…… 题解列表 2023年02月18日 0 点赞 1 评论 337 浏览 评分:9.9