Count the carries
When two numbers are added digit by digit from the right, print how many times a carry happens.
Reported in: Accenture (Aug 2021) (memory-based)
Input
One line: two non-negative integers.
Output
The number of carries.
Constraints
0 ≤ numbers ≤ 10^18.
Example 1
Input:
451 349
Output:
2Example 2
Input:
123 456
Output:
0Hint: Add the last digits plus the previous carry; a carry happens when that is 10 or more.