Read two integers and print their sum. This is a warm-up to get familiar with reading from standard input and writing to standard output.
Input
A single line with two integers a and b, separated by a space.
Output
A single integer: a + b.
Read two integers and print their sum. This is a warm-up to get familiar with reading from standard input and writing to standard output.
A single line with two integers a and b, separated by a space.
A single integer: a + b.
Example 1
3 5
8
3 + 5 = 8.
Example 2
-2 7
5
Negative numbers work too: -2 + 7 = 5.
Example 3
40 2
42
Read the whole line, split it on the space, and convert both parts to integers.
In Python: `a, b = map(int, input().split())`.
Parse the two integers from the single input line and print their sum.
a, b = map(int, input().split())
print(a + b)
Tell us what needs to change, who it affects and any important deadline. We will review the context and reply with useful next questions.