@[Echo_sun](/user/691776) 代码有点丑,还请见谅
```c++
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
double s, v;
cin >> s >> v;
int t = ceil(s/v) + 10;
int h = t / 60;
int m = t % 60;
if (h < 8)
{
if (m == 0)
{
h = 8 - h;
m = 0;
}
else
{
h = 7 - h;
m = 60 - m;
}
}
else
{
h -= 8;
if (h == 0)
{
if (m != 0)
{
h = 23;
m = 60 - m;
}
}
else
{
h = 24 - h;
if (m != 0)
{
h -= 1;
m = 60 - m;
}
}
}
if (h < 10)
{
if (m < 10)
cout << "0" << h << ":" << "0" << m;
else
cout << "0" << h << ":" << m;
}
else
{
if (m < 10)
cout << h << ":" << "0" << m;
else
cout << h << ":" << m;
}
return 0;
}
```
by Jasper08 @ 2022-03-08 23:27:13
@[Jasper08](/user/581830) 懂了,谢谢!
by Echo_sun @ 2022-03-09 19:13:43