-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path15.py
36 lines (27 loc) · 827 Bytes
/
15.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/python
# Problem - http://www.pythonchallenge.com/pc/return/uzi.html
# Thought Process -
# Title - whom?
# Source -
# 1. <!-- he ain't the youngest, he is the second -->
# 2. <!-- todo: buy flowers for tomorrow -->
# Image - A calendar with 26 as circled
# image got a hole with 1xx6 and 1 january as thrusday
# Solution - http://www.pythonchallenge.com/pc/return/mozart.html
# thrusday - 3
import datetime
start = 1006;
while start <= 1996:
if datetime.date(start, 1, 1).weekday() == 3:
# year must be a leap year as feb 29 is given in calendar
if start%4 == 0:
print(start)
start += 10
# 1176, 1356, 1576, 1756, 1976
# so get the second yongest
# 26-jan-1756
# buy flowers for tomorrow-
# 27-jan-1756
# whom?
# Birthday of Wolfgang Amadeus Mozart
# Solution - mozart