summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-09-29 04:37:57 -0400
committerJesse Luehrs <doy@tozt.net>2016-09-29 04:37:57 -0400
commit170178579a93dbc8deaee328fefdb2f02c57df4f (patch)
treedee3603836e4d4c60147b5b6f0a5900a5e059a1d
parent8204a99f8bde2bc80abd781330a339ee450472d3 (diff)
downloadprojecteuler-170178579a93dbc8deaee328fefdb2f02c57df4f.tar.gz
projecteuler-170178579a93dbc8deaee328fefdb2f02c57df4f.zip
problem 63
-rw-r--r--063.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/063.pl b/063.pl
new file mode 100644
index 0000000..0a0f6a1
--- /dev/null
+++ b/063.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use 5.014;
+
+my $count = 0;
+my $exp = 1;
+while (1) {
+ my $seen;
+ for my $base (1..9) {
+ if ($exp * (log($base) / log(10)) >= $exp - 1) {
+ $count++;
+ $seen = 1;
+ }
+ }
+ last unless $seen;
+ $exp++;
+}
+
+say $count;