project-euler

Sub-string divisibility

Problem Description

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

Let d1 be the 1st digit, d2 be the 2nd digit, and so on. In this way, we note the following:

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

Performance

Try it online!

Real time: 15.714 s
User time: 10.214 s
Sys. time: 4.926 s
CPU share: 96.35 %
Exit code: 0