题解 | 两数求和
两数求和
https://www.nowcoder.com/practice/f1b704af4f654be285552bea53ce6534
#include <iostream>
using namespace std;
int main() {
// write your code here......
int a,b;
cin>>a>>b;
if (a<-1000||a>1000||b<-1000||b>1000){
cerr<<"超出范围[-1000,1000]"<<endl;
}
cout<<a+b<<endl;
return 0;
}
加入了错误输出流

查看9道真题和解析
