Warm-up IslandPuzzle 1 of 12
Sum of Two Numbers
Easy peasy+10 XPTime limit: 1 secondMemory: 256 MB
Hoot says
Two numbers got lost on their way home. Can you help them team up and become one big number?
Your mission
You get two whole numbers, A and B. Add them together and print the answer.
What you get
One line with two numbers A and B, with a space between them.
What you print
Just one number: the sum of A and B.
Number rules
-2·10^9 ≤ A ≤ 2·10^9-2·10^9 ≤ B ≤ 2·10^9
!
Sneaky tip: the answer can grow too big for an int. Try long long!
Try these examples
1
Input
3 5
Output
8
2
Input
-4 10
Output
6
▾
15px
main.cpp
Loading...
2 examples ready
Example 1
You printed 8, expected 8
Example 2
You printed 6, expected 6