1072: 汽水瓶(C语言版) 摘要:解题思路:本人习惯于观察变量之间的关系,也就有了下面的构造数组满足:a[i]=1/2这样的一种关系,之后就往里代入就好。。注意事项:参考代码:#include<stdio.h>int main(){ …… 题解列表 2022年09月02日 0 点赞 0 评论 374 浏览 评分:9.9
不考虑时间的话直接暴力遍历 摘要:```c #include int main() { int n,i,j; int cnt=0; for(i=2;i…… 题解列表 2022年09月02日 0 点赞 0 评论 581 浏览 评分:9.9
1099: 校门外的树 摘要:```cpp #include #include using namespace std; int main() { char L[10001]; memset(L,0,…… 题解列表 2022年09月03日 0 点赞 0 评论 383 浏览 评分: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 评论 515 浏览 评分:9.9
题解 1783: 星期判断机 摘要:参考代码:#include<stdio.h> int main() { int n; scanf("%d",&n); switch(n){ c…… 题解列表 2022年09月03日 0 点赞 0 评论 1041 浏览 评分:9.9
寻找N以内的所有完数及除它本身以外的所有因子 摘要:解题思路:一,看看是哪个数以内的完数,二,用一个数组来存除它本身之外的所有因子。三,判断是是否是完数注意事项:参考代码:#include<stdio.h>#define M 1000int main(…… 题解列表 2022年09月03日 0 点赞 0 评论 411 浏览 评分:9.9
4个循环的解题法 摘要:### 不说废话,直接上代码 ```c #include #define SIZE 10 int main() { int nums[SIZE] ; int count …… 题解列表 2022年09月03日 0 点赞 0 评论 383 浏览 评分:9.9
二级C语言-计负均正(C++版) 摘要:解题思路:根据题意,首先需要定义一个长度为20的数组来保存20个整数,然后定义sum保存所有正数的和,aver保存所有正数的平均值。再定义num保存负数的个数,接着用for循环依次输入20个数(这里为…… 题解列表 2022年09月03日 0 点赞 0 评论 443 浏览 评分:9.9
1040简单的解法(C) 摘要:解题思路:如下注意事项:如果复制,请复制过后检查,我提交时是正确的。参考代码:如果你想证明自己不是刚刚学习一两天,可以使用这段程序。#include<stdio.h>void f(){//自定义voi…… 题解列表 2022年09月03日 0 点赞 1 评论 344 浏览 评分:9.9
1102: 明明的随机数 摘要:```cpp #include #include using namespace std; int main() { int N,i,j=0,b[100]; cin>>N…… 题解列表 2022年09月04日 0 点赞 0 评论 438 浏览 评分:9.9