year=int(input ("请输入年"))
month=int(input("请输入月"))
day=int(input("请输入日期"))
if year%4==0 and year%100!=0 or year%400==0:
##判断这个是闰年,闰年是29天
a=[31,29,31,30,31,30,31,31,30,31,30,31]
b=0
if month==1:
print(day)
else:
for month in range(1,month):
b=b+a[month-1]
e=b+day
print("今天是{}年{}月{}日,今天是今年的第{}天".format(year,month+1,day,e))
else: ##判断这个不是闰年,2月是28天
c=[31,28,31,30,31,30,31,31,30,31,30,31]
d=0
for month in range(1,month):
d=d+c[month-1]
f=d+day
print("今天是{}年{}月{}日,今天是今年的第{}天".format(year,month+1,day,f))
第一次写,可能有些复杂,加油
有什么问题都可以问我,这个我自己写的
那些十行就可以搞定的大神,真牛,还是要自己写才知道
#python



