传送门
#include<bits/stdc++.h>
using namespace std;
int main(){
double s,v,t;
int x=470,y,z;
cin>>s>>v;
t=ceil(s/v);
x-=t;
if(t>x){
x+=1440;
}
y=x/60;
z=x%60;
if(y<10){
if(z<10)
cout<<0<<y<<":"<<0<<z;
else
cout<<0<<y<<":"<<z;
}else{
if(z<10)
cout<<y<<":"<<0<<z;
else
cout<<y<<":"<<z;
}
return 0;
}