题解 | #计算日期到天数转换#

计算日期到天数转换

http://www.nowcoder.com/practice/769d45d455fe40b385ba32f97e7bcded

import datetime
my_map = map(int, input().split(' '))
# You can also use *args and **kwargs to pass in 
# parameters from lists (or any iterable) and dicts (or any mapping)
ot=datetime.datetime(*my_map)
# strftime("%j"):Day of the year as a zero-padded decimal number.
ot=ot.strftime("%j").lstrip("0")

print(ot)
全部评论

相关推荐

评论
1
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务