summaryrefslogtreecommitdiff
path: root/008
diff options
context:
space:
mode:
authorGuillermo Ramos2019-05-14 01:36:02 +0200
committerGuillermo Ramos2019-05-14 01:36:08 +0200
commit010bb22c3846d306e1ab4bfcf17af307082c0965 (patch)
tree298f3243f89a90ae9e5b09ac88df7e4c62ceba37 /008
parent22801e2dc044851e27f22d2f83cd7316589cc99a (diff)
downloadperlweekly-010bb22c3846d306e1ab4bfcf17af307082c0965.tar.gz
[008#1]
Diffstat (limited to '008')
-rw-r--r--008/ch1.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/008/ch1.pl b/008/ch1.pl
new file mode 100644
index 0000000..0327467
--- /dev/null
+++ b/008/ch1.pl
@@ -0,0 +1,10 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+my @mersennes = (2, 3, 5, 7, 13);
+
+foreach my $p (@mersennes) {
+ print 2**($p - 1) * (2**$p - 1), "\n";
+}