Permuted multiples: Difference between revisions
Content added Content deleted
Not a robot (talk | contribs) (Add C) |
Not a robot (talk | contribs) (Add APL) |
||
Line 7: | 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. |
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> |
<br><br> |
||
=={{header|APL}}== |
|||
<lang apl>{(⍳6)×{⍵+1}⍣{1=≢∪{⍵[⍋⍵]}¨⍕¨⍺×⍳6}⊢⍵} 123</lang> |
|||
{{out}} |
|||
<pre>142857 285714 428571 571428 714285 857142</pre> |
|||
=={{header|AppleScript}}== |
=={{header|AppleScript}}== |