mirror of
https://github.com/jlengrand/project_euler.git
synced 2026-03-10 08:41:20 +00:00
Prepares problem 19.
Problems 18 and 67 should be completed ! !
This commit is contained in:
28
e_19.py
Executable file
28
e_19.py
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python
|
||||
"""
|
||||
##---
|
||||
# jlengrand
|
||||
#Created on : Thu Jan 19 10:12:06 CET 2012
|
||||
#
|
||||
# DESCRIPTION : Solves problem 19 of Project Euler
|
||||
You are given the following information, but you may prefer to do some research for yourself.
|
||||
|
||||
1 Jan 1900 was a Monday.
|
||||
Thirty days has September,
|
||||
April, June and November.
|
||||
All the rest have thirty-one,
|
||||
Saving February alone,
|
||||
Which has twenty-eight, rain or shine.
|
||||
And on leap years, twenty-nine.
|
||||
A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.
|
||||
How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
|
||||
##---
|
||||
"""
|
||||
def first_sundays():
|
||||
"""
|
||||
"""
|
||||
|
||||
return 1
|
||||
|
||||
if __name__ == '__main__':
|
||||
print "Answer : %d" % (first_sundays())
|
||||
Reference in New Issue
Block a user