为什么我这个过不了?
查看原帖
为什么我这个过不了?
1113716
a20111127楼主2024/8/19 20:49

#include<bits/stdc++.h> using namespace std; int main(){ double s,v; cin>>s>>v; double t=s/v; if(t-(int)t==0&&t<=1430){ int t1=int(t)+10; if(t1%60>50){ cout<<7-(t1/60)<<":0"<<60-(t1%60);} else{ cout<<7-(t1/60)<<":"<<60-(t1%60); } } else if(t-(int)t!=0&&t<=1430){ int t1=int(t)+11; if(t1%60>50){ cout<<7-(t1/60)<<":0"<<60-(t1%60);} else{ cout<<7-(t1/60)<<":"<<60-(t1%60); } } return 0; }```c #include<bits/stdc++.h> using namespace std; int main(){ double s,v; cin>>s>>v; double t=s/v; if(t-(int)t==0&&t<=1430){ int t1=int(t)+10; if(t1%60>50){ cout<<7-(t1/60)<<":0"<<60-(t1%60);} else{ cout<<7-(t1/60)<<":"<<60-(t1%60); } } else if(t-(int)t!=0&&t<=1430){ int t1=int(t)+11; if(t1%60>50){ cout<<7-(t1/60)<<":0"<<60-(t1%60);} else{ cout<<7-(t1/60)<<":"<<60-(t1%60); } } return 0; }

2024/8/19 20:49
加载中...