fork download
  1. # Golfed:
  2. # n=input();e=float;d=864e2
  3. # if':'in n:a,b,c=n.split(':');print(e(a)*3600+e(b)*60+e(c))/d
  4. # else:n=e(n);print'%02d:%02d:%02d'%(n*24%25,n*1440%60,n*d%60)
  5.  
  6. exec"""
  7. n=input();e=float;d=864e2
  8. if':'in n:a,b,c=n.split(':');print n,'->',(e(a)*3600+e(b)*60+e(c))/d
  9. else:n=e(n);print n,'->','%02d:%02d:%02d'%(n*24%25,n*1440%60,n*d%60)"""*5
Success #stdin #stdout 0.01s 7696KB
stdin
'02:57:46'
'23:42:12'
'0.5'
'0.05816'
'1'
stdout
02:57:46 -> 0.123449074074
23:42:12 -> 0.987638888889
0.5 -> 12:00:00
0.05816 -> 01:23:45
1.0 -> 24:00:00