题解列表

筛选

1072: 汽水瓶(C语言版)

摘要:解题思路:本人习惯于观察变量之间的关系,也就有了下面的构造数组满足:a[i]=1/2这样的一种关系,之后就往里代入就好。。注意事项:参考代码:#include<stdio.h>int main(){ ……

1099: 校门外的树

摘要:```cpp #include #include using namespace std; int main() { char L[10001]; memset(L,0,……

1100: 采药 (c++代码)

摘要:```cpp #include using namespace std; const int maxn=110,tmaxn=1010; int cost[maxn],value[maxn],d……

题解 1783: 星期判断机

摘要:参考代码:#include<stdio.h> int main() {     int n;     scanf("%d",&n);          switch(n){      c……

4个循环的解题法

摘要:### 不说废话,直接上代码 ```c #include #define SIZE 10 int main() { int nums[SIZE] ; int count ……

二级C语言-计负均正(C++版)

摘要:解题思路:根据题意,首先需要定义一个长度为20的数组来保存20个整数,然后定义sum保存所有正数的和,aver保存所有正数的平均值。再定义num保存负数的个数,接着用for循环依次输入20个数(这里为……

1040简单的解法(C)

摘要:解题思路:如下注意事项:如果复制,请复制过后检查,我提交时是正确的。参考代码:如果你想证明自己不是刚刚学习一两天,可以使用这段程序。#include<stdio.h>void f(){//自定义voi……

1102: 明明的随机数

摘要:```cpp #include #include using namespace std; int main() { int N,i,j=0,b[100]; cin>>N……