2015年3月18日

杭电2018母牛递归问题

摘要: #includeusing namespace std; int niu(int n) { int t=0; if(n>n,n!=0) cout<<niu(n)<<endl; return 0; } 阅读全文

posted @ 2015-03-18 21:17 一梦千寻 阅读(106) 评论(0) 推荐(0) 编辑

错题

摘要: #include#include#includeusing namespace std;int main(){ int i,a,b,sum=0,j=1; while(scanf("%d%d",&a,&b)!=EOF){ for(i=1;i<=a;i++){ sum+=i*2; j++; if(i%b... 阅读全文

posted @ 2015-03-18 17:53 一梦千寻 阅读(123) 评论(0) 推荐(0) 编辑

字符串处理过程的错误

摘要: #include#includeusing namespace std;int main(){ int T;char *p1,*p2,*p3,str[1200]={0};cin>>T;while(T--){gets(str);p3=p2=p1=str;for(;;p1++){if(*p1==' '|... 阅读全文

posted @ 2015-03-18 15:04 一梦千寻 阅读(84) 评论(0) 推荐(0) 编辑

导航