#P1940. Reversible Number
Reversible Number
Description
Some positive integers satisfy that in (where is the number obtained by reversing the decimal digits of ), every digit of the sum is odd.
For example:
- When , .
- When , .
We call such Reversible numbers. Therefore, , , , and are all Reversible numbers.
Numbers with leading zeros are not considered Reversible numbers.
How many Reversible numbers are there that are less than or equal to ?
Input Format
A single positive integer .
Output Format
Output a single line containing one integer, the answer.
4
720
Hint
For of the testdata, the answer does not exceed .
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号