样例输出很奇怪
# include <bits/stdc++.h>
# define int long long
using namespace std;
int n;
void printt ( int x ) {
if ( x <= 9 ) cout << "0" << x;
return ;
}
signed main( ) {
ios::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
cin >> n;
n = n % ( 60 * 60 * 24 * 1000 );
n /= 1000;
printt( n/3600 ); cout << ":";
printt( n%3600/60 ); cout << ":";
printt( n%60 );
return 0;
}
一会是 25 行的printt无法输出,一会是 29 行的printt无法输出
样例1:
IN:
46800999
OUT:
:00:00
样例2:
IN:
1618708103123
OUT:
01:08:
回复必关