diff options
-rwxr-xr-x | 019.pl | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -0,0 +1,12 @@ +#!/usr/bin/perl +use strict; +use warnings; +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); +} +print "$count\n"; |