l,s = [31 if i in(1,3,5,7,8,10,12) else 30 if i in(4,6,9,11) else 28 for i in range(1,13)],0 year,month,day = map(int,input().strip().split()) s += day if (year % 400==True) or (year % 4==True and year % 100==False): ... else: if month > 1: s += 1 for i in range(month-1): s += l[i] print(l) print('输入某年某月某日,判断这一天是这一年的第几天:',s)
输入某年某月某日,判断这一天是这一年的第几天?
最新推荐文章于 2024-04-12 09:49:16 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)