zgjja


私信TA

用户名:zgjja

访问量:10620

签 名:

X_X

等  级
排  名 147
经  验 7074
参赛次数 0
文章发表 71
年  龄 0
在职情况 学生
学  校
专  业 X_X

  自我简介:

解题思路:
1.本题星期一数字为1,python内建库的星期一默认为0;

2.有些用到日期库的题目同时要注意每周开头日的不同(中国习惯以周一作为一周的起始,美国为周日)。
注意事项:

参考代码:

import calendar
date = list(map(int, input().split()))
# calendar.setfirstweekday(calendar.MONDAY)
print(calendar.weekday(date[0], date[1], date[2]) + 1)


 

0.0分

0 人评分

  评论区