##求助c语言0分垃圾

P1423 小玉在游泳

```cpp #include<stdio.h> int main() { double x,k=2,s=0; scanf("%lf",&x); // cin>>x; int m=0;//s为走了的总距离 while(x>s){ s+=k; k=k*98.0/100.0; m++; } printf("%d",m); return 0; } ```
by Yizhixiaoyun @ 2022-09-16 18:26:56


这样就过了
by Yizhixiaoyun @ 2022-09-16 18:27:21


@[zhazhaqi77](/user/798029) 楼上正解
by WA_sir @ 2022-09-16 18:35:45


@[Yizhixiaoyun](/user/590864) 所以就是double s的问题我哭死;谢谢您!
by zhazhaqi77 @ 2022-09-18 14:23:27


|