输入一个总秒数,计算几小时,几分钟,几秒。
if __name__ == '__main__':
second = int(input("请输入总秒数:"))
if second >= 3600:
time = second // 3600
second = second % 3600
else:
time = 0
if second > 60:
minute = second //60
second = second % 60
else:
minute = 0
print("{0}小时,{1}分钟,{2}秒".format(time,minute,second))