luoyu07 @ 2024-04-23 20:14:32
#include<bits/stdc++.h>
using namespace std;
int main()
{
int s,v,t,p;
cin >> s >> v;
t = s / v;
if (s * 1.0 / v > t) {
t = t + 1;
}
if (t == 0) {
cout << "00:00";
} else {
if (t <= 8 * 60 - 10) {
if ((50 - t % 60)%60 >= 10)
cout << "0" << 7 - t / 60 << ":" << (50 - t % 60)%60;
else
cout << "0" << 7 - t / 60 << ":0" << (50 - t % 60)%60;
} else {
t = t - 8 * 60 + 10;
p=t/60;
if ((60 - t % 60)%60 >= 10) {
if(t*1.0/60>(int)(t/60)) p++;
if ((48 - p) % 24 > 10) {
cout << (48 - p) % 24 << ":" << (60 - t % 60)%60;
} else {
cout << "0" << (48 - p) % 24 << ":" << (60 - t % 60)%60;
}
} else {
if ((60 - t % 60)%60) {
cout << (48 - p) % 24 << ":0" << (60 - t % 60)%60;
} else {
cout << "0" << (48 - p) % 24 << ":0" << (60 - t % 60)%60;
}
}
}
}
return 0;
}