代码如下:
#include<bits/stdc++.h>
using namespace std;
int main() {
int s, v, c, d, e, f;
cin >> s >> v;
c = s / v;
if (s % v != 0)
c++;
c += 10;
if (c / 60 <= 7 or c/60==8 and c%60==0)
{
d = c / 60 +1;
if(c%60==0) d--;
}
else{
d = c / 60 + 1 - 24;
if(c%60==0 ) d--;
}
d = 8 - d;
c %= 60;
if (d <= 10) cout << "0";
if(c!=0)
{
if (60 - c >= 10 )
cout << d << ":" << 60 - c << endl;
else
cout << d << ":0" << 60 - c << endl;
}
else
cout << d << ":00" << endl;
return 0;
}