题解 | 多组输入a+b II
多组输入a+b II
https://www.nowcoder.com/practice/37cad29015e3457ba256e3319436d0e6
#include <bits/stdc++.h>
using namespace std;
int main() {
int T,a,b,p;
int t[101];
cin>>T;
p=T;
for(int i=0;p>0;p--,i++){
cin>>a>>b;
t[i]=a+b;
}
for(int j=0;j<T;j++)
cout<<t[j]<<endl;
}
// 64 位输出请用 printf("%lld")
查看16道真题和解析