Create a function that returns the sum of the digits formed from the first and last digits, all the way to the center of the number.
2520 β 72
# The first and last digits are 2 and 0.
# 2 and 0 form 20.
# The second digit is 5 and the second to last digit is 2.
# 5 and 2 form 52.
# 20 + 52 = 72
121 β 13
# 11 + 2
1039 β 22
# 19 + 3
22225555 β 100
# 25 + 25 + 25 + 25
- If the number has an odd number of digits, simply add on the single-digit number in the center (see example #1).
- Any number which is zero-padded counts as a single digit (see example #2).