二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;long long a,b;int main(){ cin>>a>>b; for(i…… 题解列表 2022年05月10日 0 点赞 0 评论 166 浏览 评分:0.0
最大公约数和最小公倍数是我最高不清楚的了 摘要:解题思路:注意事项:diyic第一次答案错误,真的两个数输入不一定是在同一行上面所以就需要检查是不是,要用到extend来把所有的输入都能读取到,看了题解终于知道,选了一个自己能理解的方法简化了一下他…… 题解列表 2022年05月13日 1 点赞 0 评论 303 浏览 评分:0.0
1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int get(x,y){ return x%y==0?y:get(y,x%y); } int main() { …… 题解列表 2022年06月21日 0 点赞 0 评论 130 浏览 评分:0.0
编写题解 1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int m = 0, n = 0, i = 1; int x = 0, y = 0; i…… 题解列表 2022年07月30日 0 点赞 0 评论 154 浏览 评分:0.0
公约公倍(辗转相除法) 摘要:解题思路:最大公约数用辗转相除,最小公倍数为两数之积除以最小公倍数注意事项:参考代码:#include<stdio.h>int a(int m,int n){ return (m%n==0)?n…… 题解列表 2022年07月31日 0 点赞 0 评论 108 浏览 评分:0.0
题解 1062: 二级C语言-公约公倍(C) 摘要:解题思路:第三遍了~参考代码:#include<stdio.h> int main(void){ int m,n; int factor,multiple; int check; …… 题解列表 2022年08月09日 0 点赞 0 评论 130 浏览 评分:0.0
辗转相除法与倍数法;用函数法; 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void gcd(int a,int b);void lcm(int a,int b);void swap(int a,int b);i…… 题解列表 2022年09月18日 0 点赞 0 评论 176 浏览 评分:0.0
先这样再那样 摘要:```c #include int gcd(int m,int n){ return (m%n==0)?n:gcd(n,m%n); } int lcm(int m,int n){ …… 题解列表 2022年10月05日 0 点赞 0 评论 197 浏览 评分:0.0
1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include <iostream> using namespace std; int main() { int a = 0, b = 0, c = 0…… 题解列表 2022年10月09日 0 点赞 0 评论 138 浏览 评分:0.0
二级C语言-公约公倍 摘要: #include #include #include #include using namespace std; int main() …… 题解列表 2022年10月14日 0 点赞 0 评论 130 浏览 评分:0.0