Kiki最近买了一款新式手表,这款手表有点不同,它只会显示一天内从午夜零时零分零秒(0:0:0)经过的秒数,请你帮他转换为我们熟悉的时间表示方式(即几时几分几秒,24小时进制)
#include <bits/stdc++.h>
voidconvert_seconds_to_time(intt)
{
inthours = t / 3600;
intminutes = (t % 3600) / 60;
intseconds = t % 60;
std::cout << std::setw(2) << std::setfill('0') << hours <<":"
<< std::setw(2) << std::setfill('0') << minutes <<":"
<< std::setw(2) << std::setfill('0') << seconds << std::endl;
}
intmain()
{
intt; // 输入的秒数
std::cin >> t;
convert_seconds_to_time(t);
return0;
}