Skip to content

Instantly share code, notes, and snippets.

@captainsafia
Created August 18, 2012 21:56
Show Gist options
  • Save captainsafia/3390092 to your computer and use it in GitHub Desktop.
Save captainsafia/3390092 to your computer and use it in GitHub Desktop.
Solution to Project Euler Problem 19 in Python
from datetime import date
sundays=0
for year in range(1901,2001):
for month in range(1,13):
if date(year,month,1).weekday()==6:
sundays+=1
print sundays
@lunayyko
Copy link

lunayyko commented Nov 4, 2021

it prints 171 instead of 172, any thoughts why does it happen?
https://stackoverflow.com/questions/30830522/project-euler-19-python

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment