摘要: 单层金字塔 #include<stdio.h>int main(){ int n,i,t,j; while(scanf("%d",&n)!=EOF) { for(j=1;j<=n;j++) { for(t=1;t<=n-j;t++) {printf(" ");} for(t=1;t<=2*j-1;t 阅读全文
posted @ 2017-11-25 02:28 鸵鸟tang 阅读(145) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int n,i,s; while(scanf("%d",&n)!=EOF) { s=1; for(i=1;i<n;i++) {s=(s+1)*2;} printf("%d\n",s); } return 0;} 阅读全文
posted @ 2017-11-25 02:23 鸵鸟tang 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-12 23:08 鸵鸟tang 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2017-11-12 20:40 鸵鸟tang 阅读(89) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>int main(){ int a, b, c; while(scanf("%d%d%d",&a,&b,&c)!=EOF){ if(a>0 && b>0 && c>0 && a+b>c && a+c>b && b+c>a) { if (a*a+b*b==c*c|| 阅读全文
posted @ 2017-11-12 15:16 鸵鸟tang 阅读(504) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h>int main(){ int m,n,i,sum; scanf("%d",&m); for(i=1;i<=m;i++) { sum=0; while(1) { scanf("%d",&n); sum=sum+n; if(getchar()=='\n')break; 阅读全文
posted @ 2017-11-07 15:58 鸵鸟tang 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Description Calculation 1 -2 +3 -4+...+n Calculation 1 -2 +3 -4+...+n Input Input repeat times m first, then input n each time. Input repeat times m f 阅读全文
posted @ 2017-11-05 17:17 鸵鸟tang 阅读(102) 评论(0) 推荐(0) 编辑