
杭电ACM
东大学子
Talk is cheap. Show me the code.
展开
-
杭电ACM 1000
C++;#include using namespace std; int main() { int a,b; int sum; while(cin>>a>>b&&!cin.fail()) { sum=a+b; cout<<sum<<endl; } } C: 原创 2013-06-06 14:42:24 · 855 阅读 · 0 评论 -
杭电ACM 1001
C: #include int main() { long int n=0; while(scanf("%ld",&n)!=EOF) { n=n%2?(n+1)/2*n:n/2*(n+1); printf("%ld\n\n",n); } return 0; } C++: #include using namespace std; i原创 2013-06-06 15:31:46 · 765 阅读 · 0 评论 -
杭电ACM 1003
C++: #include #include using namespace std; void maxSum(); int main() { int T=0; cin>>T; if(T20)return 0; for(int i=0;i<T;i++) { cout<<"Case "<<(i+1)<<":"<<endl; maxSum();原创 2013-06-07 00:06:29 · 832 阅读 · 0 评论 -
杭电ACM 1002
看清格式描述很重要: For each test case, you should output two lines. The first line is "Case #:", # means the number of the test case. The second line is the an equation "A + B = Sum", Sum means the result of原创 2013-06-06 21:35:58 · 725 阅读 · 0 评论