Commits

Shlomi Fish  committed dae1836

Fix more bugs, but $new_layer_count is always zero.

  • Participants
  • Parent commits 4c2df24

Comments (0)

Files changed (1)

File project-euler/126/euler-126.pl

 
     $cuboids{$key} = {array => $new_array, dims => \@new_dims, n => $new_layer_count};
 
-    if ((++$C[$new_layer_count]) == 1_000)
+    if ((++$C[$new_layer_count]) >= 10)
     {
-        print "Found C[$new_layer_count] == 1,000\n";
-        exit(0);
+        print "Found C[$new_layer_count] == $C[$new_layer_count]\n";
+        # exit(0);
     }
 }
 
 
             # print "$x,$y,$z\n";
             my $initial_cuboid =
-                [ map { map { [(1)x$z] } (1 .. $y) } (1 .. $x)];
+                [ map { 
+                    [ map { [(1)x$z] } (1 .. $y) ]
+                    } 
+                    (1 .. $x)
+                ];
 
             $cuboids{"$x,$y,$z"} = 
                 { array => $initial_cuboid, dims => [$x,$y,$z], n => $max_layer_size };