A+B 输入输出练习II Posted on 2020-11-26 Edited on 2021-04-14 In 算法笔记 Views: 题目描述:你的任务是计算a+b。 输入格式:第一行是一个整数N,表示后面会有N行a和b,通过空格隔开。 输出格式:对于输入的每对a和b,你需要在相应的行输出a、b的和。如第二对a和b,对应的和也输出在第二行。 输入样例:21 510 20 输出样例:630 train of thought: code: 123456789101112#include <cstdio>int main(){ int a, b, T; scanf("%d", &T); while (T--) { scanf("%d %d", &a, &b); printf("%d\n", a + b); } return 0;} Post author: SRP05 Post link: https://srp05.github.io/2020/11/26/A-B-输入输出练习II/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.