Commits

Shlomi Fish committed 798d896

Add some debugging information.

Comments (0)

Files changed (1)

project-euler/88/euler-88.pl

 use warnings;
 
 use integer;
+use IO::Handle;
 
 use List::Util qw(sum);
 
     }
 }
 
-my %numbers = 0;
+my %numbers;
+
+STDOUT->autoflush(1);
 
 for my $n (2 .. 12_000)
 {
-    print "Reached $n\n";
-    $numbers{smallest_product_n($n)}++;
+    my $val = smallest_product_n($n);
+    print "Reached $n = $val\n";
+    $numbers{$val}++;
 }
 
 print "Sum = ", sum(keys(%numbers)), "\n";