题解列表

筛选

利润计算——C语言

摘要:解题思路:根据题意可以分为以下六种情况:一、profit<=100000       bonus=profit*0.1;       二、100000<profit<=200000       bon……

4个循环的解题法

###不说废话,直接上代码```c#include#defineSIZE10intmain(){intnums[SIZE];intcount=0,insert,temp,index=0;while(count

题解 1783: 星期判断机

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

1100: 采药 (c++代码)

```cpp#includeusingnamespacestd;constintmaxn=110,tmaxn=1010;intcost[maxn],value[maxn],dp[tmaxn],t,m;intmain(){cin>>t>>m;for(inti=1;i>cost[i]>>value[i];

1099: 校门外的树

```cpp#include#includeusingnamespacestd;intmain(){charL[10001];memset(L,0,sizeof(L));inta,n,x,y,num=0;cin>>a>>n;for(inti=0;i>x>>y;for(inti=x;i

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++){ ……