A balanced number is a
3-digit number whose second digit is equal to the sum of the first and last digit.
Write a program which reads and sums balanced numbers. You should stop when an unbalanced number is given.
You will receive an array as the only parameter of
- Note: see sample tests
Print to the standard output, i.e. with the
- Print the sum of the balanced numbers
- No more than
1000numbers will be given
Sample test 1
Sample test 2
solve(['275', '693', '110', '742']);