fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int S,m,h,s;
  5.  
  6. scanf("%d",&S);
  7.  
  8. h=S/3600;
  9.  
  10. printf("%d:",h);
  11.  
  12. m=S/60-h*60;
  13.  
  14. printf("%d:",m);
  15.  
  16. s=S-m*60-h*3600;
  17.  
  18. printf("%d",s);
  19. return 0;
  20. }
  21.  
Success #stdin #stdout 0s 5308KB
stdin
3800
stdout
1:3:20