编写题解 1031: [编程入门]自定义函数之字符串反转 摘要:解题思路:注意事项:注意数组类型为char不是int参考代码:#include<stdio.h>#include<string.h>void sort(char arr[100], int a){ …… 题解列表 2024年02月04日 0 点赞 0 评论 321 浏览 评分:0.0
三个嵌套for循环+pow函数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h> //pow函数的头文件int main(){ int a,b,c,cn,sn; cn=sn=0;…… 题解列表 2024年02月04日 0 点赞 0 评论 364 浏览 评分:0.0
[编程入门]三个数最大值 摘要:#include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(false) int main() …… 题解列表 2024年02月04日 0 点赞 0 评论 472 浏览 评分:9.9
用do,while,不循环每个数字 摘要:解题思路:已知42为最小符合的数,42*1,42*2,42*3同样符合。因此不用1-1000每个数都循环,就可得到符合条件的数注意事项:主要方法是计算符合条件的数,不是遍历循环参考代码:#includ…… 题解列表 2024年02月04日 0 点赞 0 评论 382 浏览 评分:0.0
2853: 字符替换 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String arg…… 题解列表 2024年02月04日 0 点赞 0 评论 418 浏览 评分:0.0
三个for循环秒杀 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float a,b,c,d,e,f,an,bn,cn,sn; an=bn=cn=sn=0; scanf("…… 题解列表 2024年02月04日 0 点赞 0 评论 333 浏览 评分:0.0
跟上题解决思路一致,两个嵌套for循环解法 摘要:解题思路:这里主要先分析阶乘求和,主要有两个步骤:第一个步骤是从n递减相乘,再将n-1重新循环再递减相乘,直到n=1;这部分代码如下: for (a = n; a >= 1; a--) { …… 题解列表 2024年02月04日 0 点赞 0 评论 417 浏览 评分:0.0
编写题解 2795: 财务管理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float a[12],sum=0; int i; for(i=0;i<12;i++) …… 题解列表 2024年02月04日 0 点赞 0 评论 880 浏览 评分:9.9
1011: [编程入门]最大公约数与最小公倍数 摘要:###思路 辗转相除法求`gcd`,然后`lcm=a*b/gcd`。 ###注意事项 a*b可能爆。 ###代码 ```cpp #include using namespace std;…… 题解列表 2024年02月04日 0 点赞 0 评论 359 浏览 评分:9.9
树型结构 + DFS + 一点DP思想 摘要:# 3144: 颜色平衡树 **该题解法并未优化,几乎是压线AC,重在思路。** ## 解题思路 因为该题是关于树的,所以可以先用多叉链表构建树型结构,以便于后续算法处理。 *p.…… 题解列表 2024年02月04日 0 点赞 0 评论 1170 浏览 评分:8.9