yaworsw/euler-manager

View on GitHub
data/problems/43.yml

Summary

Maintainability
Test Coverage
---
:id: 43
:name: Sub-string divisibility
:url: https://projecteuler.net/problem=43
:content: |+
  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 _d_<sub>1</sub> be the 1<sup>st</sup> digit, _d_<sub>2</sub> be the 2<sup>nd</sup> digit, and so on. In this way, we note the following:

  - _d_<sub>2</sub>_d_<sub>3</sub>_d_<sub>4</sub>=406 is divisible by 2
  - _d_<sub>3</sub>_d_<sub>4</sub>_d_<sub>5</sub>=063 is divisible by 3
  - _d_<sub>4</sub>_d_<sub>5</sub>_d_<sub>6</sub>=635 is divisible by 5
  - _d_<sub>5</sub>_d_<sub>6</sub>_d_<sub>7</sub>=357 is divisible by 7
  - _d_<sub>6</sub>_d_<sub>7</sub>_d_<sub>8</sub>=572 is divisible by 11
  - _d_<sub>7</sub>_d_<sub>8</sub>_d_<sub>9</sub>=728 is divisible by 13
  - _d_<sub>8</sub>_d_<sub>9</sub>_d_<sub>10</sub>=289 is divisible by 17

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