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 17:33, 5 March 2023
, 1 year ago→{{header|ALGOL 68}}
(Added Algol 68) |
|||
Line 86:
BITS all digits := dmask[ 0 ];
FOR b FROM 2 TO 16 DO
all digits := all digits OR dmask[ b - 1 ];
LONG INT root := 1;
Line 93 ⟶ 91:
root *:= b
OD;
root
BOOL found
WHILE NOT found DO
LONG INT square = root * root;
|