求助!!为什么全WA,测试点下载下来也对了

P5736 【深基7.例2】质数筛

```cpp bool zhishu(int x){ if(x==0 || x==1) return 0; for(int i=2;i*i<=x;i++){ if(x%i==0){ return 0; } return 1; } } ``` return 1; 写错地方了,应该写循环外面
by jesse1216 @ 2024-01-30 09:43:33


@[weizekai](/user/1016066) 你确定`return 1`要写在for里面吗
by rgw2010__ @ 2024-01-30 09:43:58


@[weizekai](/user/1016066)
by jesse1216 @ 2024-01-30 09:44:14


@[jesse1216](/user/530437) 明白了 感谢大佬
by weizekai @ 2024-01-30 09:52:12


|