[编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(void){ int n; long long Sn = 0, j; scanf("%d…… 题解列表 2023年06月22日 0 点赞 0 评论 187 浏览 评分:0.0
2845: 求10000以内n的阶乘 摘要:解题思路:采用高精度算法解决问题注意事项:参考代码:void test(int n){ //采用高精度算法实现 int arr[1000000]={0}; int i,j; int l…… 题解列表 2023年06月22日 0 点赞 0 评论 251 浏览 评分:0.0
【C++】采药 动态规划思路 摘要:解题思路:其实最开始我(蒟蒻)看到这道题想用贪心来做,结果贪心是真的不适合寻找全体的最优解。深搜的话感觉还是有些复杂,要保留记忆,所以便使用动态规划来求,这样其实还挺简单的。代码不长也比较好理解。(b…… 题解列表 2023年06月22日 0 点赞 0 评论 485 浏览 评分:9.9
2943-Vigenère密码 摘要:解题思路:寻找规律注意事项:参考代码:void test(char *s1,char *s2,int m,int n){ static char s[1001]; int i; for(i…… 题解列表 2023年06月22日 0 点赞 0 评论 212 浏览 评分:0.0
1017-完数的判断 摘要:解题思路:简单的for循环即可实现此功能。注意事项:参考代码:void test01(int n){ int i; int j; int sum; int arr[100]; if…… 题解列表 2023年06月21日 0 点赞 0 评论 160 浏览 评分:0.0
明明的随机数(真的是随机数,求大佬指出错误!) 摘要:解题思路:注意事项:参考代码:#include <iostream>#include<ctime>#include<cstdlib>using namespace std;int main(){ i…… 题解列表 2023年06月21日 0 点赞 0 评论 183 浏览 评分:9.9
2961-最长单词 摘要:解题思路:采用结构体解决问题注意事项:参考代码:struct Test{ char s[101]; int n; }; int main(){ struct Test test[500…… 题解列表 2023年06月21日 0 点赞 0 评论 247 浏览 评分:0.0
2911-连续出现的字符 摘要:解题思路:注意事项:注意题目说的是连续出现的次数,并不是整体出现的次数。参考代码:int main(){ char s[1001]; int k; int len; int i,j;…… 题解列表 2023年06月21日 0 点赞 0 评论 290 浏览 评分:0.0
注意加括号 摘要:解题思路:按照题目来设置宏定义就行。注意事项:表达式中最好加上括号,因为宏定义只是单纯的字符变换,不加括号容易和预想的算法不一样,我这里也没有检查是不是会出错,反正加上括号总没错。参考代码:#incl…… 题解列表 2023年06月21日 0 点赞 0 评论 169 浏览 评分:0.0
自定义函数 摘要:解题思路:利用char类型逐个输出字符注意事项:无返回值的函数,可以明确定义为空类型,即void参考代码:#include <stdio.h> void output(char a[5]){ …… 题解列表 2023年06月21日 0 点赞 0 评论 190 浏览 评分:0.0