2024 ICPC 陕西省赛 G. Disappearing Number

G. Disappearing Number

time limit per test: 1 second

memory limit per test: 256 megabytes

uuku is learning digital dynamic programming.

But one day, he found that the x in the nine digits of 1,2,…,9 had disappeared, which means that all numbers containing the digit x had disappeared.

This made him very panicked because it had a significant impact on the number of statistics.

Now, he hopes you can help him find out where the number n ranks among the natural numbers that have not disappeared in this situation.

Input

你可能感兴趣的:(算法)