fork(21) download
  1. #include<iostream>
  2. #include<vector>
  3. using namespace std;
  4. #define MAX 100000
  5. bool v[MAX];
  6. void pre()
  7. {
  8.  
  9. for(int i=2;i<MAX;i++)v[i]=true;
  10. for(int i=2;i<MAX;i++)
  11. {
  12. if(v[i])
  13. for(int j=i;j*i<MAX;j++)
  14. v[j*i]=false;
  15. }
  16. }
  17. int main()
  18. {
  19. pre();
  20. int i;
  21. cin>>i;
  22. cout<<i;
  23. return 0;
  24. }
Runtime error #stdin #stdout 0s 3388KB
stdin
Standard input is empty
stdout
Standard output is empty