(模板)筛素数

树下

2018-09-11 20:16:43

Personal

``` int pd(int x){ if(x<2) return 0; for(int i=2;i*i<=x;i++) if(x%i==0) return 0; return 1; } ```