moranlxj @ 2024-12-03 15:51:01
#include<stdio.h>
int main(){
int s,v;
scanf("%d %d",&s,&v);
int h1 = 7;
int m1 = 59;
int min = s/v;
int h2 = min/60;
int m2 = min%60;
int nh = h1 - h2;//
int nm = m1 - m2;
if( v == 0 ){
return 1;
}
if (nm < 10) {
nm += 60;
nm -= 10;
nh -= 1;
} else{
nm -= 10;
}
if (nh < 0) {
nh += 24;
}
if(nm < 10 && nh <10){
printf("0%d:0%d",nh,nm);
} else if(nm < 10 && nh>10){
printf("%d:0%d",nh,nm);
} else if(nm > 10 && nh <10){
printf("0%d:%d",nh,nm);
}else{
printf("%d:%d",nh,nm);
}
return 0;
}