代码
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define gc getchar()
ll s,v,x,y,a=7,b=60;
inline ll read(){
ll x=0,m=1;
char ch=gc;
while(!isdigit(ch)){
if(ch=='-') m=-1;
ch=gc;
}
while(isdigit(ch)){
x=x*10+ch-48;
ch=gc;
}
return x*m;
}
inline void write(ll x){
if(x<0){
putchar('-');
write(-x);
return;
}
if(x>=10) write(x/10);
putchar(x%10+'0');
}
signed main(){
s=read(),v=read();
if(s<v) {
cout<<"07:49";
return 0;
}
x=s/v;
if(s%v!=0) ++x;
y=x%60;
x-=y*60;
b=b-x-10;
a+=b/60;
b-=b/60*60;
if(a-y<0) a=a+24-y;
else a-=y;
if(a<10) write(0);
write(a);
cout<<':';
if(b<10) write(0);
write(b);
return 0;
}