### @[Haidde](/user/1215070)
C语言AC代码
```c
#include <stdio.h>
int main() {
double n, sum = 2, a = 2;
int i = 1;
scanf("%lf", &n);
while(sum < n) {
a *= 0.98;
sum += a;
i++;
}
printf("%d\n", i);
return 0;
}
```
### 祝你 $ AK $ $ IOI $
by cyx012113 @ 2024-02-06 10:57:25
@[Haidde](/user/1215070)
用 `while` 循环(因为要重复直到他走完路程)
by cyx012113 @ 2024-02-06 10:59:54