#P10424. [蓝桥杯 2024 省 B] 好数
[蓝桥杯 2024 省 B] 好数
Problem Description
If an integer, when read from the lowest digit to the highest digit, has odd digits in odd positions (ones, hundreds, ten-thousands, ...) and even digits in even positions (tens, thousands, hundred-thousands, ...), then we call it a "good number".
Given a positive integer , compute how many good numbers there are from to .
Input Format
An integer .
Output Format
An integer representing the answer.
24
7
2024
150
Hint
Explanation for Sample 1
The good numbers within are , for a total of .
Constraints
- For of the testdata, .
- For all testdata, .
Translated by ChatGPT 5