Smallest square that begins with n: Difference between revisions
m
→{{header|Raku}}: Alternate
m (→{{header|Raku}}: self-ref: another alternative) |
Thundergnat (talk | contribs) m (→{{header|Raku}}: Alternate) |
||
Line 283:
49 => 49
</pre>
As the desired range is so small, there is not much gained by caching the squares. Less efficient, but less verbose:
<lang perl6>say $_ => ^Inf .map(*²).first: *.starts-with: $_ for 1..49;</lang>
Same output.
=={{header|REXX}}==
|