<?php
fscanf(STDIN, "%d", $NN);
$N = $NN;
$hours = 0;
$minutes = 0;
$seconds = 0;
// -- HOURS --
if ($N >= 3600) {
$hours = $N/3600;
$hours = (int) $hours;
$N = $NN - $hours * 3600;
}
// -- MINUTES --
if ($N < 3600 && $N >= 60) {
$minutes = $N/60;
$minutes = (int) $minutes;
$N = $N - $minutes * 60;
}
// -- SECONDS --
if ($N < 60) {
$seconds = $N;
$seconds = (int) $N;
}
// -- RESULT --
printf("%d:%d:%d\n", $hours, $minutes, $seconds);
?>
To embed this project on your website, copy the following code and paste it into your website's HTML: