Language: C++

#include <bits/stdc++.h>
using namspace std;
int main(){
	vector<int> seive(2000001);
  	long int n,k;
  	cin >> n;
  	for(int i=0;i<n;i++){
    	cin >> k;
      	seive[k]++;
    }
  	long int not_divisible=0;
  	vector<int> divisible(2000001,0);
  	for(int i=1;i<=2000000;i++){
    	if(seive[i]==0 || divisible[i])
          	continue;
      	if(seive[i]==0 || divisible[i])
          	not_divisible++;
		for(int j=i;j<2000000;j+=i)
          	divisible]j]=1;
    }
  cout << not_divisible;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namspace'
    2 | using namspace std;
      |       ^~~~~~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'vector' was not declared in this scope
    4 |         vector<int> seive(2000001);
      |         ^~~~~~
a.cc:4:9: note: suggested alternatives:
In file included from /usr/include/c++/14/vector:66,
                 from /usr/include/c++/14/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_vector.h:428:11: note:   'std::vector'
  428 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/14/vector:93:13: note:   'std::pmr::vector'
   93 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
a.cc:4:16: error: expected primary-expression before 'int'
    4 |         vector<int> seive(2000001);
      |                ^~~
a.cc:6:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |         cin >> n;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:9: error: 'seive' was not declared in this scope
    9 |         seive[k]++;
      |         ^~~~~
a.cc:12:16: error: expected primary-expression before 'int'
   12 |         vector<int> divisible(2000001,0);
      |                ^~~
a.cc:14:12: error: 'seive' was not declared in this scope
   14 |         if(seive[i]==0 || divisible[i])
      |            ^~~~~
a.cc:14:27: error: 'divisible' was not declared in this scope; did you mean 'not_divisible'?
   14 |         if(seive[i]==0 || divisible[i])
      |                           ^~~~~~~~~
      |                           not_divisible
a.cc:16:12: error: 'seive' was not declared in this scope
   16 |         if(seive[i]==0 || divisible[i])
      |            ^~~~~
a.cc:16:27: error: 'divisible' was not declared in this scope; did you mean 'not_divisible'?
   16 |         if(seive[i]==0 || divisible[i])
      |                           ^~~~~~~~~
      |                           not_divisible
a.cc:19:17: error: 'divisible' was not declared in this scope; did you mean 'not_divisible'?
   19 |                 divisible]j]=1;
      |                 ^~~~~~~~~
      |                 not_divisible
a.cc:21:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   21 |   cout << not_divisible;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~