CPP_Basics_Syntax/第一讲 变量、输入输出、表达式与顺序语句/654.cpp

15 lines
236 B
C++
Raw Normal View History

2023-03-30 15:07:31 +08:00
#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;
}