建议使用scanf">建议使用scanf#include <iostream> using namespace std;int main(){ int a, b; while(cin>> a >> b){ cout << a + b << endl; } return 0;} 建议使用scanf读取输入时,建议使用scanf代替cin,因为对于大规模数据时,由于cin的内部实现原理,容易超时。