Coffee Time Challenges, Q13 How many を Squeak Smalltalk で

ときどきの雑記帖″ 2014年7月(下旬) 経由で。(ネタバレ注意)

13) How many

Challenge: ABCDEFGHIJ is a ten-digit-number. All of the digits are distinct. If 11111 divides it evenly, how many possibilities are there for ABCDEFGHIJ?

Coffee Time Challenges


方針は合っているはずなので、あとはスタート値に注意ですね。

((1023456789 roundTo: 11111) to: 9876543210 by: 11111) count: [:each | each asString asSet size = 10]  "=> 3456 "