criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;


int main() {
	int n;
	cin >> n;
	vector<int>p = { 2 };
	for (int i = 3; i <=55555 ; i+=2) {
		if (!n) {
			return 0;
		}
		for (auto &itr : p) {
			if (i%itr == 0) {
				break;
			}
			if (itr*itr >= i) {
			//	cout << i << " ";
				if ((i % 5) == 1) {
					cout << i << " ";
					n--;
				}
				p.push_back(i);
				break;
			}
		}
	}
	//int cnt = 0;
	//cout << p.size() << " p"<<endl;
	//for (int i = 60; i < p.size() - 4; i++) {
	//	//cout << cnt << endl;
	//	for (int j = i + 1; j < p.size() - 3; j++) {
	//		for (int k = j + 1; k < p.size() - 2; k++) {
	//			for (int l = k + 1; l < p.size() - 1; l++) {
	//				for (int m = l + 1; m < p.size(); m++) {
	//					int s = p[i] + p[j] + p[k] + p[l] + p[m];
	//					if (binary_search(p.begin(), p.end(), s)) {
	//						cnt++;
	//						cout << p[i] << " " << p[j] << " " << p[k] << " " << p[l] << " " << p[m] << " " << s <<" prime"<< endl;
	//					}
	//					else {
	//						cout << p[i] << " " << p[j] << " " << p[k] << " " << p[l] << " " << p[m] << " " << s << endl;
	//					}
	//				}
	//			}
	//		}
	//	}
	//}
	//cout << cnt<<endl;
	//vector<int>p1;
	//for (auto &itr : p) {
	//	if (itr % 5 == 1) {
	//		p1.push_back(itr);
	//	}
	//}
	//cout << p1.size() << endl;
	return 0;
}
// 解説ac

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'vector' was not declared in this scope
   10 |         vector<int>p = { 2 };
      |         ^~~~~~
a.cc:3:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    2 | #include<algorithm>
  +++ |+#include <vector>
    3 | #include<string>
a.cc:10:16: error: expected primary-expression before 'int'
   10 |         vector<int>p = { 2 };
      |                ^~~
