#ACSL1819J1. Digit Reassembly
Digit Reassembly
PROBLEM: Given a number less than 1050, answer various questions about the number.
INPUT: There will 5 lines of input. Each will contain a positive integer less than 1050.
OUTPUT: For each line of input, answer the corresponding question below:
- For Input Line #1, how many digits are in the number?
- For Input Line #2, what is the sum of all of the digits in the number?
- For Input Line #3, what is the sum of the digits at the odd locations (the leftmost digit is Location #1)?
- For Input Line #4, how many times does the digit 4 appear?
- For Input Line #5, what is the middle digit? (If the length of the number, N, is even, find the N/2 number (again, the leftmost digit is the 1st one).
SAMPLE INPUT
1325678945
987654
456160
143295823976154
123456
SAMPLE OUTPUT
10
39
16
2
3