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.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. All Contests
  2. ProjectEuler+
  3. Project Euler #178: Step Numbers

Project Euler #178: Step Numbers

Problem
Submissions
Leaderboard
Discussions

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 .

Author

adamant

Difficulty

Medium

Max Score

100

Submitted By

346

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy