题解 | 多组输入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")

全部评论

相关推荐

快刀斩offer:干测试,项目组就我一个测试,准备在职考研跑路了
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务