1027: [编程入门]自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码://思路 1.先求出两个数的最大公约数;//2.利用公式求最小公倍数=两个数的积/最大公约数#include <stdio.h>int main(){ int nu…… 题解列表 2024年03月11日 0 点赞 0 评论 179 浏览 评分:0.0
1027: [编程入门]自定义函数处理最大公约数与最小公倍数法二 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int fun1(int m,int n){ int min,num1; if(m>n){ min=n; …… 题解列表 2024年03月11日 0 点赞 0 评论 194 浏览 评分:0.0
题解 1027: [C语言]自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> #inc…… 题解列表 2024年04月15日 0 点赞 0 评论 130 浏览 评分:0.0
自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:def function(a, b): c = min(a, b) max_GCD = 0 for i in range(1, c + 1)…… 题解列表 2024年04月18日 0 点赞 0 评论 358 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:mun1,mun2=list(map(int,input().split())) max_num=max(mun1,mun2) min_num=min(mun1,…… 题解列表 2024年04月27日 0 点赞 0 评论 155 浏览 评分:0.0
自定义函数处理最大公约数与最小公倍数 摘要:解题思路:题目要求要建函数,所以得知道怎么去建立函数,再考虑如何去求解,对于小白来说,解题的思路就是建立函数——建立主函数——调用函数注意事项:参考代码:#include<stdio.h>int gb…… 题解列表 2024年05月10日 0 点赞 0 评论 229 浏览 评分:0.0
1027 最大公约数与最小公倍数(只求最大公约数即可求解) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gongyueshu(int m,int n){ int max; if(m>n) { for(int i=n;i>=1;i-…… 题解列表 2024年05月14日 0 点赞 0 评论 131 浏览 评分:0.0
编写题解 1027: [编程入门]自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int y(int a,int b) { for(int i=min(a,b);i>…… 题解列表 2024年08月09日 0 点赞 0 评论 319 浏览 评分:0.0
最复杂的解题方法(但比较好理解) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int f1(int a,int b){ int s=0; if(a>=b) s=b; else s=a; wh…… 题解列表 2024年11月21日 0 点赞 0 评论 186 浏览 评分:0.0
普普通通的解题方法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include <math.h>int gys(int a,int b){ if (a%b == 0) return b; else …… 题解列表 2024年11月23日 0 点赞 0 评论 268 浏览 评分:0.0