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 Sample | Output Sample |
556 | 0:9:16 |
1 | 0:0:1 |
140153 | 38:55:53 |
#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;
}
- How to Use URI Online Judge to Improve Your Coding Skills and Boost Your Career
- BEST FREE GIFT CARD GENERATOR in 2022
- উইন্ডোজ 11 এসে গেল, নজরকাড়া লুক, তাক লাগানো ফিচার্স!
- URI 2694 Solved by C programming
- URI Online Solve | 1957 Converting to Hexadecimal- Solution
- Android custom toolbar Android Studio | Android Tutorial
- URI Online Judge | 1040 Solution | Average 3
- URI Online Judge | 1038 Solution |Snack
- URI Online Judge | 1037 Solution | Interval
- URI Online Judge | 1036 Solution | Bhaskara’s Formula
- URI Online Judge Solution| 1035 Selection Test 1
- URI Online Judge Solution| 1021 Banknotes and Coins
- URI Online Judge Solution| 1020 Age in Days
- URI Online Judge Solution| 1019 Time Conversion
- URI Online Judge Solution| 1018 Banknotes