@[zhizhi_c](/user/768144)
```cpp
for(x=1;a[x]<=n;x++) a[x]=a[x-1]*2;
```
改成
```cpp
for(x=1;a[x-1]<=n;x++) a[x]=a[x-1]*2;
```
就A了
因为判断a[x]的话,x刚++完,总是零
by _Anonymous_ @ 2022-08-30 08:08:11
@[_Anonymous_](/user/381926) 谢谢大佬帮助
by zhizhi_c @ 2022-08-30 10:10:23