题解列表

筛选

题解 1783: 星期判断机

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

1100: 采药 (c++代码)

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

1099: 校门外的树

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

1004: [递归]母牛的故事

摘要:#include<stdio.h>  int fun(int n){     if(n<=4) return n;     else      return fun(n-1)+fun(n-3)……

1072: 汽水瓶(C语言版)

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

C语言标准解

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ char number[11]; int i; int stop=0; for(i=0;i<9;i++){ ……

二级C语言-进制转换

摘要:解题思路:将十进制数转化为八进制有两种方式一、使用C中的printf函数,用占位符%o输出(%o表示以八进制整数形式输出),代码如下:printf("%o",n);二、使用iostream的格式控制字……

偶数求和(acm基础题)

摘要:解题思路:数组+分类讨论注意事项:参考代码:#include<stdio.h>int main(){ int n,m,sum=0,a[100],t,i; while(scanf("%d %d",&n,……

编写题解 2780: 奇偶数判断

摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() {     int n……