lanqiao 1452 时间显示
This commit is contained in:
18
12lanqiao/test6.cpp
Normal file
18
12lanqiao/test6.cpp
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
// lanqiao 1452 时间显示
|
||||||
|
#include<bits/stdc++.h>
|
||||||
|
using namespace std;
|
||||||
|
#define int long long // 10e18 需要开long long
|
||||||
|
signed main(){
|
||||||
|
int n; cin >> n;
|
||||||
|
n /= 1000;
|
||||||
|
int h = n / 3600;
|
||||||
|
n -= h * 3600;
|
||||||
|
int m = n / 60;
|
||||||
|
n -= m * 60;
|
||||||
|
h %= 24;
|
||||||
|
printf("%02d:%02d:%02d\n", h, m, n);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
/* test samples -> 13:00:00 01:08:23
|
||||||
|
46800999 1618708103123
|
||||||
|
*/
|
||||||
Reference in New Issue
Block a user