Four Numbers
Time limit1sMemory limit256 MB
Add the two numbers formed by writing B directly after A and D directly after C.
- Level
Easy2 of 10
- Topics
- Implementation, Math
- Solved
- No attempts yet
Problem
You are given four natural numbers , , , . Write a program that computes the sum of the number formed by joining and and the number formed by joining and .
Joining two numbers means writing the second one directly after the first one, digit for digit. For example, joining and gives .
Input
The first line contains four natural numbers , , , , separated by spaces. ()
Output
Print, on one line, the sum of the number formed by joining and and the number formed by joining and .