Skip to content

Instantly share code, notes, and snippets.

@dzyubam
Created July 29, 2011 20:17
Show Gist options
  • Save dzyubam/1114636 to your computer and use it in GitHub Desktop.
Save dzyubam/1114636 to your computer and use it in GitHub Desktop.
Project Euler -- Problem 19
from calendar import Calendar
counter = 0
iterator = Calendar()
for y in xrange(1901,2001):
for m in xrange(1,13):
for d in iterator.itermonthdays2(y,m):
if d == (1,6):
counter += 1
print counter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment