计算某天在一年内是第几天

y,m,d = list(map(lambda x:int(x), input().split(' ')))
import time
try:
    my_time=time.strptime('{} {} {}'.format(y,m,d),'%Y %m %d')
#     print('日期:{}-{}-{}'.format(y,m,d))
    print(my_time.tm_yday)
except Exception as ex:
    print(ex)

  

posted @ 2022-06-26 16:37  pie神  阅读(61)  评论(0编辑  收藏  举报