Permuted multiples: Difference between revisions

→‎{{header|Raku}}: Add a Raku example
m (added a Puzzles category to the task's preamble.)
(→‎{{header|Raku}}: Add a Raku example)
Line 7:
Find the smallest positive integer '''n''' such that, when expressed in decimal, 2*n, 3*n, 4*n, 5*n, and 6*n contain ''exactly'' the same digits but in a different order.
<br><br>
=={{header|Raku}}==
<lang perl6>put (1..∞).map(1 ~ *).race.map( -> \n { next unless [eq] (2,3,4,5,6).map: { (n × $_).comb.sort.join }; n } ).first</lang>
{{out}}
<pre>142857</pre>
 
=={{header|REXX}}==
<lang rexx>/*REXX program finds and displays the smallest positive integer n such that ··· */
10,333

edits