一定要开long long
#include<bits/stdc++.h>
using namespace std;
typedef long long LL;
int main()
{
LL n;cin>>n;
n/=1000; //不算毫秒
//因为不算日期,只算最后一天的时分秒
int time=n%86400; //一天86400秒
//一小时3600秒
int hh=time/3600;
time%=3600; //去掉小时
//1分钟60秒
int mm=time/60;
int ss=n%60; //剩多少秒
printf("%02d:%02d:%02d",hh,mm,ss);
return 0;
}