Combinations with repetitions/Square digit chain: Difference between revisions

m
→‎{{header|Kotlin}}: Minor changes to wording of preamble.
(Added Kotlin)
m (→‎{{header|Kotlin}}: Minor changes to wording of preamble.)
Line 137:
 
=={{header|Kotlin}}==
To achieve reasonable performance, the Kotlin entry for the [[Iterated digits squaring]] task already used a similar approach to that required by this task for k = 8.
 
So the following generalizes that code to deal with values of k up to 17 (which requires 64 bit integers) and to identifycount numbers where the squared digits sum sequence eventually ends in 1 rather than 89, albeit the sum of both must of course be 10 ^ k - 1.
<lang scala>// version 1.1.51
 
9,476

edits