'''
time: 12:00:00 plus 1 second
time result : 12:00:01
'''
t1 = input("pls input the time: ")
list1 = t1.split(":")
hour = eval(list1[0])
minute = eval(list1[1])
second = eval(list1[2])
if hour > 24 or minute > 59 or second > 59 :
print("pls input the right format")
exit()
if second < 59 :
print("%d:%d:%d"%(hour,minute,second + 1))
else:
if minute < 59 :
print("%d:%d:00"%(hour,minute + 1))
else:
if hour < 23 :
print("%d:00:00"%(hour + 1))
else:
print("00:00:00")
点击查看更多内容
为 TA 点赞
评论
共同学习,写下你的评论
评论加载中...
作者其他优质文章
正在加载中
感谢您的支持,我会继续努力的~
扫码打赏,你说多少就多少
赞赏金额会直接到老师账户
支付方式
打开微信扫一扫,即可进行扫码打赏哦