不考虑时间的话直接暴力遍历 摘要:```c #include int main() { int n,i,j; int cnt=0; for(i=2;i…… 题解列表 2022年09月02日 0 点赞 0 评论 571 浏览 评分:9.9
1004: [递归]母牛的故事 摘要:#include<stdio.h> int fun(int n){ if(n<=4) return n; else return fun(n-1)+fun(n-3)…… 题解列表 2022年09月02日 0 点赞 0 评论 245 浏览 评分:0.0
1099: 校门外的树 摘要:```cpp #include #include using namespace std; int main() { char L[10001]; memset(L,0,…… 题解列表 2022年09月03日 0 点赞 0 评论 374 浏览 评分:9.9
1100: 采药 (c++代码) 摘要:```cpp #include using namespace std; const int maxn=110,tmaxn=1010; int cost[maxn],value[maxn],d…… 题解列表 2022年09月03日 0 点赞 0 评论 501 浏览 评分:9.9
题解 1783: 星期判断机 摘要:参考代码:#include<stdio.h> int main() { int n; scanf("%d",&n); switch(n){ c…… 题解列表 2022年09月03日 0 点赞 0 评论 1013 浏览 评分:9.9
寻找N以内的所有完数及除它本身以外的所有因子 摘要:解题思路:一,看看是哪个数以内的完数,二,用一个数组来存除它本身之外的所有因子。三,判断是是否是完数注意事项:参考代码:#include<stdio.h>#define M 1000int main(…… 题解列表 2022年09月03日 0 点赞 0 评论 402 浏览 评分:9.9
4个循环的解题法 摘要:### 不说废话,直接上代码 ```c #include #define SIZE 10 int main() { int nums[SIZE] ; int count …… 题解列表 2022年09月03日 0 点赞 0 评论 367 浏览 评分:9.9
利润计算——C语言 摘要:解题思路:根据题意可以分为以下六种情况:一、profit<=100000 bonus=profit*0.1; 二、100000<profit<=200000 bon…… 题解列表 2022年09月03日 0 点赞 0 评论 642 浏览 评分:6.0
优质题解 二级C语言-同因查找(C++版) 摘要:解题思路:首先利用for循环依次获取从10到1000之间的所有整数,然后在循环里面进行判断,判断当前的整数是否能同时被2,3,7整除。用%(取余运算符)进行计算,先依次进行判断,计算表达式如下:i%2…… 题解列表 2022年09月03日 0 点赞 2 评论 1687 浏览 评分:7.5
二级C语言-计负均正(C++版) 摘要:解题思路:根据题意,首先需要定义一个长度为20的数组来保存20个整数,然后定义sum保存所有正数的和,aver保存所有正数的平均值。再定义num保存负数的个数,接着用for循环依次输入20个数(这里为…… 题解列表 2022年09月03日 0 点赞 0 评论 428 浏览 评分:9.9