We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- All Contests
- ProjectEuler+
- Project Euler #178: Step Numbers
Project Euler #178: Step Numbers
Project Euler #178: Step Numbers
Contest ends in
This problem is a programming version of Problem 178 from projecteuler.net
Consider the number .
It can be seen that each pair of consecutive digits of has a difference of one.
A number for which every pair of consecutive digits has a difference of one is called a step number.
A pandigital number contains every decimal digit from to at least once.
How many pandigital step numbers less than are there?
Input Format
The input contains only one integer .
Constraints
Output Format
Print the only integer which is the answer to the problem.
Sample Input 0
10000000000
Sample Output 0
1
Explanation 0
The only pandigital step-number less than is .