嗯,可以私聊我,一般中午11点左右在线
by BlueStar_zhjy @ 2022-08-06 11:36:47
注意分也要补0
```cpp
#include<iostream>
using namespace std;
int main(){
int s,v;//s路程 v速度
cin>>s>>v;
int t;//t时间 min
if(s%v==0){
t=s/v+10;
}else{
t=s/v+11;
}
int min=480;//8小时对应的分钟
int h,m;//h所需时间的小时,m分钟
if(t>min){
t=t-min;
h=t/60;
m=t-h*60;
if(h>15){
cout<<"0"<<24-h-1<<":";
if(60-m<10) cout<<"0";
cout<<60-m;
}else{
cout<<24-h-1<<":";
if(60-m<10) cout<<"0";
cout<<60-m;
}
}else{
h=t/60;
m=t-h*60;
cout<<"0"<<8-h-1<<":";
if(60-m<10) cout<<"0";
cout<<60-m;
}
return 0;
}
```
by hanzhang666 @ 2022-08-06 12:00:08
@[BlueStar_zhjy](/user/745349)
by hanzhang666 @ 2022-08-06 12:00:32
@[hanzhang666](/user/448940)
OKOK 谢
by BlueStar_zhjy @ 2022-08-06 12:05:36