#P2657. [SCOI2009] windy 数
[SCOI2009] windy 数
Description
A positive integer without leading zeros, where the absolute difference between every pair of adjacent digits is at least , is called a windy number. Windy wants to know: between and , inclusive, how many windy numbers are there?
Input Format
The input contains a single line with two integers, representing and .
Output Format
Output a single line with one integer, the answer.
1 10
9
25 50
20
Hint
Constraints
For all test points, it is guaranteed that .
Translated by ChatGPT 5
京公网安备 11011102002149号