A+B 输入输出练习I Posted on 2020-11-26 Edited on 2021-04-14 In 算法笔记 Views: 题目描述:你的任务是计算a+b。这是为了acm初学者专门设计的题目。你肯定发现还有其他题目跟这道题的标题类似,这些问题也都是专门为初学者提供的。 输入格式:输入包含一系列的a和b对,通过空格隔开。一对a和b占一行。 输出格式:对于输入的每对a和b,你需要依次输出a、b的和。如对于输入中的第二对a和b,在输出中它们的和应该也在第二行。 输入样例:1 510 20 输出样例:630 train of thought: code: 12345678910#include <cstdio>int main(){ int a, b; while (scanf("%d %d", &a, &b) != EOF) { printf("%d\n", a + b); }; return 0;} Post author: SRP05 Post link: https://srp05.github.io/2020/11/26/A-B-输入输出练习I/ Copyright Notice: All articles in this blog are licensed under BY-NC-SA unless stating additionally.