摘要: #include #include #define MAXN 40000using namespace std;int a[MAXN];int main(){ int n; while(cin>>n) { memset(a,0,sizeof(a)); a[0]=1; int i,j; for(i=2;i=0;i--) ... 阅读全文
posted @ 2013-02-27 06:58 码代码的猿猿 阅读(114) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){ int a,b; while(cin>>a>>b) cout<<a+b<<endl; return 0;} 阅读全文
posted @ 2013-02-27 06:56 码代码的猿猿 阅读(115) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int main(){ int n; while(cin>>n) { if(n%2==0) cout<<(n/2*(n+1))<<endl<<endl; else if(n%2==1) cout<<(n+1)/2*n<<endl<<endl; }... 阅读全文
posted @ 2013-02-27 06:55 码代码的猿猿 阅读(108) 评论(0) 推荐(0) 编辑