题目
思路:
很简单的一道题,主要注意两点:
(1)对秒的四舍五入
(2)输出时时分秒不足两位的进行补零操作
c1,c2=input().split(' ')
runtime=int(c2)-int(c1)
second=round(runtime/100)
hour,second=divmod(second,60*60)
minute,second=divmod(second,60)
print(str(hour).zfill(2)+':'+str(minute).zfill(2)+':'+str(second).zfill(2))
学习的函数,对字符串的补零操作
str('9090').zfill(5)
#输出结果为 09090