1.知识点:多组输入
2.题目含义:多组输入,计算a + b
3.SDUT OJ 题目链接
4.题目:
A+B for Input-Output Practice (I)
Time Limit: 1000 ms Memory Limit: 65536 KiB
Problem Description
Your task is to Calculate a + b.
Too easy?! Of course! I specially designed the problem for acm beginners.
You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim
Input
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
Output
For each pair of input integers a and b you should output the sum of a and b in one line, and with one line of output for each line in input.
Sample Input
1 5
10 20
Sample Output
6
30
Hint
Source
HDOJ
以下为Accepted代码[ Python

这篇博客介绍了Python中处理多组输入的技巧,通过一个简单的加法问题阐述了如何读取并计算连续的整数对。文章提供了SDUT OJ上的题目链接,并展示了一个被接受的Python代码示例,旨在帮助ACM初学者入门。
最低0.47元/天 解锁文章
274

被折叠的 条评论
为什么被折叠?



