summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-05-14 22:47:33 -0500
committerJesse Luehrs <doy@tozt.net>2009-05-14 22:47:33 -0500
commit0168c09471c0fb72a38ce50cb4a07973d41c653c (patch)
treef787c7de73a7fbd607f93d770996b83f5d8ab51c
parent5483c6cec2561dd79e9a42f6ff059b69d8f5ccad (diff)
downloadprojecteuler-0168c09471c0fb72a38ce50cb4a07973d41c653c.tar.gz
projecteuler-0168c09471c0fb72a38ce50cb4a07973d41c653c.zip
less stupid solution to 19
-rwxr-xr-x019.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/019.pl b/019.pl
index b0d1cb6..47fc31a 100755
--- a/019.pl
+++ b/019.pl
@@ -6,7 +6,7 @@ use DateTime;
my $day = DateTime->new(year => 1901, month => 1, day => 1);
my $count = 0;
while ($day->year < 2001) {
- $count++ if $day->day_of_week == 7 && $day->day_of_month == 1;
- $day->add(days => 1);
+ $count++ if $day->day_of_week == 7;
+ $day->add(months => 1);
}
print "$count\n";