下面是内存溢出 jb51.cc 通过网络收集整理的代码片段。
内存溢出小编现在分享给大家,也给大家做个参考。
def is_leap_year(Year): if Year % 4 == 0 and Year % 100 != 0 or Year % 400 == 0: return True else: return False def year_month_days(Year,Month): if Month in (1,3,5,7,8,10,12): return 31 elif Month in (4,6,9,11): return 30 elif is_leap_year(Year): return 29 else: return 28 def year_days(Year): if is_leap_year(Year): return 366 else: return 365 def weekday_year_month(Year,Month): Weekday = 2 for year in range(1800,Year): Weekday = (Weekday + year_days(year) ) % 7 for month in range(1,Month + 1): Weekday = (Weekday + year_month_days(Year,month)) % 7 print Weekday Y = int(raw_input())M = int(raw_input()) weekday_year_month(Y,M)
以上是内存溢出(jb51.cc)为你收集整理的全部代码内容,希望文章能够帮你解决所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
总结以上是内存溢出为你收集整理的你出生的那一年的那一个月的那一天是星期几全部内容,希望文章能够帮你解决你出生的那一年的那一个月的那一天是星期几所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)