URI Online Judge Solution| 1019 Time Conversion 2

URI Online Judge Solution| 1019 Time Conversion

URI Online Judge | 1019

Time Conversion

Adapted by Neilor Tonin, URI  Brazil |Timelimit: 1

Read an integer value, which is the duration in seconds of a certain event in a factory, and inform it expressed in hours:minutes:seconds.

Input

The input file contains an integer N.

Output

Print the read time in the input file (seconds) converted in hours:minutes:seconds like the following example.

Input SampleOutput Sample
5560:9:16
10:0:1
14015338:55:53

Solution

#include <stdio.h>
int main() {
      int N,h,m,s,a;
      scanf("%d",&N);
      h=N/3600;
      a=N%3600;
      m=a/60;
      s=a%60;
      printf("%d:%d:%d\n",h,m,s);
return 0;
}