a.cc:15:34: error: 'p' was not declared in this scope
   15 |                 for (auto &itr : p) {
      |                                  ^
Language: C++

/* ---------- STL Libraries ---------- */
// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>

// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>

// container library
#include <array>
#include <bitset>
#include <deque>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>

/* ---------- Namespace ---------- */
using namespace std;

/* ---------- Type ---------- */
using ll = long long;
#define int ll
#define P pair<ll, ll>

/* ---------- Constants  */
const ll MOD = 1e9 + 7;
const int INF = 1LL << 55;

/* v-v-v-v-v-v-v-v-v Main Part v-v-v-v-v-v-v-v-v */
vector<int> sieve(int n) {
    vector<int> primes;

    vector<bool> prime_table(n+1, true);
    prime_table[0] = prime_table[1] = false;

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

Compiler output:
a.cc: In function 'std::vector<long long int> sieve(ll)':
a.cc:47:10: error: expected ';' at end of input
   47 |         i
      |          ^
      |          ;
a.cc:47:10: error: expected '}' at end of input
a.cc:46:34: note: to match this '{'
   46 |     for (int i = 2; i <= n; i++) {
      |                                  ^
a.cc:47:10: error: expected '}' at end of input
   47 |         i
      |          ^
a.cc:40:26: note: to match this '{'
   40 | vector<int> sieve(int n) {
      |                          ^
a.cc:47:10: warning: no return statement in function returning non-void [-Wreturn-type]
   47 |         i
      |          ^
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <string>
#include <vector>

using namespace std;

typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<long long> vll, vLL;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) for(int i=0;i<n;++i)
#define mod (ll)(1e9+7)
#define ALL(obj) (obj).begin(), (obj).end()
#define INF 1000000000 //1e9
#define LLINF 2000000000000000000LL //2e18
#define fi first
#define se second
#define pb push_back

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    vint pls;
    for(int i=2;i<=55555;i++){
        bool f = true;
        for(int j=0;j<pls.size();j++){
            if(i%pl[j]==0){
                f=false;
                break;
            }
        }
        if(f) pls.pb(i);
    }
    cout << "2";
    for(int i=1;i<n;i++){
        cout << " " << pls[pls.size()-i-1];
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:18: error: 'pl' was not declared in this scope; did you mean 'pls'?
   34 |             if(i%pl[j]==0){
      |                  ^~
      |                  pls
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define forx(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)

vector<int>ans(60);
vector<bool>prime(2000,true);

void setup(){
    prime[0]=prime[1]=false;

    for(int i=2;i<1000;i++){
        if(!prime[i])continue;
        int k=2;
        while(i*k<2000){
            prime[i*k]=false;
            k++;
        }
    }
    int k=0;
    rep(i,2000){
        if(x&&i%10==1){
            ans[k]=i;
            k++;
        }
        if(k==59)break;
    }
}

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    setup();
    int n;
    cin>>n;

    rep(i,n)cout<<ans[i]<<' ';
    cout<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'void setup()':
a.cc:23:12: error: 'x' was not declared in this scope
   23 |         if(x&&i%10==1){
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int n,c;
bool prime(int p){
	if(p==1)return false;
	if(p==57)return true;
	if(p%2==0)return false;
	for(int i=3;i<=sqrt(p);i++=2){
		if(p%i==0)return false;
	}
	return true;
}
int main(){
	cin>>n;
	for(int i=6;c<n;i+=5){
		if(prime(i)){
			cout<<i<<" ";
			c++;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'bool prime(int)':
a.cc:8:33: error: lvalue required as left operand of assignment
    8 |         for(int i=3;i<=sqrt(p);i++=2){
      |                                ~^~
Language: C++

#include <stdio.h>

int prime(int n)
{
	int i;
	for(i=n/2; i>=2; i--){
		if(n%i==0){
			return 1;
		}
	}
	return 0;
}

int main(void)
{
	int n,x,i,j,x,y,z=0;
	scanf("%d",&n);
	for(i=0; i<n; i++){
		for(j=2; z<n; j=j+2){
			x=j*5+1;	y=prime(x);
			if(y==0){
				z=z+1;
				printf("%d",x);
				if(z<n){
					printf(" ");
				}
			}
		}
	}
	printf("\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: redeclaration of 'int x'
   16 |         int n,x,i,j,x,y,z=0;
      |                     ^
a.cc:16:15: note: 'int x' previously declared here
   16 |         int n,x,i,j,x,y,z=0;
      |               ^
Language: C++

#include <stdio.h>

int prime(int n)
{
	int i;
	for(i=n/2; i>=2; i--){
		if(n%i==0){
			return 1;
		}
	}
	return 0;
}

int main(void)
{
	int n,a[56],x,i,j,x,y,z=0;
	scanf("%d",&n);
	for(i=0; i<n; i++){
		for(j=2; z<n; j=j+2){
			x=j*5+1;	y=prime(x);
			if(y==0){
				z=z+1;
				printf("%d",x);
				if(z<n){
					printf(" ");
				}
			}
		}
	}
	printf("\n");
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: redeclaration of 'int x'
   16 |         int n,a[56],x,i,j,x,y,z=0;
      |                           ^
a.cc:16:21: note: 'int x' previously declared here
   16 |         int n,a[56],x,i,j,x,y,z=0;
      |                     ^
Language: C++

#include<iostream>
#include<algorithm>
#include<math.h>
#include<cstdio>
#include<ctype.h>
#include<stdio.h>
#include<set>
#include<vector>
#include<map>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<numeric>
#include<string>
using namespace std;
typedef long long ll;
#include<iostream>
ll prime(ll x) {
	ll i;
	if (x < 2)return 0;
	else if (x == 2) return 1;
	if (x % 2 == 0) return 0;
	for (i = 3; i*i <= x; i += 2) {
		if (x%i == 0) return 0;
	}
	return 1;
}
int main() {
	ll N;
	cin >> N;
	vector<ll>v;
	for (ll i = 6 i<50000 i += 5) {
		if (prime(i))
			v.push_bacK(i);
	}
	for (ll i = 0; i<N; ++i) {
		cout << v[i] << " ";
	}
	cout << "" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:34:22: error: expected ';' before 'i'
   34 |         for (ll i = 6 i<50000 i += 5) {
      |                      ^~
      |                      ;
a.cc:34:30: error: expected ';' before 'i'
   34 |         for (ll i = 6 i<50000 i += 5) {
      |                              ^~
      |                              ;
a.cc:36:27: error: 'class std::vector<long long int>' has no member named 'push_bacK'; did you mean 'push_back'?
   36 |                         v.push_bacK(i);
      |                           ^~~~~~~~~
      |                           push_back
Language: C++

#include <iostream>
using namespace std;
bool p_judge(int x) {
    int i=2;
  	while(i*i<=x) {
        if(x%i==0)
            return false;
      	i++
    }
    return true;
}

int main(void) {
    int n, i, j=1;
    cin >> n;
    for(i=11; j<=n; i+=10) {
        if(p_judge(i)) {
            printf("%d ", i);
            j++;
        }
    }
}


Compiler output:
a.cc: In function 'bool p_judge(int)':
a.cc:8:12: error: expected ';' before '}' token
    8 |         i++
      |            ^
      |            ;
    9 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin>>n;
  for(int i=11;i<n:i+=5){
    cout<<i<<" ";
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: warning: range-based 'for' loops with initializer only available with '-std=c++20' or '-std=gnu++20' [-Wc++20-extensions]
    6 |   for(int i=11;i<n:i+=5){
      |                ^
a.cc:6:19: error: found ':' in nested-name-specifier, expected '::'
    6 |   for(int i=11;i<n:i+=5){
      |                   ^
      |                   ::
a.cc:6:18: error: 'n' is not a class, namespace, or enumeration
    6 |   for(int i=11;i<n:i+=5){
      |                  ^
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
a.cc:9:14: error: expected ')' before '}' token
    9 |   cout<<endl;
      |              ^
      |              )
   10 | }
      | ~             
a.cc:6:6: note: to match this '('
    6 |   for(int i=11;i<n:i+=5){
      |      ^
a.cc:10:1: error: expected primary-expression before '}' token
   10 | }
      | ^
Language: C++

#include <bits/stdc++.h> 

using namespace std;

int main() {
  int n;
  scanf("%d", &n);
  const int MAX = 60000;
  vector<bool> p(MAX);
  for (int i = 2; i < MAX++) {
    p[i] = true;
  }
  for (int i = 2; i * i < MAX; i++) {
    if (!p[i]) {
      continue;
    }
    for (int j = i * i; j < MAX; j += i) {
      p[j] = false;
    }
  }
  int cc = 0;
  for (int i = 2; cc < n; i++) {
    if (p[i] && i % 5 == 1) {
      printf("%d%c", i, " \n"[cc == n - 1]);
      cc++;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: increment of read-only variable 'MAX'
   10 |   for (int i = 2; i < MAX++) {
      |                       ^~~
a.cc:10:28: error: expected ';' before ')' token
   10 |   for (int i = 2; i < MAX++) {
      |                            ^
      |                            ;
Language: C++

require 'prime'
gets.to_i.times do|i|
  print Prime.each.take(i+10).last," "
end


Compiler output:
a.cc:1:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | require 'prime'
      |         ^~~~~~~
a.cc:1:1: error: 'require' does not name a type
    1 | require 'prime'
      | ^~~~~~~
Language: C++

#include <iostream>
#include <iomanip>
#include <fstream>
#include <algorithm>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <cmath>

using namespace std;
typedef long long ll;

vector <int> v;

bool prime (int x)
{
    for (int i = 2; i * i <= x; i++)
        if (x % i == 0) return false;
    return true;
}

int main()
{
    ios_base::sync_with_stdio(0);
    for (int i = 2; i < 50000; i++)
    {
        if (i % 5 == 1 && prime (i))
        {
            v.push_back(i);
        }
    }
    int N;
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        if (i) cout << " ";
        cout << v[i]
    }
    cout << "\n";
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:38:21: error: expected ';' before '}' token
   38 |         cout << v[i]
      |                     ^
      |                     ;
   39 |     }
      |     ~
Language: Java

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class FiveFiveEveryWhere {
    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        Prime prime = new Prime();

        prime.createPrimeList(n);

        for (int num : prime.primes){
            System.out.print(num + " ");
        }
    }

    static class Prime {
        int last;
        List<Integer> primes = new ArrayList<>();

        public Prime(){
            primes.add(11);
            last = 11;
        }


        public boolean isPrime(int x) {
            for (int i = 2; i * i <= x; i += 2) {
                if ((x % i == 0) || (x % 5 != 1)) {
                    return false;
                }
            }
            return true;
        }

        public void createPrimeList(int x) {
            for (int i = 0; i < x; i++) {
                nextPrime();
             }
        }

        public void nextPrime(){
            int i = last + 2;
            while(true){
                if(isPrime(i)){
                    primes.add(i);
                    last = i;
                    break;
                }
                i += 2;
            }
        }
    }
}

Compiler output:
Main.java:5: error: class FiveFiveEveryWhere is public, should be declared in a file named FiveFiveEveryWhere.java
public class FiveFiveEveryWhere {
       ^
1 error
Language: C++

#include <iostream>
using namespace std;

bool prime (int n)
{
  flag = true;
  for (int i = 2; i < n; i++) {
    if (n % i == 0)
      flag = false;
  }
  return flag;
}

int main()
{
  int n;
  cin >> n;
  int p[60];
  int pnum = 0;
  int inow = 2;
  while (pnum < n) {
    for (int i = inow; i < 55555; i++) {
      int pcan = 5 * i + 1;
      if (prime(pcan)) {
        p[pnum] = pcan;
        inow = i + 1;
        pnum++;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    cout << p[i] <<" ";
  }
  return 0;
}

Compiler output:
a.cc: In function 'bool prime(int)':
a.cc:6:3: error: 'flag' was not declared in this scope
    6 |   flag = true;
      |   ^~~~
Language: C++

#include <iostream>
#include <vector>
using namespace std;

const int MAX_NUMBER = 55555;

vector<int> prime_numbers(int n){
  vector<bool> a(MAX_NUMBER+1, true);
  vector<int> ans;
  a[0] = a[1] = false;
  for(int i = 2; i <= MAX_NUMBER; ++i){
    if(a[i]){
      if(i % 5 == 1){
        ans.push_back(i);
        if(ans.size() >= n) break;
      }
      for(int j = i+i; j <= MAX_NUMBER; j += i){
        a[j] = false;
      }
    }
  }
  return ans;
}

int main(){
  int n;
  cin >> n;
  const auto& primes = prime_numbers();
  for(int i = 0; i < n; ++i){
    cout << primes[i];
    if(i < n-1) cout << " ";
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:37: error: too few arguments to function 'std::vector<int> prime_numbers(int)'
   28 |   const auto& primes = prime_numbers();
      |                        ~~~~~~~~~~~~~^~
a.cc:7:13: note: declared here
    7 | vector<int> prime_numbers(int n){
      |             ^~~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cctype>
#include <functional>
#include <map>
#include <cstdio>
#include <stack>
using namespace std;
typedef long long ll;

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

vector<int> prime_num,answer;
bool arr[55556];
int N;

void eratos(){
    rep(i,55556){
        arr[i] = true;
    }
    arr[0] = arr[1] = false;
    reps(i,2,sqrt(55556)){
        if(arr[i]){
            for(int j = 0; i * (j+2)< 55556; j++){
                arr[i*(j+2)] = false;
            }
        }
    }

    reps(i,2,55556){
        if(arr[i]) prime_num.push_back(i);
    }
}    

int main(){
    cin >> N;
    eratos();
    
    rep(i,prime_num.size()){
        if(prime_num[i] % 5 == 1) answer.push_back(prime_num[i]);
    }

    rep(i,N){
        cout << answer[i] << " ";
    }

    return 0;
}

Compiler output:
a.cc: In function 'void eratos()':
a.cc:25:14: error: 'sqrt' was not declared in this scope
   25 |     reps(i,2,sqrt(55556)){
      |              ^~~~
a.cc:13:47: note: in definition of macro 'reps'
   13 | #define reps(i,s,n) for(int (i) = (s); (i) < (n); (i)++)
      |                                               ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin >> n;
  vector<int> v;
  bool han=true;
  for(int i=2;i<1400;i++){
    han=false;
    for(int j=2;j<i;j++) if(i%2==0) han=true,break;
    if(han==false) v.push_back(i);
  }
  int go=0;
  for(int i=0;i<n;i++)
    go+=v[i];
  cout << go << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:46: error: expected primary-expression before 'break'
   11 |     for(int j=2;j<i;j++) if(i%2==0) han=true,break;
      |                                              ^~~~~
Language: C++

#include <iostream>
#include <list>
#include <algorithm>
#include <memory>
using namespace std;

int main()
{
	int n;
	cin >> n;

	int number = 2;
	int counter = 0;
	list<int> list;

	while (true)
	{
		bool primeNumber = true;
		for (auto& item : list) {
			if (number % item == 0) {
				primeNumber = false;
			}
		}

		if (primeNumber)
		{
			list.push_back(number);
			cout << number;
			counter++;
			if (counter == n) {
				cout << endl;
				break;
			}
			cout << " ";
		}
		number++;
	}
    return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:38:14: error: expected '}' at end of input
   38 |     return 0;
      |              ^
a.cc:8:1: note: to match this '{'
    8 | {
      | ^
Language: C++

int main(void) {
	int num;
	cin >> num;

	vector<int> ans_vec = { 2 };
	int index = 3;
	while (ans_vec.size() < num) {
		bool wrong = false;
		for (int prime : ans_vec) {
			int mod = index % prime;
			if (mod == 0) {
				wrong = true;
				break;
			}
		}
		if (!wrong) {
			ans_vec.push_back(index);
		}
		index++;
	}

	string str;
	for (int prime : ans_vec) {
		str += to_string(prime) + ' ';
	}
	str.erase(str.size() - 1);
	cout << str;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'cin' was not declared in this scope
    3 |         cin >> num;
      |         ^~~
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<int> ans_vec = { 2 };
      |         ^~~~~~
a.cc:5:16: error: expected primary-expression before 'int'
    5 |         vector<int> ans_vec = { 2 };
      |                ^~~
a.cc:7:16: error: 'ans_vec' was not declared in this scope
    7 |         while (ans_vec.size() < num) {
      |                ^~~~~~~
a.cc:22:9: error: 'string' was not declared in this scope
   22 |         string str;
      |         ^~~~~~
a.cc:23:26: error: 'ans_vec' was not declared in this scope
   23 |         for (int prime : ans_vec) {
      |                          ^~~~~~~
a.cc:24:17: error: 'str' was not declared in this scope; did you mean 'std'?
   24 |                 str += to_string(prime) + ' ';
      |                 ^~~
      |                 std
a.cc:24:24: error: 'to_string' was not declared in this scope
   24 |                 str += to_string(prime) + ' ';
      |                        ^~~~~~~~~
a.cc:26:9: error: 'str' was not declared in this scope; did you mean 'std'?
   26 |         str.erase(str.size() - 1);
      |         ^~~
      |         std
a.cc:27:9: error: 'cout' was not declared in this scope
   27 |         cout << str;
      |         ^~~~
Language: C++

#include <cstdio>
#include <algorithm>

int prm[5000];

void prm_count(){
    int i,j,k, m=0;
    for(i=3;i<=55555;i+=2){
        k=0;
        for(j=3;j<=sqrt(i);j+=2){
            if(i%j==0){
                k=1;
                break;
            }
        }
        if(k==0 && i%5 == 1) prm[m] = i;
        m++;
    }
}

int main(){
    int n;
    scanf("%d", &n);
    prm_count();
    /*5で割って1余るような数を5個選べばそれらの合計は必ず5で割り切れる。
    さらに、N個から必ず"5個選ぶ"ので、Nがいくつであっても必ず満たす*/
    for(int i=0;i<n;i++){
        printf("%d", prm[i])
        if(i != n-1){
            printf(" ")
        }else {
            printf("\n")
        }
    }

    return 0;
}

Compiler output:
a.cc: In function 'void prm_count()':
a.cc:10:20: error: 'sqrt' was not declared in this scope
   10 |         for(j=3;j<=sqrt(i);j+=2){
      |                    ^~~~
a.cc: In function 'int main()':
a.cc:28:29: error: expected ';' before 'if'
   28 |         printf("%d", prm[i])
      |                             ^
      |                             ;
   29 |         if(i != n-1){
      |         ~~                   
a.cc:31:10: error: 'else' without a previous 'if'
   31 |         }else {
      |          ^~~~
a.cc:32:25: error: expected ';' before '}' token
   32 |             printf("\n")
      |                         ^
      |                         ;
   33 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
#define FOR(i,n,a) for(int i = a;i<n;i++)
#define rep(i,n) FOR(i,n,0)
#define UNFOR(i,n,a) for(int i = a;i>n;i--)
#define unrep(i,n) UNFOR(i,0.n)
typedef ll long long
using namespace std;
bool prime(int a) {
	rep(i, a)if (a%i)return false;
	return true;
}
int ans[55555];
int main() {
	int count = 1;
	ans[0] = 2;
	for (int i = 4; i < 55556;i+=5) {
		if (prime(i)) {
			ans[count++] = i;
		}
	}
	int num;
	cin >> num;
	rep(i, num - 1)cout << ans[num] << " ";
	cout << ans[num - 1] << endl;
}

Compiler output:
a.cc:6:9: error: 'll' does not name a type
    6 | typedef ll long long
      |         ^~
a.cc: In function 'int main()':
a.cc:22:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   22 |         cin >> num;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:23:24: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   23 |         rep(i, num - 1)cout << ans[num] << " ";
      |                        ^~~~
      |                        std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |         cout << ans[num - 1] << endl;
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:33: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   24 |         cout << ans[num - 1] << endl;
      |                                 ^~~~
      |                                 std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <iostream>
2.int f(int n){for(int i=3;i<n;i+=2)if(n%i == 0)return 0;return 1;}int main(){int N;std::cin>>N;int c=0,i=0;while(c<N){int n=11+i*10;if(f(n)){std::cout<<n<<" ";c++;}i++;}}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.int f(int n){for(int i=3;i<n;i+=2)if(n%i == 0)return 0;return 1;}int main(){int N;std::cin>>N;int c=0,i=0;while(c<N){int n=11+i*10;if(f(n)){std::cout<<n<<" ";c++;}i++;}}
      | ^~~~~
a.cc: In function 'int main()':
a.cc:2:137: error: 'f' was not declared in this scope
    2 | 2.int f(int n){for(int i=3;i<n;i+=2)if(n%i == 0)return 0;return 1;}int main(){int N;std::cin>>N;int c=0,i=0;while(c<N){int n=11+i*10;if(f(n)){std::cout<<n<<" ";c++;}i++;}}
      |                                                                                                                                         ^
Language: C++

n = int(input())
primes = []
for i in range(11, 1500, 10):
    isPrime = True
    for k in range(2, 236):
        if k ** 2 > i:
            break
        elif i % k == 0:
            isPrime = False
            break
    if isPrime:
        primes.append(i)
print(" ".join(map(str, primes[:n])))


Compiler output:
a.cc:1:1: error: 'n' does not name a type
    1 | n = int(input())
      | ^
Language: Java

package AtCoder096;
import java.util.Scanner;
public class d_five {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int i=6;
		flag:for(int j=0;j<n;j++){
			while(i<=55555){
				if(isPrime(i)){
					System.out.print(i+" ");
					i+=5;
					continue flag;
				}
				i+=5;
			}
		}
	}
	public static boolean isPrime(int n) {
		if(n < 2) return false;
		if(n == 2) return true;
		if(n % 2 == 0) return false;

		for(int i = 3; i * i <= n; i += 2) {
			if(n % i == 0) return false;
		}
		return true;
	}
}

Compiler output:
Main.java:3: error: class d_five is public, should be declared in a file named d_five.java
public class d_five {
       ^
1 error
Language: C++

erast s = let erasti [] = []
              erasti (x:xs) = x : erasti (filter (\y -> y`mod`x /= 0) xs)
          in
          erasti [2..s]
putlis [] = putStrLn ""
putlis (x:xs) = do
                putStr $ show x ++ " "
                putlis xs
main = do
       n <- getLine
       putlis $ take (read n) $ filter (\x -> x `mod` 5 == 1) $ erast 55555

Compiler output:
a.cc:2:51: error: stray '\' in program
    2 |               erasti (x:xs) = x : erasti (filter (\y -> y`mod`x /= 0) xs)
      |                                                   ^
a.cc:2:58: error: stray '`' in program
    2 |               erasti (x:xs) = x : erasti (filter (\y -> y`mod`x /= 0) xs)
      |                                                          ^
a.cc:2:62: error: stray '`' in program
    2 |               erasti (x:xs) = x : erasti (filter (\y -> y`mod`x /= 0) xs)
      |                                                              ^
a.cc:4:19: error: too many decimal points in number
    4 |           erasti [2..s]
      |                   ^~~~
a.cc:11:41: error: stray '\' in program
   11 |        putlis $ take (read n) $ filter (\x -> x `mod` 5 == 1) $ erast 55555
      |                                         ^
a.cc:11:49: error: stray '`' in program
   11 |        putlis $ take (read n) $ filter (\x -> x `mod` 5 == 1) $ erast 55555
      |                                                 ^
a.cc:11:53: error: stray '`' in program
   11 |        putlis $ take (read n) $ filter (\x -> x `mod` 5 == 1) $ erast 55555
      |                                                     ^
a.cc:1:1: error: 'erast' does not name a type
    1 | erast s = let erasti [] = []
      | ^~~~~
Language: C++

package main
 
import "fmt"
 
// 解説見た
 
func main() {
    var (
        n, cnt int
    )
    
    fmt.Scan(&n)
    
    for i:=11; i<=55555; i+=5{
        if isPrime(i) {
            fmt.Printf("%d ", i)
            cnt++
            if cnt == n {
                break
            }
        }
    }
    
}
 
func isPrime(n int) bool {
    if n <= 1 {
        return false
    }
    
    for i:=2; i<n; i++ {
        if n % i == 0 {
            return false
        }
    }
    
    return true
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:26:1: error: 'func' does not name a type
   26 | func isPrime(n int) bool {
      | ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;

int sqrtmin(int x) { //x以上の素数を求めて返す
	if (x % 2 == 0) x += 1;
	for (int j = x;;j += 2) {
		int k = 0;
		for(int l=x;l<=sqrt(j);l+=2)
			if (j%l == 0)
			{
				k = 1;
				break;
			}
		if (k == 0) return j;
	}

}

int main() {
	int n;
	cin >> n;
	int k = 3;

	cout << "2";
	for (int i = 1;i < n;i++) {
		k = sqrtmin(k) + 1; cout << ' ' << k - 1;
	}

	cout << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int sqrtmin(int)':
a.cc:11:32: error: 'sqrt' was not declared in this scope
   11 |                 for(int l=x;l<=sqrt(j);l+=2)
      |                                ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<functional>
using namespace std;

int sqrtmin(int x) { //x以上の素数を求めて返す
	if (x % 2 == 0) x += 1;
	for (int j = x;;j += 2) {
		int k = 0;
		for(int l=x;l<=sqrt(j);l+=2)
			if (j%l == 0)
			{
				k = 1;
				break;
			}
		if (k == 0) return j;
	}

}

int main() {
	int n;
	cin >> n;
	int k = 3;

	cout << "2";
	for (int i = 1;i < n;i++) {
		k = sqrtmin(k) + 1; cout << ' ' << k - 1;
	}



	return 0;
}

Compiler output:
a.cc: In function 'int sqrtmin(int)':
a.cc:11:32: error: 'sqrt' was not declared in this scope
   11 |                 for(int l=x;l<=sqrt(j);l+=2)
      |                                ^~~~
Language: C++

#include <iostream>
#include <cstring>
#include <cmath> 
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
using namespace std;
int add[1001];
bool add[1001];
 
int asd(int n){
  int p=0;
  for(int i=0;i<=n;i++)add[i]=true;
    add[0]=add[1]=false;
  for(int i=2;i<=n;i++){
    if(add[i]){
      add[p++]=i;
      for(int j=2*i;j<=n;j+=i)add[j]=false;
    }
  }
  return p;
}
 
int main(){
  int n;
  cin>>n;
  int size=asd(55555);
  int cnt=0;
  for(int i=0;i<size;i++){
      if(add[i]%5==1){
           if(cnt)cout<<" ";
           cout<<add[i];
            cnt++;
    }
      if(cnt==n){
          cout<<endl;
          return 0;
    }
  }
}

Compiler output:
a.cc:10:6: error: conflicting declaration 'bool add [1001]'
   10 | bool add[1001];
      |      ^~~
a.cc:9:5: note: previous declaration as 'int add [1001]'
    9 | int add[1001];
      |     ^~~
Language: C++

def isPrime(x):
    if(x % 2 == 0):
        return False
    for i in range(3, min(x,236), 2): #root55555=235.8...
        if(x % i == 0):
            return False
    return True

n, a, p = int(input()), [], 11
while(n):
    if(isPrime(p)):
        a.append(str(p))
        n -= 1
    p += 10
print(" ".join(a))

Compiler output:
a.cc:4:39: error: stray '#' in program
    4 |     for i in range(3, min(x,236), 2): #root55555=235.8...
      |                                       ^
a.cc:4:50: error: too many decimal points in number
    4 |     for i in range(3, min(x,236), 2): #root55555=235.8...
      |                                                  ^~~~~~~~
a.cc:1:1: error: 'def' does not name a type
    1 | def isPrime(x):
      | ^~~
Language: C++

#include <iostream>
#include <cmath>
using namespace std;
bool isprim[114514810]={};
bool primlist[1145141919] = {};

void makelist(){
    for(int i = 0;i < 114514;++i)
        isprim[i] = 1;
    primlist[2] = primlist[3] = 1;
    for(int i = 4;i < sqrt(55555);++I){
        if(isprim[i] == 0)
             continue;
        primlist[i] = 1;
        for(int k = i,int j = 2;j < 55555;k *= j)
　　　isprim[k] = 0;
    }
}

int main(){
    makelist();
    int n;
    cin >> n;
    int count = 0;
    for(int i = 2;i < 55555;++i){
         if(primlist[i] == 1 && i % 10 == 1){
                count++;
                cout << i;
                if(count == n){
                     cout << endl;
                     return 0;
                }
                cout << endl;
         }
    }
}

Compiler output:
a.cc:16:1: error: extended character 　 is not valid in an identifier
   16 | 　　　isprim[k] = 0;
      | ^
a.cc:16:1: error: extended character 　 is not valid in an identifier
a.cc:16:1: error: extended character 　 is not valid in an identifier
a.cc: In function 'void makelist()':
a.cc:11:37: error: 'I' was not declared in this scope
   11 |     for(int i = 4;i < sqrt(55555);++I){
      |                                     ^
a.cc:15:23: error: expected unqualified-id before 'int'
   15 |         for(int k = i,int j = 2;j < 55555;k *= j)
      |                       ^~~
a.cc:15:23: error: expected ';' before 'int'
   15 |         for(int k = i,int j = 2;j < 55555;k *= j)
      |                       ^~~
      |                       ;
a.cc:15:42: error: expected ')' before ';' token
   15 |         for(int k = i,int j = 2;j < 55555;k *= j)
      |            ~                             ^
      |                                          )
a.cc:15:43: error: 'k' was not declared in this scope
   15 |         for(int k = i,int j = 2;j < 55555;k *= j)
      |                                           ^
a.cc:15:48: error: 'j' was not declared in this scope
   15 |         for(int k = i,int j = 2;j < 55555;k *= j)
      |                                                ^
Language: C++

#include <iostream>
using namespace std;
bool isprim[114514810]={};

void makelist(){
    isprim[2] = isprim[3] = 1;

}

int main(){
    int n;
    cin >> n;
    for(
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
a.cc:14:1: error: expected primary-expression before '}' token
a.cc:13:9: error: expected ';' before '}' token
   13 |     for(
      |         ^
      |         ;
   14 | }
      | ~        
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
a.cc:13:9: error: expected ')' before '}' token
   13 |     for(
      |        ~^
      |         )
   14 | }
      | ~        
a.cc:14:1: error: expected primary-expression before '}' token
   14 | }
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

int n,ans;

int main()
{
cin >> n;
for (int i = 2; i <= 11111; i+=2)
{
int x=0;
for (int j = 3; j <= 5*i; j++)
if (i%j==0) x++;
if (x==5*i-2)
{
cout << x+3 << ‘ ‘;
ans++;
}
if (ans==n) return 0;
}
}

Compiler output:
a.cc:17:16: error: extended character ‘ is not valid in an identifier
   17 | cout << x+3 << ‘ ‘;
      |                ^
a.cc:17:18: error: extended character ‘ is not valid in an identifier
   17 | cout << x+3 << ‘ ‘;
      |                  ^
a.cc: In function 'int main()':
a.cc:17:16: error: '\U00002018' was not declared in this scope
   17 | cout << x+3 << ‘ ‘;
      |                ^
Language: C++

N = int(input())

def isprime(n):
    if n < 2:
        return False
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for m in range(3, int(n**0.5) + 1, 2):
        if n % m == 0:
            return False
    return True

ans = [2]
p = 3
while len(ans) < N:
    p += 2
    if isprime(p) and p % 5 == 1:
        ans.append(p)
print(" ".join(map(str, ans)))

Compiler output:
a.cc:1:1: error: 'N' does not name a type
    1 | N = int(input())
      | ^
Language: C++

def isprime(n):
    if n < 2:
        return False
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for m in range(3, int(n**0.5) + 1, 2):
        if n % m == 0:
            return False
    return True

N = int(input())
ans = [2]
p = 3
while len(ans) < N:
    p += 2
    if isprime(p) and p % 5 == 1:
        ans.append(p)
print(" ".join(map(str, ans)))

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def isprime(n):
      | ^~~
Language: C++

def isprime(n):
    if n < 2:
        return False
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    for m in range(3, int(n**0.5) + 1, 2):
        if n % m == 0:
            return False
    return True

N = int(input())
ans = [2]
p = 3
while len(ans) < N:
    p += 2
    if isprime(p) and p % 5 == 1:
        ans.append(p)
print(ans)

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def isprime(n):
      | ^~~
Language: Java

	public static void main(String... args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();

		List<Integer> list = new ArrayList<>();
		list.add(2);
		for (int k = 3 ; k < 55555 ; k++) {
			for (int i = 2; i < Math.floor(Math.sqrt(55555)) ; i++) {
				if (k % i == 0 && k % 5 != 1) {
					continue;
				}
			}
			list.add(k);
		}

		for (int i = 0 ; i < n ; i++) {
			System.out.println(list.get(i) + " ");
		}
	}


Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String... args) {
	              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<iostream>
#include<algorithm>
#include<string> 
#include<map>
#include<set>
#include<vector>
#include<string.h>
int main()
{int n,c=55554,e=2;cin>>n;
fo(i,11111,c)if(prime(i))a[m++]=i;
for(int i=m-1;i>=m-n*e-1;i-=e)cout<<a[i]<<" ";
system("pause");
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:20: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 | {int n,c=55554,e=2;cin>>n;
      |                    ^~~
      |                    std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:10:4: error: 'i' was not declared in this scope
   10 | fo(i,11111,c)if(prime(i))a[m++]=i;
      |    ^
a.cc:10:1: error: 'fo' was not declared in this scope
   10 | fo(i,11111,c)if(prime(i))a[m++]=i;
      | ^~
a.cc:11:11: error: 'm' was not declared in this scope
   11 | for(int i=m-1;i>=m-n*e-1;i-=e)cout<<a[i]<<" ";
      |           ^
a.cc:11:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   11 | for(int i=m-1;i>=m-n*e-1;i-=e)cout<<a[i]<<" ";
      |                               ^~~~
      |                               std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:11:37: error: 'a' was not declared in this scope
   11 | for(int i=m-1;i>=m-n*e-1;i-=e)cout<<a[i]<<" ";
      |                                     ^
Language: C++

#include <iostream>

int main() {
	int v[] = {
		2, 11, 31, 41, 61, 71, 101, 131, 151, 181,
		191, 211, 241, 251, 271, 281, 311, 331, 401, 421,
		431, 461, 491, 521, 541, 571, 601, 631, 641, 661,
		691, 701, 751, 761, 811, 821, 881, 911, 941, 971,
		991, 1021, 1031, 1051, 1061, 1091, 1151, 1171, 1181, 1201
	};

	int N;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		cout << v[i] << (i == N - 1 ? '\n' : ' ');
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |         cin >> N;
      |         ^~~
      |         std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:15:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |                 cout << v[i] << (i == N - 1 ? '\n' : ' ');
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <iosteam>

int main() {
	int v[] = {
		2, 11, 31, 41, 61, 71, 101, 131, 151, 181,
		191, 211, 241, 251, 271, 281, 311, 331, 401, 421,
		431, 461, 491, 521, 541, 571, 601, 631, 641, 661,
		691, 701, 751, 761, 811, 821, 881, 911, 941, 971,
		991, 1021, 1031, 1051, 1061, 1091, 1151, 1171, 1181, 1201
	};

	int N;
	cin >> N;
	for (int i = 0; i < N; ++i) {
		cout << v[i] << (i == N - 1 ? '\n' : ' ');
	}
	return 0;
}


Compiler output:
a.cc:1:10: fatal error: iosteam: No such file or directory
    1 | #include <iosteam>
      |          ^~~~~~~~~
compilation terminated.
Language: C++

#include<cstdio>
bool isPrime(int n){
    if(n == 2) return true;
    if(n < 2 || n%2==0) return false;
    for(int i = 3; i <= sqrt(n); i+=2){
        if(n%i == 0) return false;
    }
    return true;
}

int main(){
  int n; scanf("%d", &n);
  int j=11;
  for(int i=0;i<n;i++){
    if(ifPrime(i)) printf("%d ", j);
    j+=10;
  }
}

Compiler output:
a.cc: In function 'bool isPrime(int)':
a.cc:5:25: error: 'sqrt' was not declared in this scope
    5 |     for(int i = 3; i <= sqrt(n); i+=2){
      |                         ^~~~
a.cc: In function 'int main()':
a.cc:15:8: error: 'ifPrime' was not declared in this scope; did you mean 'isPrime'?
   15 |     if(ifPrime(i)) printf("%d ", j);
      |        ^~~~~~~
      |        isPrime
Language: C++

#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<queue>
#include<stack>
#include<set>
using namespace std;

int INF = 1e9 + 7;

typedef long long ll;
typedef pair<int, int> P;

vector<int> arr(55560);

void Eratosthenes() {
	int n = 55556;

	for (int i = 1; i <= n; i++) {
		arr[i] = 1;
	}
	for (int i = 2; i <= sqrt(n); i++) {
		if (arr[i]) {
			for (int j = 0; i * (j + 2) < n; j++) {
				arr[i *(j + 2)] = 0; 
			}
		}
	}

	int j = 1;
	arr[1] = 0;
	for (int i = 1; i <= n; i++) {
		if (arr[i] && i%5 == 1) {
			arr[j] = i;
			j++;
		}
	}
}

int main() {
	int n;
	cin >> n;
	Eratosthenes();
	
	for (int i = 1; i <= n; i++) {
		cout << arr[i] << " ";
	}
}

Compiler output:
a.cc: In function 'void Eratosthenes()':
a.cc:23:30: error: 'sqrt' was not declared in this scope
   23 |         for (int i = 2; i <= sqrt(n); i++) {
      |                              ^~~~
Language: C++

#include <iostream>
#include <math.h>
using namespace std;

int main(void){
    int n, k, l=1, tmp=0;
    
    cin >> n;
 
    int a[n];
    
    a[0] = 2;
    
	for(int i=3; i<=55556; i+=2){
		k=0;
		for(int j=3; j<=sqrt(i); j+=2){
			if(i%j==0){
				k=1;
				break;
			}
		}

		if(k==0){
		    tmp = 0;
		    a[l]=i;
		    if(i[l]%5==1) l++;
		}
		if(l==n) break;
	}
    
    for(int i=0; i<n; i++) cout << a[i] << " ";
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:25: error: invalid types 'int[int]' for array subscript
   26 |                     if(i[l]%5==1) l++;
      |                         ^
Language: C++

#include <iostream>
using namespace std;
bool isprime(int p) {
	if (p == 1) return false;
	for (int i = 2; i*i < =p; i++) {
		if (p%i == 0) return false;
	}
	return true;
}

int n;

int main() {
	cin >> n;
	for (int i = 31; i <= 55555; i += 30) {
		if (isprime(i) == true) {
			if (i != 31) cout << " ";
			cout << i; n--;
		}
		if (n == 0) break;
	}
	cout << endl;
	return 0;
}


Compiler output:
a.cc: In function 'bool isprime(int)':
a.cc:5:31: error: expected primary-expression before '=' token
    5 |         for (int i = 2; i*i < =p; i++) {
      |                               ^
Language: C++

#include <bits/stdc++.h>
#include "../../original_library/make_random.hpp"

using namespace std;

using ll = long long int;

#define REP(i, N) for (int i = 0; i < (N); ++i)
#define scanInt(x) int x; scanf("%d", &(x)); getchar();
#define scanLLInt(x) ll x; scanf("%lld", &(x)); getchar();
#define scanVecInt(A, N) vector<int> A(N); REP(i, N){scanf("%d", &(A[i])); getchar();}
#define scanVecLLInt(A, N) vector<ll> A(N); REP(i, N){scanf("%lld", &(A[i])); getchar();}

int main()
{
    constexpr int M = 55555;
    set<int> prime;
    vector<int> prime_v;
    {
        vector<char> flag(M, true);
        flag[1 - 1] = false;
        REP(i, M){
            if (flag[i]){
                const int p = i + 1;
                prime.emplace(p);
                prime_v.emplace_back(p);
                for (int n = p * 2; n <= M; n += p){
                    flag[n - 1] = false;
                }
            }
        }
    }

    // for (auto& p : prime_v){
    //     if (55555 < p) break;
    //     cout << p << " ";
    // }
    // cout << endl;

    scanInt(N);
    vector<int> result(N);
    {
        auto it = prime_v.begin();
        int i = 0;
        while (i < N){
            auto& p = *it;
            if (p % 5 != 1){
                ++it;
                continue;
            }
            result[i] = p;
            ++it;
            ++i;
        }
    }
    for (auto& p : result){
        cout << p << " ";
    }
    cout << endl;
}


Compiler output:
a.cc:2:10: fatal error: ../../original_library/make_random.hpp: No such file or directory
    2 | #include "../../original_library/make_random.hpp"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <bits/stdc++.h>

using namespace std;

vector <int> prime;
bool isprime[300001];

void eratos(void)
{
	for(int i=2;i<=300000;i++)
	{
		if(isprime[i]==true)
		{
			if(i<=55555)
			{
				prime.push_back(i);
			}
			for(int j=2*i;j<=300000;j+=i)
			{
				isprime[j]=false;
			}
		}
	}
}
int main(void)
{
	int n;
	unordered_set <int> se;

	cin.tie(0);
	ios::sync_with_stdio(false);

	cin >> n;

	
	memset(isprime,true,sizeof(isprime));
	eratos();

	for(int i=0;i<prime.size();i++)
	{
		if(prime[i]%5==1)
		{
			res.push_back(prime[i]);
		}

		if(res.size()==n)
		{
			break;
		}
	}

	for(int i=0;i<res.size();i++)
	{
		cout << res[i] << ' ';
	}
	cout << '\n';
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:43:25: error: 'res' was not declared in this scope
   43 |                         res.push_back(prime[i]);
      |                         ^~~
a.cc:46:20: error: 'res' was not declared in this scope
   46 |                 if(res.size()==n)
      |                    ^~~
a.cc:52:23: error: 'res' was not declared in this scope
   52 |         for(int i=0;i<res.size();i++)
      |                       ^~~
Language: C++

#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;

bool isPrime(int a){
  for(int i=2;i<a;i++){
    if(a%i==0){
      return false;
      break;
    }
  }
  return true;
}

int main(){
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  const int MAX = 55555;
  int N,sum;
  cin>>N;
  int a[N],b[10000]={},ans[5]={};
  int cnt=0;
  int flag=0;
  for (int i=0;i<MAX;i++){
    if(isPrime(i)&&i%5==1){
      b[flag]=i;
      flag++
      cnt++;
    }
  }
  for(int i=0;i<5;i++){
    a[i]=b[i];
  }

  for (int i=0;i<N-1;i++){
    cout<<a[i]<<" ";
  }
  cout<<a[N-1];
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:28:13: error: expected ';' before 'cnt'
   28 |       flag++
      |             ^
      |             ;
   29 |       cnt++;
      |       ~~~
Language: C++

#include <bits/stdc++.h>

using namespace std;

//#define MD 10

int main(){
    int n;
    cin>>n;
    int flag,i,j;
    long int cnt=0;
    
  for( i=2;i<=55555;++i ) {
    flag = 0;
    for( j=2;j<i;++j ){
      if( i%j==0 ) {
        flag = 1;
        break;
      }
    }
    if(flag==0 && i%10==1){
        cout<<i<<;
        cnt++;
        if(cnt==n-1){
            cout<<endl;
            return 0;
        }else{
            cout<<" ";
        }
    }
  }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:18: error: expected primary-expression before ';' token
   22 |         cout<<i<<;
      |                  ^
Language: C++

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define REP(i, n) for(int i=0; i<n; ++i)
#define FOR(i, a, b) for(int i=a; i<b; ++i)
#define FORR(i, a, b) for(int i=b-1; i>=a; --i)

bool f[55556];

po(){
	FOR(i, 2, 55556){
		if(!f[i]){
			for(int j=i+i; j<=55555; j+=i) f[j]=true;
		}
	}
}

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin>>n;
	po();
	int a[60];
	int cnt=0;
	FOR(i, 2, 55556){
		if(!f[i] && i%5==1){
			a[cnt]=i;
			++cnt;
			if(cnt>=n) break;
		}
	}
	REP(i, n) cout<<a[i]<<' ';
	cout<<'\n';
	return 0;
}


Compiler output:
a.cc:17:1: error: ISO C++ forbids declaration of 'po' with no type [-fpermissive]
   17 | po(){
      | ^~
a.cc: In function 'int po()':
a.cc:23:1: warning: no return statement in function returning non-void [-Wreturn-type]
   23 | }
      | ^