#P16282. [蓝桥杯 2026 省 Python/Java A 组] 罐头编号
[蓝桥杯 2026 省 Python/Java A 组] 罐头编号
Problem Description
The “pet owner” Xiaolan bought a label printer and planned to put a production number on each can of homemade cat food.
Originally, these numbers should have followed the natural numbers in order. However, when Xiaolan went to get label paper, the naughty kitten jumped onto the desk and precisely stepped on the 0 key, breaking it. As a result, this machine can no longer print any label that contains the digit 0.
Xiaolan does not want to repair the printer, so he simply changes the numbering rule: whenever a number contains the digit 0, it is skipped and not printed. Therefore, the numbering sequence on the cat food cans becomes:
- The st can is labeled .
- The nd can is labeled .
- The th can is labeled .
- The th can (since cannot be printed, it is skipped) is labeled .
- The th can is labeled .
- The th can is labeled .
- The th can (since cannot be printed, it is skipped) is labeled .
Xiaolan was extremely busy in the kitchen this weekend and made a total of cans of homemade cat food.
Now, please help Xiaolan compute: according to the rules of this broken printer, what number is printed on the -th can of homemade cat food?
Output Format
This is an output-only fill-in-the-blank problem. You only need to compute the result and submit it. The answer is an integer; when submitting, write only this integer. Any extra content will result in no score.
Hint
Translated by ChatGPT 5