package main
import (
"fmt"
)
func main() {
fmt.Print(ConvToTimeAsString(3667))
}
func ConvToTimeAsString(time int64)string{
// Conv
hrs := time / 3600;
mins :=(time % 3600) / 60;
secs := time % 60;
// Assign Pad Start
var ret = "";
if (hrs > 0) {
hrsPadStart := ""
if hrs < 10 {
hrsPadStart = "0"
}
minsPadStart := ""
if mins < 10 {
minsPadStart = "0"
}
secPadStart := ""
if secs < 10 {
secPadStart = "0"
}
ret += fmt.Sprintf("%v%v:%v%v:%v%v",hrsPadStart,hrs,minsPadStart,mins,secPadStart,secs)
}else if (mins > 0){
minsPadStart := ""
if mins < 10 {
minsPadStart = "0"
}
secPadStart := ""
if secs < 10 {
secPadStart = "0"
}
ret += fmt.Sprintf("%v%v:%v%v",minsPadStart,mins,secPadStart,secs)
} else{
secPadStart := ""
if secs < 10 {
secPadStart = "0"
}
ret += fmt.Sprintf("00:%v%v",secPadStart,secs);
}
return ret;
}