stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int checkPrimeNumber(int n)

{

  int x = 1 ;



  for(int i = 2; i <= n/2; ++i)

  {

      if(n%i == 0)

      {

          x= 0;

          break;

      }

  }

  return x;

}



int main()

{

    std::ios::sync_with_stdio(false);

    int n;

    cin>>n;

    for(int i=n;i<=100009;i++)

    {

      if(checkPrimeNumber(i))

        {

            cout<<i<<endl;

            return 0;

        }

    }



}


// Faster C++ solution for the same problem (measured speedup: 4.778461008189645x):
#include<stdio.h>

#include<math.h>

int main()

{

    long long int X,i,j,d,prym,num;

    scanf("%lld",&X);

    if(X==1||X==2)

    {

        printf("2");

    }

    else if(X==3)

    {

        printf("3");

    }

    else

    {

        for(i=X; 1; i++)

        {

            for(j=2; j<=sqrt(i); j++)

            {

                if(i%j==0)

                {

                    num=0;

                    break;

                }

                else num=1;

            }

            if(num==1)

            {

                printf("%lld",i);

                break;

            }

        }

    }



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

bool isPrime(int n)

{

    for (int i = 2; i < n; i++)

    {

        if (n % i == 0) return false;

    }

    return true;

}

int main()

{

    ios_base::sync_with_stdio(false);

    int x;

    cin>>x;

    while(1)

    {

        if(isPrime(x))

        {

            cout<<x;

            break;

        }

        else x++;

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 4.795975497336824x):
#include<stdio.h>

#include<math.h>

int main()

{

    long long int X,i,j,d,prym,num;

    scanf("%lld",&X);

    if(X==1||X==2)

    {

        printf("2");

    }

    else if(X==3)

    {

        printf("3");

    }

    else

    {

        for(i=X; 1; i++)

        {

            for(j=2; j<=sqrt(i); j++)

            {

                if(i%j==0)

                {

                    num=0;

                    break;

                }

                else num=1;

            }

            if(num==1)

            {

                printf("%lld",i);

                break;

            }

        }

    }



    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

    int n,i;

    cin>>n;



    again:

    int c=0;

    for(i = 2; i <= n / 2; ++i)

  {

      if(n % i == 0)

      {

          c++;

          n++;

          goto again;



      }



  }

  if(c==0)

  {

      cout<<n;

  }

}




// Faster C++ solution for the same problem (measured speedup: 4.708178450445927x):
#include<stdio.h>

#include<math.h>

int main()

{

    long long int X,i,j,d,prym,num;

    scanf("%lld",&X);

    if(X==1||X==2)

    {

        printf("2");

    }

    else if(X==3)

    {

        printf("3");

    }

    else

    {

        for(i=X; 1; i++)

        {

            for(j=2; j<=sqrt(i); j++)

            {

                if(i%j==0)

                {

                    num=0;

                    break;

                }

                else num=1;

            }

            if(num==1)

            {

                printf("%lld",i);

                break;

            }

        }

    }



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define REP(i, n) for(int i = 0; i < (int)(n); i++)

#define REPR(i, n) for(int i = (int)(n); i > 0; i--)

#define FOR(i, m, n) for(int i = (int)(m); i < (int)(n); i++)

#define INF 2e9

#define ALL(v) (v).begin(), (v).end()

template <typename Iter> std::string join(Iter begin, Iter end, std::string const& separator){ std::ostringstream result; if (begin != end){ result << *begin++; }; while (begin != end){ result << separator << *begin++; }; return result.str(); }

using namespace std;

typedef long long ll;

void solve() {

  ll x;

  cin >> x;

  vector<ll> prime_list;

  FOR(i, 2, x * 2) {

    bool is_prime = true;

    for(auto j: prime_list) {

      if(i % j == 0) {

        is_prime = false;

        break;

      }

    }

    if(is_prime) {

      if(x <= i) {

        cout << i << endl;

        return;

      }

      prime_list.push_back(i);

    }

  }

}

int main() {

  cin.tie(0);

  ios::sync_with_stdio(false);

  solve();

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.410335737495774x):
#include<stdio.h>

#include<math.h>

int main()

{

    long long int X,i,j,d,prym,num;

    scanf("%lld",&X);

    if(X==1||X==2)

    {

        printf("2");

    }

    else if(X==3)

    {

        printf("3");

    }

    else

    {

        for(i=X; 1; i++)

        {

            for(j=2; j<=sqrt(i); j++)

            {

                if(i%j==0)

                {

                    num=0;

                    break;

                }

                else num=1;

            }

            if(num==1)

            {

                printf("%lld",i);

                break;

            }

        }

    }



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;





typedef long long ll;



ll ub;

bitset <10000010> prime;

vector <ll> primelist ;





void sieve(ll n) {

	prime.set (); // set all bits to 1

	prime [0] = prime [1] = 0; // 0 and 1 are not primes



	for (ll i = 4; i <= n; i += 2) { // even > 2 is not prime

		prime[i] = 0;

	}



	for (ll i = 3; (i * i) <= n; i += 2) { // the odd numbers are primes?

		if (prime[i]) { // i is still marked as prime?

			for (ll j = i * i; j < n; j += i) {

				prime[j] = 0; // multiples of i are not primes

			}

		}

	}



	for (ll i = 2; i <= n; i++) { // create list of primes in [0..ub]

		if (prime[i]) {

			primelist.push_back(i);

		}

	}

}



bool isPrime( ll n )

{

	// O(1) for numbers n <= ub!

	if (n <= ub) return prime[n];



	// takes a little longer if n > ub!

	for (int i = 0; i < (int) primelist .size (); i++) {

		if (n % primelist [i] == 0) {

			return false;

		}

	}



	return true;

}



int main()

{

    ios_base::sync_with_stdio( false ); 

    cin.tie( NULL );



	ll x;

	cin >> x;



	ub = 100500;

 	sieve(ub);



 	if(isPrime(x)) cout << x << endl;

 	else 

 	{

 		ll a;

 		for (a = x; true; ++a)

 		{

 			if(isPrime(a)){

 				break;

 			}

 		}



 		cout << a << endl;

 	}



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 14.555795005108601x):
#include<stdio.h>

#include<math.h>

int main()

{

    long long int X,i,j,d,prym,num;

    scanf("%lld",&X);

    if(X==1||X==2)

    {

        printf("2");

    }

    else if(X==3)

    {

        printf("3");

    }

    else

    {

        for(i=X; 1; i++)

        {

            for(j=2; j<=sqrt(i); j++)

            {

                if(i%j==0)

                {

                    num=0;

                    break;

                }

                else num=1;

            }

            if(num==1)

            {

                printf("%lld",i);

                break;

            }

        }

    }



    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;





typedef long long ll;



ll ub;

bitset <10000010> prime;

vector <ll> primelist ;





void sieve(ll n) {

	prime.set (); // set all bits to 1

	prime [0] = prime [1] = 0; // 0 and 1 are not primes



	for (ll i = 4; i <= n; i += 2) { // even > 2 is not prime

		prime[i] = 0;

	}



	for (ll i = 3; (i * i) <= n; i += 2) { // the odd numbers are primes?

		if (prime[i]) { // i is still marked as prime?

			for (ll j = i * i; j < n; j += i) {

				prime[j] = 0; // multiples of i are not primes

			}

		}

	}



	for (ll i = 2; i <= n; i++) { // create list of primes in [0..ub]

		if (prime[i]) {

			primelist.push_back(i);

		}

	}

}



bool isPrime( ll n )

{

	// O(1) for numbers n <= ub!

	if (n <= ub) return prime[n];



	// takes a little longer if n > ub!

	for (int i = 0; i < (int) primelist .size (); i++) {

		if (n % primelist [i] == 0) {

			return false;

		}

	}



	return true;

}



int main()

{

    ios_base::sync_with_stdio( false ); 

    cin.tie( NULL );



	ll x;

	cin >> x;



	ub = 100500;

 	sieve(ub);



 	if(isPrime(x)) cout << x << endl;

 	else 

 	{

 		ll a;

 		for (a = x; true; ++a)

 		{

 			if(isPrime(a)){

 				break;

 			}

 		}



 		cout << a << endl;

 	}



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.136486449192733x):
#include <iostream>



using namespace std;



bool prime(int x)

{

    for(int i=2;i*i<=x;i++)

    {

        if(x%i==0)

            return false;

    }

    return true;

}





int main()

{

    int x;

    scanf("%d",&x);

    while(true)

    {

     if(prime(x)){

        printf("%d\n",x);

        return 0;}

    x++;

    }

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;





typedef long long ll;



ll ub;

bitset <10000010> prime;

vector <ll> primelist ;





void sieve(ll n) {

	prime.set (); // set all bits to 1

	prime [0] = prime [1] = 0; // 0 and 1 are not primes



	for (ll i = 4; i <= n; i += 2) { // even > 2 is not prime

		prime[i] = 0;

	}



	for (ll i = 3; (i * i) <= n; i += 2) { // the odd numbers are primes?

		if (prime[i]) { // i is still marked as prime?

			for (ll j = i * i; j < n; j += i) {

				prime[j] = 0; // multiples of i are not primes

			}

		}

	}



	for (ll i = 2; i <= n; i++) { // create list of primes in [0..ub]

		if (prime[i]) {

			primelist.push_back(i);

		}

	}

}



bool isPrime( ll n )

{

	// O(1) for numbers n <= ub!

	if (n <= ub) return prime[n];



	// takes a little longer if n > ub!

	for (int i = 0; i < (int) primelist .size (); i++) {

		if (n % primelist [i] == 0) {

			return false;

		}

	}



	return true;

}



int main()

{

    ios_base::sync_with_stdio( false ); 

    cin.tie( NULL );



	ll x;

	cin >> x;



	ub = 100500;

 	sieve(ub);



 	if(isPrime(x)) cout << x << endl;

 	else 

 	{

 		ll a;

 		for (a = x; true; ++a)

 		{

 			if(isPrime(a)){

 				break;

 			}

 		}



 		cout << a << endl;

 	}



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.201578794819987x):
#include<bits/stdc++.h>



using namespace std;



#define TC ll t; cin >> t; while(t--)

typedef long long ll;

#define mx 100005



int main()

{

    //freopen("input.txt", "r", stdin);

    //freopen("output.txt", "w", stdout);

    ll x,i;

    cin >> x;

    bool vis[mx];

    memset(vis,0,sizeof(vis));

    for(i=2;i<=mx;i++)

    {

        if(vis[i]) continue;

        if(i>=x) break;

        for(ll j=i;j<=mx;j+=i) vis[j]=1;

    }

    cout << i << endl;

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;



bool prime[1000001];



int sieve(int n){

  for(int i=2;i<1000001;i++){

    prime[i]=true;

  }

  prime[0]=false;

  prime[1]=false;

  for(long long i=2;i<1000001;i++){

    if(prime[i]==true){

        for(long long j=i*i;j<1000001;j+=i){

            prime[j]=false;

        }

    }

    if(i==n && prime[n]==true){

        return n;

    }else if(prime[i]==true && i>n){

        return i;

    }

  }

}



int main()

{

    int n;

    scanf("%d",&n);

    printf("%d\n",sieve(n));

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 3.6029463726886006x):
#include<bits/stdc++.h>



using namespace std;



#define TC ll t; cin >> t; while(t--)

typedef long long ll;

#define mx 100005



int main()

{

    //freopen("input.txt", "r", stdin);

    //freopen("output.txt", "w", stdout);

    ll x,i;

    cin >> x;

    bool vis[mx];

    memset(vis,0,sizeof(vis));

    for(i=2;i<=mx;i++)

    {

        if(vis[i]) continue;

        if(i>=x) break;

        for(ll j=i;j<=mx;j+=i) vis[j]=1;

    }

    cout << i << endl;

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;





typedef long long ll;



ll ub;

bitset <10000010> prime;

vector <ll> primelist ;





void sieve(ll n) {

	prime.set (); // set all bits to 1

	prime [0] = prime [1] = 0; // 0 and 1 are not primes



	for (ll i = 4; i <= n; i += 2) { // even > 2 is not prime

		prime[i] = 0;

	}



	for (ll i = 3; (i * i) <= n; i += 2) { // the odd numbers are primes?

		if (prime[i]) { // i is still marked as prime?

			for (ll j = i * i; j < n; j += i) {

				prime[j] = 0; // multiples of i are not primes

			}

		}

	}



	for (ll i = 2; i <= n; i++) { // create list of primes in [0..ub]

		if (prime[i]) {

			primelist.push_back(i);

		}

	}

}



bool isPrime( ll n )

{

	// O(1) for numbers n <= ub!

	if (n <= ub) return prime[n];



	// takes a little longer if n > ub!

	for (int i = 0; i < (int) primelist .size (); i++) {

		if (n % primelist [i] == 0) {

			return false;

		}

	}



	return true;

}



int main()

{

    ios_base::sync_with_stdio( false ); 

    cin.tie( NULL );



	ll x;

	cin >> x;



	ub = 100500;

 	sieve(ub);



 	if(isPrime(x)) cout << x << endl;

 	else 

 	{

 		ll a;

 		for (a = x; true; ++a)

 		{

 			if(isPrime(a)){

 				break;

 			}

 		}



 		cout << a << endl;

 	}



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.0870028287281714x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

  int n,m;

  cin>>n;

  for(int i=n;;)

  {

      m=i/2;

      int flag=0;

      if(i==2)

      {

          cout<<i<<endl;

          break;

      }

      else

      {

          for(int j=2;j<=m;j++)

          {

              if(i%j==0)

              {

                  flag=1;

                  break;

              }



          }

          if(flag==0)

          {

              cout<<i<<endl;

              break;

          }

          else

          {

              i++;

          }

      }





  }

  return 0;









}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;



bool prime[1000001];



int sieve(int n){

  for(int i=2;i<1000001;i++){

    prime[i]=true;

  }

  prime[0]=false;

  prime[1]=false;

  for(long long i=2;i<1000001;i++){

    if(prime[i]==true){

        for(long long j=i*i;j<1000001;j+=i){

            prime[j]=false;

        }

    }

    if(i==n && prime[n]==true){

        return n;

    }else if(prime[i]==true && i>n){

        return i;

    }

  }

}



int main()

{

    int n;

    scanf("%d",&n);

    printf("%d\n",sieve(n));

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.051968010599881x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

  int n,m;

  cin>>n;

  for(int i=n;;)

  {

      m=i/2;

      int flag=0;

      if(i==2)

      {

          cout<<i<<endl;

          break;

      }

      else

      {

          for(int j=2;j<=m;j++)

          {

              if(i%j==0)

              {

                  flag=1;

                  break;

              }



          }

          if(flag==0)

          {

              cout<<i<<endl;

              break;

          }

          else

          {

              i++;

          }

      }





  }

  return 0;









}
// Slower C++ solution:
#include<bits/stdc++.h>



using namespace std;



#define TC ll t; cin >> t; while(t--)

typedef long long ll;

#define mx 100005



int main()

{

    //freopen("input.txt", "r", stdin);

    //freopen("output.txt", "w", stdout);

    ll x,i;

    cin >> x;

    bool vis[mx];

    memset(vis,0,sizeof(vis));

    for(i=2;i<=mx;i++)

    {

        if(vis[i]) continue;

        if(i>=x) break;

        for(ll j=i;j<=mx;j+=i) vis[j]=1;

    }

    cout << i << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.4021768541700463x):
#include<bits/stdc++.h>

using namespace std;

int main()

{

  int n,m;

  cin>>n;

  for(int i=n;;)

  {

      m=i/2;

      int flag=0;

      if(i==2)

      {

          cout<<i<<endl;

          break;

      }

      else

      {

          for(int j=2;j<=m;j++)

          {

              if(i%j==0)

              {

                  flag=1;

                  break;

              }



          }

          if(flag==0)

          {

              cout<<i<<endl;

              break;

          }

          else

          {

              i++;

          }

      }





  }

  return 0;









}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;





typedef long long ll;



ll ub;

bitset <10000010> prime;

vector <ll> primelist ;





void sieve(ll n) {

	prime.set (); // set all bits to 1

	prime [0] = prime [1] = 0; // 0 and 1 are not primes



	for (ll i = 4; i <= n; i += 2) { // even > 2 is not prime

		prime[i] = 0;

	}



	for (ll i = 3; (i * i) <= n; i += 2) { // the odd numbers are primes?

		if (prime[i]) { // i is still marked as prime?

			for (ll j = i * i; j < n; j += i) {

				prime[j] = 0; // multiples of i are not primes

			}

		}

	}



	for (ll i = 2; i <= n; i++) { // create list of primes in [0..ub]

		if (prime[i]) {

			primelist.push_back(i);

		}

	}

}



bool isPrime( ll n )

{

	// O(1) for numbers n <= ub!

	if (n <= ub) return prime[n];



	// takes a little longer if n > ub!

	for (int i = 0; i < (int) primelist .size (); i++) {

		if (n % primelist [i] == 0) {

			return false;

		}

	}



	return true;

}



int main()

{

    ios_base::sync_with_stdio( false ); 

    cin.tie( NULL );



	ll x;

	cin >> x;



	ub = 100500;

 	sieve(ub);



 	if(isPrime(x)) cout << x << endl;

 	else 

 	{

 		ll a;

 		for (a = x; true; ++a)

 		{

 			if(isPrime(a)){

 				break;

 			}

 		}



 		cout << a << endl;

 	}



    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.1017969005239543x):
#include<iostream>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<iomanip>

#include<string>

using namespace std;

int main(){

    long long int x,c=0;

    cin>>x;

    if(x==2)

    {

        cout<<x<<endl;



    }

    else{while(1){

    for (int i=2;i<=sqrt(x);i++)

    {

        if(x%i==0){c++;

        break;}

    }

    if(c==0)

    {

        cout<<x<<endl;

        break;

    }

    else{x++;

    c=0;

    }

}}

    return 0;



}
// Slower C++ solution:
#include <iostream>

#include <bits/stdc++.h>

using namespace std;



bool prime[1000001];



int sieve(int n){

  for(int i=2;i<1000001;i++){

    prime[i]=true;

  }

  prime[0]=false;

  prime[1]=false;

  for(long long i=2;i<1000001;i++){

    if(prime[i]==true){

        for(long long j=i*i;j<1000001;j+=i){

            prime[j]=false;

        }

    }

    if(i==n && prime[n]==true){

        return n;

    }else if(prime[i]==true && i>n){

        return i;

    }

  }

}



int main()

{

    int n;

    scanf("%d",&n);

    printf("%d\n",sieve(n));

    return 0;

}




// Faster C++ solution for the same problem (measured speedup: 5.076178930254143x):
#include<iostream>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<iomanip>

#include<string>

using namespace std;

int main(){

    long long int x,c=0;

    cin>>x;

    if(x==2)

    {

        cout<<x<<endl;



    }

    else{while(1){

    for (int i=2;i<=sqrt(x);i++)

    {

        if(x%i==0){c++;

        break;}

    }

    if(c==0)

    {

        cout<<x<<endl;

        break;

    }

    else{x++;

    c=0;

    }

}}

    return 0;



}
// Slower C++ solution:
#include<bits/stdc++.h>



using namespace std;



#define TC ll t; cin >> t; while(t--)

typedef long long ll;

#define mx 100005



int main()

{

    //freopen("input.txt", "r", stdin);

    //freopen("output.txt", "w", stdout);

    ll x,i;

    cin >> x;

    bool vis[mx];

    memset(vis,0,sizeof(vis));

    for(i=2;i<=mx;i++)

    {

        if(vis[i]) continue;

        if(i>=x) break;

        for(ll j=i;j<=mx;j+=i) vis[j]=1;

    }

    cout << i << endl;

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 1.4088966099337699x):
#include<iostream>

#include<algorithm>

#include<cstring>

#include<cmath>

#include<iomanip>

#include<string>

using namespace std;

int main(){

    long long int x,c=0;

    cin>>x;

    if(x==2)

    {

        cout<<x<<endl;



    }

    else{while(1){

    for (int i=2;i<=sqrt(x);i++)

    {

        if(x%i==0){c++;

        break;}

    }

    if(c==0)

    {

        cout<<x<<endl;

        break;

    }

    else{x++;

    c=0;

    }

}}

    return 0;



}
// Slower C++ solution:
#include <bits/stdc++.h>

#define rep(i,n) for (int i=0; i<(int)(n); i++)

#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)

using namespace std;

using ll = long long;

using P = pair<int, int>;



int main() {

  int x; cin >> x;

  const int lim = 100003;

  vector<int> p(lim);

  for (int i=2; i<=lim; i++) {

    for (int j=i; j<=lim; j+=i) {

      p[j]++;

    }

  }



  rep(i,lim+1) {

    if (p[i] == 1 && i >= x) {

      cout << i << endl;

      break;

    }

  }

  return 0;

}

// Faster C++ solution for the same problem (measured speedup: 3.080344540311024x):
#include <bits/stdc++.h>

#define rep(i,n) for (int i=0; i<(int)(n); i++)

#define REP(i,m,n) for(ll i=(ll)(m);i<(ll)(n);i++)

using namespace std;

using ll = long long;

using P = pair<int, int>;



bool is_prime(int x) {

  if (x==1) false;

  for (int i=2; i*i<=x; i++) {

    if (x % i == 0) return false;

  }

  return true;

}



int main() {

  int x; cin >> x;

  while(!is_prime(x)) {

    x++;

  }

  cout << x << endl;

  return 0;

}