First perfect square in base n with n unique digits: Difference between revisions
First perfect square in base n with n unique digits (view source)
Revision as of 21:19, 5 December 2020
, 3 years ago→{{header|Forth}}
Line 554:
base @ 17 2 do
i base !
cr i 2 d. 3 spaces panroot dup
loop base ! ;
</lang>
Line 560:
<pre>
showsquares
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre>
=={{header|Go}}==
This takes advantage of major optimizations described by Nigel Galloway and Thundergnat (inspired by initial pattern analysis by Hout) in the Discussion page and a minor optimization contributed by myself.
|