diff options
author | Jesse Luehrs <doy@tozt.net> | 2009-05-18 00:18:51 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2009-05-18 00:18:51 -0500 |
commit | 0ad4417f2a736d7b12076ec0a2ba7e722f574542 (patch) | |
tree | 01ae4c5dbd08c30e96ab5b86f087611c1d33b532 | |
parent | 37c4f77fe7c41603b9410728ccd53b9021749717 (diff) | |
download | projecteuler-0ad4417f2a736d7b12076ec0a2ba7e722f574542.tar.gz projecteuler-0ad4417f2a736d7b12076ec0a2ba7e722f574542.zip |
solution to 28
-rwxr-xr-x | 028.pl | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -0,0 +1,13 @@ +#!/usr/bin/perl +use strict; +use warnings; + +my $n = 1; +my $total = $n; +for my $i (1..500) { + for my $j (1..4) { + $n += 2 * $i; + $total += $n; + } +} +print "$total\n"; |