求大神指导,DEVC上可以一到洛谷上就出问题(;´д`)ゞ

P1423 小玉在游泳

@[lhwjy](/user/897279) 只能能游上一步的 $98\%$,不是能游此前全程的 $98\%$
by _maojun__ @ 2022-12-12 14:16:14


多打了一个能
by _maojun__ @ 2022-12-12 14:16:33


@[lhwjy](/user/897279) m怎么能用int啊,应该用double啊
by Ja50nY0un9_as_AgNO3 @ 2022-12-12 14:16:47


楼上和楼上的楼上说得对
by Little_x_starTYJ @ 2022-12-12 14:17:23


谢谢大家!!!
by lhwjy @ 2022-12-12 14:18:50


```cpp #include<bits/stdc++.h> using namespace std; int main(){ double n,m=2,b=1; double x,c=2.00; cin>>x; while(m<x){ b++; c*=0.98; m=m+c; } cout<<b; return 0; } ``` 改好了哦
by leoqing @ 2022-12-12 15:20:05


|