注
意
:
\color{red}注意:
注意:
四舍五入可以通过对浮点数加0.5再取整而获得
#include <string>
#include <cstdio>
#include <iostream>
#include <set>
#include <algorithm>
using namespace std;
int main(){
int c1, c2;
cin >> c1 >> c2;
int t = (c2 - c1) / 100.0 + 0.5;
int h = t / 3600;
int m = t % 3600 / 60;
int s = t % 60;
printf("%02d:%02d:%02d\n", h, m, s);
return 0;
}