#include <iostream>
using namespace std;
int main()
{
long long s,v;
int m,h,t;
cin>>s>>v;
t = double(s)/v+10;
if (double(s)/v+10 - t >0) t+=1;
if (t>480)
{
t -= 480;
t = 1440 -480-t;
h = t/60+8;
m = t%60;
cout<<(h>10 ? "":"0")<<h<<':'<<(m>=10 ? "":"0")<<m;
}
else if (t<480)
{
t = 480-t;
h = t/60;
m = t%60;
cout<<'0'<<h<<':'<<(m>=10 ? "":"0")<<m;
}
if (-t+1440==480) cout<<"00:00";
return 0;
}
以上是代码,恳请各位大牛斧正,以解心头之惑。