求各位大佬们帮我看看哪里错了

x=input()
    year,mon,day=map(int,x.split())
    if year % 4 == 0 and year % 400 != 0:
        def day_run_year(year, mon, day):
        """定义闰年的月份,并返回总天数"""
        sum_day = day
        day_month = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
        for i in day_month[0:mon]:
            sum_day = sum_day + i
        return sum_day
        
        def day_ping_year(year, mon, day):
        """定义平年每月是多少天,并返回总天数"""
        sum_day = day
        day_month = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
        for i in day_month[0:mon]:
            sum_day = sum_day + i
        return sum_day
    
    # 调用函数,输出总天数
    if run_year:
        print(day_run_year(year, mon, day))
    else:
        print(day_ping_year(year, mon, day))
 

上一篇:杂记


下一篇:google chrome字体最小12px的问题