Add tags

Add tags to the following comment
Squeak Smalltalk で。kozima さんの #3557、そのまんまです。幅優先探索のも書きましたが、こちらのほうがずっとシンプルでいいですね。
1
2
3
4
5
6
| start result |
start := #(827392 65536 122880).
result := start max.
start combinations: 2 atATimeDo: [:pair |
    (pair first - pair second isDivisibleBy: 3) ifTrue: [result := result min: pair max]].
^result

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...