我的代码如下
#include<iostream>
#include<cmath>
using namespace std;
int main(){
int t,h=0,p;
double s,v,m=0,t1;
cin >>s>>v;
t=s/v;
t1=s/v;
if(t>=60){
h=t/60;
m=t%60;
}else m=t1;
p=7-h;
if(p>0) cout<<0;
if(p<0){
if(p>-21){
p+=24;
}else{
cout <<0;
p+=24;
}
}
cout <<p<<":"<<50-ceil(m);
return 0;
}
已经检查过很多遍了,给的测试数据也没问题,但提交后就是有报错,希望有大佬可以指点一下