@[jfy2204](/user/877497) 如果小鱼一次就游过监视器范围了呢(n>12)
by wangcaizsr @ 2023-06-07 20:43:11
特殊判定!!!
by Ellison_Z @ 2023-06-07 20:50:01
本蒟蒻才疏学浅,请大佬指教!
by jfy2204 @ 2023-06-07 20:50:53
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
double v=7,s,x,l=0;//v速度,s,x如题意
cin>>s>>x;
while(l<s-x){//游进探测器
l+=v;//路程累加
v*=0.98;//速度减慢
}
if(v*0.98<=s+x-l)cout<<'y';
else cout<<'n';
}
```
@[jfy2204](/user/877497)
by smart_ @ 2023-06-08 22:39:58
可以试试我的代码
```python
import random as r
a=r.randint(1,2)
if(a==1):
print("y")
else:
print("n")
```
by jishu @ 2023-06-14 21:07:07
多试几次就好
by jishu @ 2023-06-14 21:07:35
@[jishu](/user/890054) 随机大法哈哈哈
by JamesZhan @ 2023-08-04 22:27:22
```
#include<bits/stdc++.h>
using namespace std;
int main(){
double v=7,s,x,l=0;
cin>>s>>x;
while(l<s-x){
l+=v;
v*=0.98;
}
if(v*0.98<=s+x-l){
cout<<'y';
}
else{
cout<<'n';
}
return 0;
}
```
by all___right @ 2023-08-21 09:23:59
@[Ellison_Z](/user/797905)
不用特判吧,比大小就够了
by all___right @ 2023-08-21 09:24:35