【编程入门】自定义函数处理最大公约数与最小公倍数 摘要:解题思路: 求最大公约数利用辗转相除法(欧几里得算法),求最小公倍数利用公式 lcm = (x * y) / gcd(x, y)注意事项: 理解辗转相除法的本质参考代码:#include <stdio…… 题解列表 2024年12月05日 5 点赞 0 评论 1414 浏览 评分:10.0
用while循环,卡住终止点是更新后的a=0 ;不断用10求模,不断更新,循环输出 摘要:解题思路:1.用while循环,卡住终止点是更新后的a=02.不断用10求模,不断更新,循环输出参考代码:#include<iostream> using namespace std; int m…… 题解列表 2024年12月05日 3 点赞 0 评论 517 浏览 评分:10.0
大象喝水题解,,,, 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int h,r,t; double v; scanf("%d %d",&h,&r); …… 题解列表 2024年12月05日 1 点赞 0 评论 472 浏览 评分:10.0
编写题解 1000: [竞赛入门]简单的a+b 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main() { int a, b; // 使用循环来处理多组测试数据 while (scanf("%d %…… 题解列表 2024年12月05日 20 点赞 1 评论 3947 浏览 评分:10.0
编写题解 1003: [编程入门]密码破译 摘要:解题思路:译码规律是:用原来字母后面的第4个字母代替原来的字母. 注意事项:参考代码:#include <stdio.h>int main() { // 初始化变量 char c1 =…… 题解列表 2024年12月05日 21 点赞 0 评论 4039 浏览 评分:10.0
编写题解 1008: [编程入门]成绩评定 摘要:解题思路:题目要求根据输入的整数成绩(0-100),输出对应的成绩等级。成绩等级分为 ‘A’、‘B’、‘C’、‘D’ 和 ‘E’,具体分级标准如下:90分及以上为 ‘A’80-89分为 ‘B’70-7…… 题解列表 2024年12月05日 9 点赞 1 评论 2377 浏览 评分:10.0
[编程入门]自定义函数之字符串连接 两行搞定! 摘要:解题思路:注意事项: 哈哈哈哈哈哈,没骗你吧参考代码:#include"bits/stdc++.h" using namespace std;int main(){st…… 题解列表 2024年12月06日 4 点赞 2 评论 524 浏览 评分:10.0
2797 最高的分数(简单易懂) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n; int a[100]; scanf("%d",&n); for(i=0…… 题解列表 2024年12月06日 0 点赞 0 评论 309 浏览 评分:10.0
题解 1012: [编程入门]字符串分类统计新手方法 摘要:#include <stdio.h> int main () { char ch[200]; int i = 0; for (i=0;ch[i]<200;i++){ scanf …… 题解列表 2024年12月06日 5 点赞 0 评论 1310 浏览 评分:10.0
函数求解最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int gcd(int m, int n);int lcd(int m, int n);int main(void){ int m…… 题解列表 2024年12月06日 4 点赞 0 评论 2057 浏览 评分:10.0