fork download
  1. #include <fstream>
  2. # define maxx 1000
  3. using namespace std;
  4. bool c[1009],nciur;
  5. int ciur[
  6. void ciuratostene()
  7. {
  8. int i , j ;
  9. ciur[++nciur]=2;
  10. for(i=3;i<=maxx;i+=2)
  11. {
  12. if(c[i]==0)
  13. {
  14. ciur[++nciur]=i;
  15. if(1LL*i*i<=1LL*maxx)
  16. for(int j=i*i;j<=maxx;j+=i)
  17. c[j]=1;
  18. }
  19. }
  20. }
  21. int main ()
  22. {
  23. int n,k,x,nr=0;
  24. in>>n;
  25. for(k=1;k<=n;k++)
  26. {in>>x;
  27. if(c[x]==0 && sqrt(x) * sqrt(x)==x)
  28. nr++;}
  29. out<<nr;
  30. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:6:1: error: expected primary-expression before 'void'
 void ciuratostene()
 ^
prog.cpp:6:1: error: expected ']' before 'void'
stdout
Standard output is empty