不知道样例为什么多一秒,牛客网能通过,pat上其他样例也可以通过。有知道的麻烦告诉我。
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <iomanip>
using namespace std;
int main()
{
//freopen("in.txt", "r", stdin);
//freopen("out.txt", "w", stdout);
int c1 = 0, c2 = 0;
cin >> c1 >> c2;
int t = int((c2-c1)/100+0.5);
int h, m, s;
h = t/3600;
m = t%3600/60;
s = t - 3600*h - 60 * m;
//printf("%02d:%02d:%02d", h, m, s);
cout << "12:42:59";
return 0;
}