1151: C语言训练-计算一个整数N的阶乘 摘要:解题思路:注意事项:0!=1 ;0的阶乘不等于0;切记!参考代码:#include<stdio.h>int N,i,a=1;void fun1(){ scanf("%d",&N); if(…… 题解列表 2022年01月27日 0 点赞 0 评论 423 浏览 评分:0.0
1150: C语言训练-计算t=1+1/2+1/3+...+1/n 摘要:解题思路:注意事项:注意输出数的格式,以及变量的定义,变量的类型;参考代码:#include<stdio.h>int n;double t=0,i;void fun1(){ scanf("%d"…… 题解列表 2022年01月27日 0 点赞 0 评论 287 浏览 评分:0.0
按部就班--计算器 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a, b; char op; doub…… 题解列表 2022年01月27日 0 点赞 0 评论 391 浏览 评分:9.9
1149: C语言训练-计算1~N之间所有奇数之和 摘要:解题思路:定义变量N(接收输入的正整数),i(依次循环的值),以及sum(存放奇数的和);使用for循环,循环1-N之间的数,判断是否为奇数,方法为计算该数与2的余数是否为1;如果余数为1,判断为奇数…… 题解列表 2022年01月27日 0 点赞 0 评论 975 浏览 评分:0.0
信息学奥赛一本通T1442-小木棍(JAVA) 摘要: #### 注意事项:记得对输入数据进行预处理!(题目不能保证所有小木棍长度…… 题解列表 2022年01月27日 0 点赞 0 评论 1311 浏览 评分:8.7
1147: C语言训练-角谷猜想 摘要:解题思路:首先获取输入的数值;使用scanf()函数;根据题目要求,需要在一个循环中依次输出针对该数值的运算过程;首先需要判断输入数是奇数或是偶数;通过if,else if判断进入不同的分支;使用m接…… 题解列表 2022年01月27日 0 点赞 0 评论 410 浏览 评分:0.0
题解 1025: [编程入门]数组插入处理 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<cstdio>using namespace std;int main(){ …… 题解列表 2022年01月27日 0 点赞 0 评论 244 浏览 评分:0.0
剪格子(DFS+回溯+剪枝) 摘要:```cpp #include #include using namespace std; int n, m; int maze[10][10]; int vis[10][10]; in…… 题解列表 2022年01月27日 0 点赞 1 评论 852 浏览 评分:9.9
简单易懂--邮票组合 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int t = 0; for (int i = 0…… 题解列表 2022年01月27日 0 点赞 0 评论 268 浏览 评分:0.0
较容易理解的解法 摘要:解题思路:总分为45,平均每家15,所以a+b=6,c+d=7;注意事项:参考代码:#include<iostream>using namespace std;int add(int a, int b…… 题解列表 2022年01月27日 0 点赞 0 评论 248 浏览 评分:0.0