#include <bits/stdc++.h>
using namespace std;
int main()
{
int c1,c2;
cin>>c1>>c2;
double c=(double)(c2-c1)/100; //注意这里的(double)若没有,样例结果会与答案差一秒,因为c2-c1跟100都是整形,会把除法结果截断为整形
int cround=round(c);
int hh=cround/3600;
cround%=3600;
int mm=cround/60;
cround%=60;
if(hh<10){
cout<<"0";
}
cout<<hh<<":";
if(mm<10){
cout<<"0";
}
cout<<mm<<":";
if(cround<10){
cout<<"0";
}
cout<<cround<<endl;
return 0;
}
PAT basic level 1026程序运行时间
于 2024-02-19 03:36:47 首次发布