12 2016 档案

摘要:1 #include 2 #include 3 char s[20]; 4 int main() 5 { 6 int n; 7 scanf("%d",&n); 8 getchar(); 9 while(n--) 10 { 11 memset(s,0,sizeof s); 12 gets(s); 13 ... 阅读全文
posted @ 2016-12-31 20:08 Posase 阅读(105) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 char s[45]; 3 4 int lenth(char s[]) 5 { 6 int i=0; 7 while(s[i]) 8 ++i; 9 return i; 10 } 11 int main() 12 { 13 int n; 14 scanf("%d",&n); 15 getc... 阅读全文
posted @ 2016-12-31 20:06 Posase 阅读(172) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 int main() 4 { 5 int n; 6 double x1,x2,y1,y2; 7 scanf("%d",&n); 8 while(n--) 9 { 10 scanf("%lf%lf%lf%lf",&x1,&y1,&x2,&y2); 11 prin... 阅读全文
posted @ 2016-12-30 12:20 Posase 阅读(238) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int ans; 3 int cus(int x) 4 { 5 if(x) 6 { 7 if(x&1) 8 ++ans; 9 cus(x>>1); 10 } 11 else 12 return ans; 13 } 14 int main() 15 {... 阅读全文
posted @ 2016-12-29 21:51 Posase 阅读(174) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n,x; 5 scanf("%d",&n); 6 while(n--) 7 { 8 scanf("%d",&x); 9 if(x<60) 10 puts("E"); 11 else if(x<70) 12 ... 阅读全文
posted @ 2016-12-29 21:34 Posase 阅读(159) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n; 5 double m,x,y,z; 6 scanf("%d",&n); 7 while(n--) 8 { 9 scanf("%lf%lf%lf%lf",&m,&x,&y,&z); 10 printf("%.2lf\n",(m*x)/(... 阅读全文
posted @ 2016-12-29 21:33 Posase 阅读(154) 评论(0) 推荐(0) 编辑
摘要:另可用字符数组处理。 阅读全文
posted @ 2016-12-28 17:41 Posase 阅读(130) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int ci(int x,int y) 3 { 4 if(x<y) 5 return 0; 6 else 7 return x/y+ci(x/y+x%y,y); 8 } 9 10 int main() 11 { 12 int n,m,k; 13 scanf("%d",&n); 14 ... 阅读全文
posted @ 2016-12-28 17:32 Posase 阅读(107) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n,k,i,j; 5 scanf("%d%d",&n,&k); 6 int flag,temp; 7 for(i=1; i<=n; ++i) 8 { 9 for(j=1,temp=0; j<=k; ++j) 10 if(!(i%j)... 阅读全文
posted @ 2016-12-28 12:06 Posase 阅读(100) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n,y,m,d; 5 scanf("%d",&n); 6 while(n--) 7 { 8 scanf("%d%d%d",&y,&m,&d); 9 switch(m) 10 { 11 case 2:d+=31;bre... 阅读全文
posted @ 2016-12-28 11:51 Posase 阅读(131) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 main() 3 { 4 int n,m,a,d,e,f,g,h,i; 5 while(1) 6 { 7 a=0; 8 scanf("%d%d",&m,&n); 9 if(m==0&&n==0) {break;} 10 d=m%10; 11 e=n%... 阅读全文
posted @ 2016-12-28 11:39 Posase 阅读(126) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int a[21]; 3 int main() 4 { 5 int n,m,i,temp; 6 a[1]=temp=1; 7 for(i=2; i<21; ++i) 8 { 9 if(i%2) 10 temp*=i; 11 a[i]=a[i-1]+temp; 12 ... 阅读全文
posted @ 2016-12-28 11:38 Posase 阅读(83) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 double ans,x; 5 int n=12; 6 while(n--) 7 { 8 scanf("%lf",&x); 9 ans+=x; 10 } 11 ans/=12; 12 printf("%.2f\n",ans); 13... 阅读全文
posted @ 2016-12-28 11:38 Posase 阅读(105) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 //freopen("in.txt","r",stdin); 5 int a,n,m; 6 while(~scanf("%d",&a)) 7 { 8 while(a--) 9 { 10 scanf("%d%d",&n,&m); 11... 阅读全文
posted @ 2016-12-28 11:37 Posase 阅读(110) 评论(0) 推荐(0) 编辑
摘要:#include #include int main() { struct { char name[250]; int qm; int by; char gb; char xb; int lw; } xx[205]; int jxj[105],n,i,s,k,m; ... 阅读全文
posted @ 2016-12-28 11:36 Posase 阅读(127) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 char a[200]; 3 int b[200]; 4 int len(char s[]) 5 { 6 int i=0; 7 while(s[i]!='\0') 8 ++i; 9 return i; 10 } 11 int main() 12 { 13 int n,maxn,minn,i,j,t,k; ... 阅读全文
posted @ 2016-12-28 11:36 Posase 阅读(84) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int a[4]; 3 int main() 4 { 5 int n,x,t,i,j,k,maxn,minn; 6 while(~scanf("%d",&n)) 7 { 8 while(n--) 9 { 10 scanf("%d",&x); 11 ... 阅读全文
posted @ 2016-12-28 11:35 Posase 阅读(108) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int a,b,c,t; 5 scanf("%d%d%d",&a,&b,&c); 6 if(a>b) 7 { 8 t=a; 9 a=b; 10 b=t; 11 } 12 if(b>c) 13 { 14 ... 阅读全文
posted @ 2016-12-28 11:34 Posase 阅读(109) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int main() 4 { 5 int n,m,s,t; 6 while(~scanf("%d",&t)) 7 { 8 while(t--) 9 { 10 scanf("%d%d",&n,&m); 11 s=0; 12 ... 阅读全文
posted @ 2016-12-28 11:34 Posase 阅读(88) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int a,b,c,n,t; 5 scanf("%d",&n); 6 while(n--) 7 { 8 scanf("%d%d",&a,&b); 9 c=a*b; 10 while(b) 11 { 12 ... 阅读全文
posted @ 2016-12-25 16:13 Posase 阅读(95) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int a,b,c,n; 5 while(~scanf("%d",&n)&&n) 6 { 7 a=n/100; 8 b=n/10%10; 9 c=n%10; 10 if(a*a*a+b*b*b+c*c*c==n) 11 ... 阅读全文
posted @ 2016-12-25 15:58 Posase 阅读(97) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int a,b,c,n,t; 5 while(~scanf("%d%d%d",&a,&b,&c)) 6 { 7 for(n=10,t=0; n<=100; n++) 8 if(n%3==a&&n%5==b&&n%7==c) 9 ... 阅读全文
posted @ 2016-12-25 15:56 Posase 阅读(154) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 int a[105][105]; 4 int main() 5 { 6 int n,i,j,t; 7 while(~scanf("%d",&n)) 8 { 9 memset(a,0,sizeof a); 10 t=a[i=0][j=n-1]=1; 11 wh... 阅读全文
posted @ 2016-12-25 15:54 Posase 阅读(121) 评论(0) 推荐(0) 编辑
摘要:#include int main() { int a[5],i,max=0,min=10000; for(i=0; ia[i]) min=a[i]; } printf("%d %d\n",min,max); return 0; } 阅读全文
posted @ 2016-12-25 15:53 Posase 阅读(123) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 #include 3 int main() 4 { 5 int ss(double x); 6 int n,i,s,t,a,b; 7 double m,x,s1,s2; 8 scanf("%d",&n); 9 while(n--) 10 { 11 scanf("%lf",&m); 12 ... 阅读全文
posted @ 2016-12-25 15:52 Posase 阅读(147) 评论(0) 推荐(0) 编辑
摘要:1 2 #include 3 #include 4 int main() 5 { 6 int n,m,i,s,r,x; 7 scanf("%d",&n); 8 while(n--) 9 { 10 scanf("%d",&m); 11 s=0; 12 while(m--) 13 {... 阅读全文
posted @ 2016-12-25 15:51 Posase 阅读(129) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n,m,t,i,s,r; 5 scanf("%d",&n); 6 while(n--) 7 { 8 scanf("%d",&m); 9 for(i=0,s=1,t=0; i 3 int a[19]; 4 int main() 5 { 6 ... 阅读全文
posted @ 2016-12-25 15:50 Posase 阅读(113) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n,m,t,i; 5 scanf("%d",&n); 6 while(n--) 7 { 8 scanf("%d",&m); 9 for(i=0,t=1; i<m/2; i++,t+=2) 10 { 11 i... 阅读全文
posted @ 2016-12-25 15:49 Posase 阅读(128) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int n; 5 char a,b,c,t; 6 scanf("%d",&n); 7 while(n--) 8 { 9 getchar(); 10 scanf("%c%c%c",&a,&b,&c); 11 if(a>b) 12 ... 阅读全文
posted @ 2016-12-25 15:47 Posase 阅读(130) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int main() 3 { 4 int a,b; 5 scanf("%d%d",&a,&b); 6 printf("%d\n",a+b); 7 return 0; 8 } 阅读全文
posted @ 2016-12-25 15:40 Posase 阅读(121) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int main() 4 { 5 double ans,x; 6 int n=12; 7 while(n--) 8 { 9 scanf("%lf",&x); 10 ans+=x; 11 } 12 ans/=12; 13 printf("%.2f\n",ans)... 阅读全文
posted @ 2016-12-25 15:18 Posase 阅读(106) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int temp(int,int); 4 5 int main() 6 { 7 int n,m; 8 while(~scanf("%d%d",&n,&m)&&(n!=-1||m!=-1)) 9 { 10 int ans=temp(n,m); 11 if(ans==1) 12 ... 阅读全文
posted @ 2016-12-25 15:16 Posase 阅读(256) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int main() 4 { 5 double ans,x; 6 int n=12; 7 while(n--) 8 { 9 scanf("%lf",&x); 10 ans+=x; 11 } 12 ans/=12; 13 printf("$%.2f\n",ans... 阅读全文
posted @ 2016-12-25 15:15 Posase 阅读(326) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 char s[300]; 4 5 int lenth(char s[]) 6 { 7 int i=0; 8 while(s[i]!='\0') 9 ++i; 10 return i; 11 } 12 int main() 13 { 14 int n,i,ans,len; 15 while(... 阅读全文
posted @ 2016-12-25 15:12 Posase 阅读(232) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 char s[300]; 4 5 int main() 6 { 7 int n,a,b; 8 char c; 9 double ans; 10 scanf("%d",&n); 11 getchar(); 12 while(n--) 13 { 14 ... 阅读全文
posted @ 2016-12-25 15:11 Posase 阅读(179) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int jz(int x,int r,int temp) 4 { 5 int k=1,ans=0; 6 while(k <= x) 7 k*=r; 8 while(k!=1) 9 { 10 k/=r; 11 ans+=x/k%r; 12 } 13 if... 阅读全文
posted @ 2016-12-25 15:09 Posase 阅读(225) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 typedef struct 4 { 5 char num[6]; 6 char s[10]; 7 } cus; 8 9 cus xx[8]= {{"33","Zhejiang"},{"11","Beijing"}, 10 {"71","Taiwan"},{"81","Hong Kong"}, 11 ... 阅读全文
posted @ 2016-12-25 15:07 Posase 阅读(173) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 char s[1005]; 4 5 int lenth(char *); 6 7 int main() 8 { 9 int n,len,i,j,k; 10 while(~scanf("%d",&n)) 11 { 12 getchar(); 13 while(n--) 14 ... 阅读全文
posted @ 2016-12-20 20:14 Posase 阅读(359) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 int a[55]; 3 int main() 4 { 5 int Case=0,n,i,s,ans; 6 while(~scanf("%d",&n)&&n) 7 { 8 for(i=s=0; is) 17 ans+=a[i]-s; 18 } 19 i... 阅读全文
posted @ 2016-12-01 16:54 Posase 阅读(395) 评论(0) 推荐(0) 编辑
摘要:1 #include 2 3 int main() 4 { 5 int n,m; 6 long long x,s,maxx; 7 while(~scanf("%d",&n)) 8 { 9 while(n--) 10 { 11 scanf("%d",&m); 12 s... 阅读全文
posted @ 2016-12-01 08:57 Posase 阅读(293) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示