fork download
  1. #!/usr/bin/perl -plaF:
  2. $_=$#F?($F[0]*60+$F[1]+$F[2]/60)/1440:sprintf"%02d:%02d:%02d",$h=$_*24,$m=($h-int$h)*60,($m-int$m)*60
Success #stdin #stdout 0s 17496KB
stdin
12:00:00
0.5
01:23:45
0.05816
02:57:46
23:42:12
0
1
stdout
0.5
12:00:00
0.0581597222222222
01:23:45
0.123449074074074
0.987638888888889
00:00:00
24:00:00