#P12377. Counting Numbers Excluding Subsequence \(2023\)
Counting Numbers Excluding Subsequence \(2023\)
Counting Numbers Excluding Subsequence (2023)
Given the fixed range \(12345678\) (inclusive) to \(98765432\) (inclusive), count how many numbers in the range completely do not contain the subsequence \(2023\). A number is said to completely not contain \(2023\) if no matter which digits you remove (while preserving the order of the remaining ones), you can never obtain \(2023\).
For example:
- \(20322175\) and \(33220022\) completely do not contain \(2023\).
- \(20230415\) and \(20193213\) do contain \(2023\) (in the latter, the 1st, 2nd, 6th and 8th digits form \(2023\)).
Your task is to output a single integer: the count of numbers in the given interval that completely do not contain \(2023\) as a subsequence.
inputFormat
This problem does not require any input. The range is fixed as \(12345678\) to \(98765432\).
outputFormat
Output a single integer representing the count of numbers in the range \(12345678 \leq x \leq 98765432\) that completely do not contain \(2023\) as a subsequence.
sample
No input
85814817