Smallest square that begins with n: Difference between revisions

m
m (→‎{{header|Raku}}: self-ref: another alternative)
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}}==
10,333

edits