Skip to content

Instantly share code, notes, and snippets.

@regivm
Forked from captainsafia/pe_019.py
Created July 3, 2017 09:15
Show Gist options
  • Save regivm/dedb4232188a09300a2871d290eb43b6 to your computer and use it in GitHub Desktop.
Save regivm/dedb4232188a09300a2871d290eb43b6 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment