编写题解 1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gcd(int a,int b){ if(b==0) { return a; } retu…… 题解列表 2023年08月15日 0 点赞 0 评论 200 浏览 评分:0.0
知道有枚举法,相减法,辗转相除法 摘要:1.枚举法 #include <stdio.h> int main() { int a,b,l=0,h; scanf("%d%d",&a,&b); for (int…… 题解列表 2023年08月23日 0 点赞 0 评论 85 浏览 评分:0.0
最大公约数最小公倍数 摘要:解题思路:最大公约数肯定小于两数中较小的一个,最小公倍数肯定大于两数中较大的一个参考代码:#include<bits/stdc++.h> using namespace std; int main…… 题解列表 2023年09月03日 0 点赞 0 评论 156 浏览 评分:0.0
二级C语言-公约公倍 摘要: import java.util.Scanner; public class Main { public static void main(String[] args) { S…… 题解列表 2023年09月20日 0 点赞 0 评论 139 浏览 评分:0.0
求最大公约数最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,m,n,i,j; scanf("%d %d",&a,&b); m=a<b?b:…… 题解列表 2023年11月12日 0 点赞 0 评论 101 浏览 评分:0.0
二次C语言——公约公倍 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m, n,q, t; scanf_s("%d%d", &m, &n); q = m * n; if (m…… 题解列表 2023年12月11日 0 点赞 0 评论 119 浏览 评分:0.0
1062: 二级C语言-公约公倍 摘要:```python c=list(map(int,input().split())) if(len(c))…… 题解列表 2023年12月20日 1 点赞 0 评论 168 浏览 评分:0.0
运用移位运算将更相减损术与移位结合(stein算法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int gcd(int a,int b){ if(a<b){ a=a^b; b=a^b; …… 题解列表 2023年12月28日 0 点赞 0 评论 71 浏览 评分:0.0
1062: 二级C语言-公约公倍 摘要:解题思路:注意事项:注意两个数据是一次输入还是分两次输入参考代码:a = list(map(int, input().split()))if len(a) < 2: a.append(int(…… 题解列表 2024年01月15日 0 点赞 0 评论 199 浏览 评分:0.0
二级C语言-公约公倍 摘要:解题思路:参考链接:用更相减损术求解最大公约数与最小公倍数-Dotcpp编程社区注意事项:参考代码:#include<iostream>using namespace std;int temp;//定…… 题解列表 2024年01月30日 0 点赞 0 评论 189 浏览 评分:0.0