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 #43: Sub-string divisibility

Project Euler #43: Sub-string divisibility

Problem
Submissions
Leaderboard
Discussions

This problem is a programming version of Problem 43 from projecteuler.net

The number, , is a to pandigital number because it is made up of each of the digits to in some order, but it also has a rather interesting sub-string divisibility property.

Let be the digit, be the digit, and so on. In this way, we note the following:

Find the sum of all to pandigital numbers with this property.

Input Format

Input contains an integer

Constraints

Output Format

Print the answer corresponding to the test case.

Sample Input

3

Sample Output

22212

Author

shashank21j

Difficulty

Easy

Max Score

100

Submitted By

2361

Need Help?


View discussions
View top submissions

rate this challenge

MORE DETAILS

Download problem statement
Download sample test cases
Suggest Edits

Choose a translation


  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy