时间转换

This commit is contained in:
flykhan 2023-03-30 15:07:31 +08:00
parent 8f5fa9a3ed
commit b5eca043a5
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#include <cstdio>
int main()
{
int N;
int h, m, s;
scanf("%d", &N);
h = N / (60 * 60);
m = N % (60 * 60) / 60;
// s = N - h * (60 * 60) - m * 60;
s = N % 60;
printf("%d:%d:%d", h, m, s);
return 0;
}