Solved LeetCode program · 931 of 1,000
#1295 · Find Numbers with Even Number of Digits
Original English source
The numbers is a list of 12, 345, 2, 6, and 7896. The answer is 0.
For each value in numbers.
The magnitude is value. The digits is 0.
Repeat while magnitude is more than 0.
Add 1 to digits. Set magnitude to magnitude divided by 10. If magnitude is 0 and digits modulo 2 is 0, add 1 to answer.
Show answer.
Expected stdout
2