Output two given positive integers after removing every digit 0, then also remove any leading zeros from the resulting numbers.
You are given two positive integers and . Your task is to imagine a modified representation of each number where every digit 0 is removed.
After removing all zeros, interpret the remaining digits as a decimal integer again. The two resulting integers should then be added together, and the sum should be printed.
If removing zeros creates leading zeros in the remaining digit sequence, they do not affect the numeric value.
Write a program that:
0 digits from each integer independently.A single line contains two integers and .
0 from the decimal representation of .0 from the decimal representation of .Print one integer — the sum of the two integers obtained after removing all zeros from the inputs.
Example 1
Input
105 106
Output
31
Explanation
After removing zeros, the numbers become 15 and 16. Their sum is 31.
Example 2
Input
1000 1
Output
2
Explanation
After removing zeros, the numbers become 1 and 1. Their sum is 2.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.