暴力求解最大公约数,但算式求解最小公倍数 摘要:解题思路:注意事项:最小公倍数使用了最大公约数来计算参考代码:import java.util.Scanner; public class Main { public static void…… 题解列表 2024年02月27日 0 点赞 0 评论 237 浏览 评分:0.0
C语言-公约公倍 摘要:解题思路:最小公倍数易求,最大公约数难求,要用递归,为避免用递归的麻烦,直接先求最小公倍数,再通过最小公倍数与最大公约数之积=输入的两数乘积得出最大公约数注意事项:参考代码:#include<stdi…… 题解列表 2024年02月29日 0 点赞 0 评论 148 浏览 评分:0.0
最大公约数最小公倍数 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args) {…… 题解列表 2024年03月21日 0 点赞 0 评论 217 浏览 评分:0.0
编写题解 1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:o = input().split() if len(o) >= 2: m, n = int(o[0]), int(o[1]) min = min(…… 题解列表 2024年04月16日 0 点赞 0 评论 177 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):…… 题解列表 2024年04月27日 0 点赞 0 评论 136 浏览 评分:0.0
1062最大公约与最小公倍 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gongyueshu(int m,int n){ if(m>n) { for(int i=n;i>=1;i--) { …… 题解列表 2024年05月25日 0 点赞 0 评论 158 浏览 评分:0.0
1062: 二级C语言-公约公倍 暴力枚举 摘要:```c #include int main() { int n, m, temp1,temp2; scanf("%d %d", &n, &m); if (n > …… 题解列表 2024年08月05日 0 点赞 0 评论 142 浏览 评分:0.0
小卡拉米的示例 摘要:解题思路:注意事项:仔细一点就好了参考代码:#include<stdio.h>int main(){ int a,b; scanf("%d %d",&a,&b); int d; for(int i =…… 题解列表 2024年10月20日 0 点赞 0 评论 196 浏览 评分:0.0
1062:简单易懂解法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int m,n,s; scanf("%d%d",&m,&n); s=m; while(m%s!=0||n%s!…… 题解列表 2024年12月29日 0 点赞 0 评论 320 浏览 评分:0.0
欧几里得算法-------------------------------------- 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int gcd(int a, int b){ retur…… 题解列表 2025年03月21日 0 点赞 0 评论 76 浏览 评分:0.0