0003-编程打卡:判断第几天
本帖最后由 不二如是 于 2022-8-29 17:45 编辑答案一
year=int(input('year:'))
month = int(input('month:'))
day = int(input('day:'))
if not year%400 or (not year%4 and year%100) :
year = 1
else:
year = 0
if month == 12 :
day += 30
month = 11
if month == 11 :
day += 31
month = 10
if month == 10 :
day += 30
month = 9
if month == 9 :
day += 31
month = 8
if month == 8 :
day += 31
month = 7
if month == 7 :
day += 30
month = 6
if month == 6 :
day += 31
month = 5
if month == 5 :
day += 30
month = 4
if month == 4 :
day += 31
month = 3
if month == 3 :
day += 28+year
month = 2
if month == 2 :
day += 31
month = 1
if month == 1 :
print(day)
答案二
**** Hidden Message *****
答案三
**** Hidden Message ***** Python好好玩 Python好好玩 Python好好玩 Python好好玩 Python好好玩 Python好好玩 Python太好玩 Python好好玩 Python好好难 Python好好玩,有没有更精简的{:10_256:}
页:
[1]