Smallest square that begins with n: Difference between revisions
Added Uiua solution
m (→{{header|Phix}}: correct limit) |
(Added Uiua solution) |
||
Line 3,236:
(return-from search)))
((set k (trunc k 10)))))))</syntaxhighlight>
=={{header|Uiua}}==
{{works with|Uiua|0.10}}
In best YAGNI style, just calculate sufficient squares for the task as specced (up to 220^2)
<syntaxhighlight lang="Uiua">
IsPrefix ← =⧻⟜(/+⬚@.=)
⊞◇IsPrefix °⋕↘1⇡50 °⋕.ⁿ2+1⇡220
⊏≡(⊢⊚)
</syntaxhighlight>
{{out}}
<pre>
[1 25 36 4 529 64 729 81 9 100 1156 ...etc...]
</pre>
=={{header|VTL-2}}==
|