参考代码:
n=int(input())
a=86400
s=n//1000%a
h=s//3600
s=s-h*3600
m=s//60
s=s-m*60
if(h<10 and m<10 and s<10 ):
print("0{}:0{}:0{}".format(h,m,s))
elif(h<10 and m<10 ):
print("0{}:0{}:{}".format(h,m,s))
elif(h<10 and s<10 ):
print("0{}:{}:0{}".format(h,m,s))
elif(m<10 and s<10 ):
print("{}:0{}:0{}".format(h,m,s))
elif(h<10 ):
print("0{}:{}:{}".format(h,m,s))
elif(m<10 ):
print("{}:0{}:{}".format(h,m,s))
elif(s<10 ):
print("{}:{}:0{}".format(h,m,s))
0.0分
0 人评分
【偶数求和】 (C++代码)浏览:709 |
成绩转换 (C语言代码)浏览:1009 |
C语言程序设计教程(第三版)课后习题6.3 (C语言代码)浏览:946 |
C语言训练-求s=a+aa+aaa+aaaa+aa...a的值 (C语言代码)浏览:691 |
【金明的预算方案】 (C++代码)浏览:843 |
【魔板】 (C++代码)(时间超限,希望会的帮我改正一下)浏览:743 |
最小公倍数 (C语言代码)浏览:1029 |
用筛法求之N内的素数。 (C语言代码)浏览:669 |
P1000 (C语言代码)浏览:877 |
C语言程序设计教程(第三版)课后习题6.8 (C语言代码)浏览:617 |