Problem 43 » 履歴 » バージョン 1
Noppi, 2024/01/16 01:59
1 | 1 | Noppi | [ホーム](https://redmine.noppi.jp) - [[Wiki|Project Euler]] |
---|---|---|---|
2 | # [[Problem 43]] |
||
3 | |||
4 | ## Sub-string Divisibility |
||
5 | 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. |
||
6 | |||
7 | Let $d_1$ be the $1$<sup>st</sup> digit, $d_2$ be the $2$<sup>nd</sup> digit, and so on. In this way, we note the following: |
||
8 | |||
9 | * $d_2d_3d_4=406$ is divisible by $2$ |
||
10 | * $d_3d_4d_5=063$ is divisible by $3$ |
||
11 | * $d_4d_5d_6=635$ is divisible by $5$ |
||
12 | * $d_5d_6d_7=357$ is divisible by $7$ |
||
13 | * $d_6d_7d_8=572$ is divisible by $11$ |
||
14 | * $d_7d_8d_9=728$ is divisible by $13$ |
||
15 | * $d_8d_9d_{10}=289$ is divisible by $17$ |
||
16 | |||
17 | Find the sum of all $0$ to $9$ pandigital numbers with this property. |
||
18 | |||
19 | ## 部分文字列被整除性 |
||
20 | 数1406357289は0から9のパンデジタル数である (0から9が1度ずつ現れるので). この数は部分文字列が面白い性質を持っている. |
||
21 | |||
22 | $d_1$を上位1桁目, $d_2$を上位2桁目の数とし, 以下順に$d_n$を定義する. この記法を用いると次のことが分かる. |
||
23 | |||
24 | * $d_2d_3d_4=406$ は 2 で割り切れる |
||
25 | * $d_3d_4d_5=063$ は 3 で割り切れる |
||
26 | * $d_4d_5d_6=635$ は 5 で割り切れる |
||
27 | * $d_5d_6d_7=357$ は 7 で割り切れる |
||
28 | * $d_6d_7d_8=572$ は 11 で割り切れる |
||
29 | * $d_7d_8d_9=728$ は 13 で割り切れる |
||
30 | * $d_8d_9d_{10}=289$ は 17 で割り切れる |
||
31 | |||
32 | このような性質をもつ0から9のパンデジタル数の総和を求めよ. |
||
33 | |||
34 | ```scheme |
||
35 | ``` |