标签:
两道水题,用来熟悉 HOJ 的提交系统。1002 需要考虑溢出。直接贴出代码:
#include <iostream> using namespace std; int main() { int a, b; while (cin >> a >> b) { cout << (a + b) << endl; } return 0; }
#include <iostream> using namespace std; int main() { long long a, b, c; while (cin >> a >> b >> c) { cout << (a + b + c) << endl; } return 0; }
标签:
原文地址:http://www.cnblogs.com/minjingdan/p/4319475.html