pythonchallenge Level 15

第15关地址:http://www.pythonchallenge.com/pc/return/uzi.html

账号:huge 密码:file

pythonchallenge Level 15

检查源码,得到提示信息:

-- he ain't the youngest, he is the second

-- buy flowers for tomorrow 

再查看图片是个日历

-- 2月有29天,得到是闰年

-- 日历圈了26,根据buy flowers for tomorrow ,推断是27号

-- 1月27日是周二

-- 年份1**6年,也就是年份范围到1000年到2000年之间

先研究下是到底是几几年

import datetime

for year in range(1000,2000):
    if (year % 4 == 0 and year % 100 != 0) or (year % 400) == 0:
        stamp = datetime.datetime(year, 1, 27, 00, 00, 00)
        week = stamp.strftime("%a")
        if week == 'Tue' and str(year)[-1]=='6':
            print(year)

得到符合条件的年份信息

1176
1356
1576
1756
1976

 根据第二年轻的条件,得到是1756年1月27日,百度一下

pythonchallenge Level 15

是莫扎特的生日(Mozart)

获得下一关地址:http://www.pythonchallenge.com/pc/return/mozart.html

上一篇:数组形式的二叉树完全实现


下一篇:Android 图片压缩最常用的几种方法