Iterated digits squaring: Difference between revisions

m
→‎{{header|Perl 6}}: Remove some superstitious parenthesis
(→‎{{header|Perl 6}}: Replace nqp with fast algorithm example)
m (→‎{{header|Perl 6}}: Remove some superstitious parenthesis)
Line 1,727:
my $nn = $n;
loop {
while ($nn > 0) {
$digit = $nn % 10;
$sum += $digit²;
Line 1,742:
my @sums is default(0) = 1,0;
my $s;
for (1 .. $k) -> $n {
for ($n*81 ... 1) -> $i {
for (1 .. 9) -> $j {
$s = $j²;
last if $s > $i;
10,333

edits