fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int S;
  6. scanf("%d",&S);
  7. printf("与えられた秒単位の時間は%d。\n",S);
  8. int h,m,s;
  9. h=S/3600;
  10. m=(S-3600*h)/60;
  11. s=(S-3600*h-60*m);
  12. printf("%d:%d:%d\n",h,m,s);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5284KB
stdin
3600
stdout
与えられた秒単位の時間は3600。
1:0:0