criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.*;
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    List<String> list = new ArrayList<String>();
    
    int[] list =　new int[k]; 
    
    for(int i = 0; i<k; i++){
      String str = String.valueOf(iList[i]);
      list.add(str);
    }
    
    while(true){
      boolean boo = true;
      String nstr = String.valueOf(n);
      for(String str : list){
        if(nstr.contais(str)){
          boo = false;
          break;
        }
      }
      if(boo){
        break;
      }
      n++;
    }
    System.out.println(n);
  }
}

Compiler output:
Main.java:9: error: illegal character: '\u3000'
    int[] list =?new int[k]; 
                ^
Main.java:9: error: not a statement
    int[] list =?new int[k]; 
                 ^
2 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
dfs(vector<int>&A){

}
int main(){
int N,K;
  cin>>N>>K;
  set<int>S;
  for(int i=0;i<K;i++){
   int d; cin>>d;
    S.insert(d);
  }int ans;
  for(int i=N; ;i++){
  string s=to_string(i);
    int n=s.size();
    bool x=true;
    for(int j=0;j<n;j++){
      char a=s.at(j);
      int b=a-'0';
      if(S.count(b)){x=false; break;}
    
    }if(x){
      ans=i; break;
    }
  
  
  }cout<<ans<<endl;
    return 0;
}

Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'dfs' with no type [-fpermissive]
    3 | dfs(vector<int>&A){
      | ^~~
a.cc: In function 'int dfs(std::vector<int>&)':
a.cc:5:1: warning: no return statement in function returning non-void [-Wreturn-type]
    5 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main(){
  int n,k;
  cin >> n >> k;
  set<int> s;
  rep(i,10)s.insert(i);
  rep(i,k){
    int u;
    cin >> u;
    s.erase(u);
  }
  while(true){
    int o=n;
    int h=0;
    while(o){
      int j=o%10;
      o/=10
      if(s.count(j)){
        j++;
      }
      else{
        h=1;
        break;
      }
    }
    if(h==0){
      cout << n << endl;
      return 0;
    }
    n++;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:20:12: error: expected ';' before 'if'
   20 |       o/=10
      |            ^
      |            ;
   21 |       if(s.count(j)){
      |       ~~    
a.cc:24:7: error: 'else' without a previous 'if'
   24 |       else{
      |       ^~~~
Language: C++

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

int main() {
  int n,k;
  cin>>n>>k;
  vector<int>d(k);
  for(int i=0;i<k;i++) cin>>d[i];
  vector<bool>c(10);
  for(int i=0;i<10;i++){
    for(int j=0;j<k;j++){
      if(i==d[j]) {
        c[i]=false;
        break;
      }
      else if(j==k-1) c[i]=true;
    }
  }
  while(1){
    string s=to_string(n);
    bool x=false;
    for(int i=0;i<s.size();i++){
      int p=s[i]-'0';
      if(c[p]]){
        if(i==s.size()-1) x=true;
      }
      else break;
    }
    if(x) break;
    else n++;
  }
  cout<<n<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:24:14: error: expected ')' before ']' token
   24 |       if(c[p]]){
      |         ~    ^
      |              )
a.cc:24:14: error: expected primary-expression before ']' token
Language: C++

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

int main() {
  int n,k;
  cin>>n>>k;
  vector<int>d(k);
  for(int i=0;i<k;i++) cin>>d[i];
  vector<bool>c(10);
  for(int i=0;i<10;i++){
    for(int j=0;j<k;j++){
      if(i==d[k]) d[i]=false;
      else if(j==k-1) d[i]=true;
    }
  }
  while(1){
    string s=to_string(n);
    bool x=false;
    for(int i=0;i<s.size();i++){
      if(d[s[i]]){
        if(i==s.size()-1) x=true
      }
      else break;
    }
    if(x) break;
    else n++;
  }
  cout<<n<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:33: error: expected ';' before '}' token
   21 |         if(i==s.size()-1) x=true
      |                                 ^
      |                                 ;
   22 |       }
      |       ~
Language: Java

import java.util.Scanner;
public class Main {
public static void main(String[] args) {
	Scanner scanner = new Scanner(System.in);
	long n = scanner.nextInt(),k=scanner.nextInt();
	char [] a;a=new char [k];
	for (int i=0;i<k;i++) {
		int x = scanner.nextInt();
		String s = String.valueOf(x);
		a[i]=s.charAt(0);
	}
	boolean d = true;
	while (d) {
		d=false;
		String s = String.valueOf(n);
		for (int i=s.length()-1;i>=0;i--) {
			char c = s.charAt(i);
			for (int j=0;j<k;j++) {
				if (c==a[j]) {
					d=true;
					int t= s.length()-i-1;
					int g = (int)Math.pow(10, t);
					n+=g;
					i--;
				}
			}
		}
	}
	System.out.println(n);
	scanner.close();}}

Compiler output:
Main.java:6: error: incompatible types: possible lossy conversion from long to int
	char [] a;a=new char [k];
	                      ^
1 error
Language: C++

#include <iostream>
#include <unordered_set>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int n, k;
  cin >> n >> k;
  
  vector<int> vd(k);
  for (auto &d : vd) {
  	cin >> d;
  }
  
  sort(vd.begin(), vd.end());
  
  auto check = [] (int num) {
    string num_s = to_string(num);
    return any_of(num_s.begin(), num_s.end(), [&] (char ch) {
      return !binary_search(vd.begin(), vd.end(), ch - '0');
    });
  };
  
  int ans;
  for (int i = n; i <= 10 * n; i++) {
  	if (check(i)) {
      ans = i;
      break;
    }
  }
  
  cout << ans << '\n';
  return 0;
}


Compiler output:
a.cc: In lambda function:
a.cc:23:29: error: 'vd' is not captured
   23 |       return !binary_search(vd.begin(), vd.end(), ch - '0');
      |                             ^~
a.cc:20:17: note: the lambda has no capture-default
   20 |   auto check = [] (int num) {
      |                 ^
a.cc:13:15: note: 'std::vector<int> vd' declared here
   13 |   vector<int> vd(k);
      |               ^~
a.cc:23:41: error: 'vd' is not captured
   23 |       return !binary_search(vd.begin(), vd.end(), ch - '0');
      |                                         ^~
a.cc:20:17: note: the lambda has no capture-default
   20 |   auto check = [] (int num) {
      |                 ^
a.cc:13:15: note: 'std::vector<int> vd' declared here
   13 |   vector<int> vd(k);
      |               ^~
Language: C++

#include <iostream>
#include <unordered_set>
#include <string>
#include <vector>
#include <algorithm>

using namespace std;

int main() {
  int n, k;
  cin >> n >> k;
  
  vector<int> vd(k);
  for (auto &d : vd) {
  	cin >> d;
  }
  
  sort(vd.begin(), vd.end());
  
  auto check = [] (int num) {
    string num_s = to_string(num);
    return any_of(num_s.begin(), num_s.end(), [] (char ch) {
      return !binary_search(vd.begin(), vd.end(), ch - '0');
    });
  };
  
  int ans;
  for (int i = n; i <= 10 * n; i++) {
  	if (check(i)) {
      ans = i;
      break;
    }
  }
  
  cout << ans << '\n';
  return 0;
}

Compiler output:
a.cc: In lambda function:
a.cc:23:29: error: 'vd' is not captured
   23 |       return !binary_search(vd.begin(), vd.end(), ch - '0');
      |                             ^~
a.cc:22:48: note: the lambda has no capture-default
   22 |     return any_of(num_s.begin(), num_s.end(), [] (char ch) {
      |                                                ^
a.cc:13:15: note: 'std::vector<int> vd' declared here
   13 |   vector<int> vd(k);
      |               ^~
a.cc:23:41: error: 'vd' is not captured
   23 |       return !binary_search(vd.begin(), vd.end(), ch - '0');
      |                                         ^~
a.cc:22:48: note: the lambda has no capture-default
   22 |     return any_of(num_s.begin(), num_s.end(), [] (char ch) {
      |                                                ^
a.cc:13:15: note: 'std::vector<int> vd' declared here
   13 |   vector<int> vd(k);
      |               ^~
Language: Java

import java.util.*;

public class Main {


    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);

        int n = s.nextInt();
        int k = s.nextInt();

        int[] num = new int[10];

        for (int i = 0;i < k; i++) {
            int a = s.nextInt();
            num[a]=1;
        }
        Integer op = n;
        while(!chechk(num,op)) {
            op++;
        }
        System.out.println(op);
    }

    private static boolean chechk(int[] num, Integer op) {
        while(op > 0) {
            if (num[op % 10] == 1) return false;
            op /= 10;
        }
        return true;
    }


Compiler output:
Main.java:31: error: reached end of file while parsing
    }
     ^
1 error
Language: C

#include<stdio.h>

int main() {
	int n, k, i = 0, mod = 1, money = 0;
	scanf("%d %d", &n, &k);
	int num[10],hate[k];
	for (i = 0; i < 10; i++) num[i] = 0;
	for (i = 0; i < k; i++) {
		scanf("%d", &hate[i]);
		num[hate[i]] = 1;
	}

	mod *= n % 10;

	while (n != 0) {
		if (num[n % 10] == 0) {
			money += mod;
			n /= 10;
		}
		else {
			n++;
			if (n % 10 == 9) n -= 9;
	}
}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: C

#include<stdio.h>

int main() {
	int n, k, i = 0, mod = 1, money = 0;
	scanf("%d %d", &n, &k);
	int num[10],hate[k];
	for (i = 0; i < 10; i++) num[i] = 0;
	for (i = 0; i < k; i++) {
		scanf("%d", &hate[i]);
		num[hate[i]] = 1;
	}

	mod *= n % 10;

	while (n != 0) {
		if (num[n % 10] == 0) {
			money += mod;
			n /= 10;
		}
		else {
			n++;
			if (n % 10 == 0) n -= 10;
	}
}

Compiler output:
main.c: In function 'main':
main.c:24:1: error: expected declaration or statement at end of input
   24 | }
      | ^
Language: Java

import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N, K = map(int, input().split())
D = list(map(int, input().split()))


def ok(X):
    for d in D:
        if str(d) in str(X):
            return False
    return True

while not ok(N):
    N += 1

print(N)

Compiler output:
Main.java:1: error: '.' expected
import sys
          ^
Main.java:2: error: '.' expected
import heapq, math
            ^
Main.java:3: error: '.' expected
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
                                 ^
Main.java:4: error: '.' expected
from itertools import accumulate, dropwhile, takewhile, groupby
                                ^
Main.java:5: error: '.' expected
from functools import lru_cache
                               ^
Main.java:6: error: ';' expected
from copy import deepcopy
    ^
Main.java:6: error: '.' expected
from copy import deepcopy
                         ^
Main.java:8: error: ';' expected
N, K = map(int, input().split())
 ^
8 errors
Language: C++

N, K = map(str, input().split())
D = map(str, input().split())

D = set(D)	# 集合に変換
number = {'0','1','2','3','4','5','6','7','8','9'}	# 集合
out = D^number
#print(out)

out = sorted(list(out))
res_list = []
flag = 0
for i in range(len(N)-1, -1, -1):
  if flag == 0:
    if len(set(N[i])&set(out)) == 1:
      res_list.append(N[i])
    else:
      tmp = -1
      for j in range(len(out)):
        if N[i] < out[j]:
          tmp = out[j]
          break
      if tmp == -1:
        res_list.append(out[0])
        flag = 1
      else:
        res_list.append(tmp)
  elif flag == 1:
    flag = 0
    tmp = -1
    for j in range(len(out)):
      if N[i] < out[j]:
        tmp = out[j]
    if tmp == -1:
      res_list.append(out[0])
      flag = 1
    else:
      res_list.append(tmp)

res = ''
for i in range(len(res_list)-1, -1, -1):
  res += res_list[i]
print(res)


Compiler output:
a.cc:4:17: error: stray '#' in program
    4 | D = set(D)      # 集合に変換
      |                 ^
a.cc:5:57: error: stray '#' in program
    5 | number = {'0','1','2','3','4','5','6','7','8','9'}      # 集合
      |                                                         ^
a.cc:7:2: error: invalid preprocessing directive #print
    7 | #print(out)
      |  ^~~~~
a.cc:39:7: error: empty character constant
   39 | res = ''
      |       ^~
a.cc:1:1: error: 'N' does not name a type
    1 | N, K = map(str, input().split())
      | ^
a.cc:5:59: error: '\U000096c6\U00005408' does not name a type
    5 | number = {'0','1','2','3','4','5','6','7','8','9'}      # 集合
      |                                                           ^~~~
Language: Java

import java.io.*;
import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        PrintStream out = new PrintStream(System.out);

        int N, K;
        Integer[] D;

        N = sc.nextInt();
        K = sc.nextInt();

        D = new Integer[K];
        for (int i = 0; i < K; i++) {
            D[i] = sc.nextInt();
        }

        for (int i = 1; i < 100000; i++) {
            if (N <= i) {
                if (i < 10000)
                {
                    if (!Arrays.asList(D).contains((i%10000)/1000) && !Arrays.asList(D).contains((i%1000)/100) && !Arrays.asList(D).contains((i%100)/10) && !Arrays.asList(D).contains(i%10)) {
                        out.println(i);
                        break;
                    }
                }
                if (i > 10000)
                    if (!Arrays.asList(D).contains(i/10000) && !Arrays.asList(D).contains((i%10000)/1000) && !Arrays.asList(D).contains((i%1000)/100) && !Arrays.asList(D).contains((i%100)/10) && !Arrays.asList(D).contains(i%10)) {
                        out.println(i);
                        break;
                    }
                }
            }
        }
        sc.close();
    }
}

Compiler output:
Main.java:38: error: <identifier> expected
        sc.close();
                ^
Main.java:40: error: class, interface, enum, or record expected
}
^
2 errors
Language: C

#include <stdio.h>

int dis(int* n, int* d, int* k) {
	int i = 0;
	int result = *n;
	int add1 = 1;
	int add2 = 1;

	for (int c = 0;c < 4;c++) {   

		for (int co = 0;co < *k;co++) {

			if (result % 10 == d[i]) {
				result += add1;
				*n = *n + add2;
				
				if (i == *k) break;
			}
			i++;

		}
		result /= 10;
		i = 0;
		add2 *= 10;
	}
	return 0;
}

int main() {


	int n, k, d[10],result=0;

	scanf_s("%d%d", &n, &k);

	for (int i = 0;i < k;i++) {
		scanf_s("%d", &d[i]);
	}

	dis(&n, &d[0], &k);

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


Compiler output:
main.c: In function 'main':
main.c:34:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   34 |         scanf_s("%d%d", &n, &k);
      |         ^~~~~~~
      |         scanf
Language: C

#include <stdio.h>
int dis(int* n, int* d, int* k) {
	int i = 0;
	int result = *n;
	int add1 = 1;
	int add2 = 1;
	for (int c = 0;c < 4;c++) {
		for (int co = 0;co < *k;co++) {
			if (result % 10 == d[i]) {
				result += add1;
				*n = *n + add2;
				if (i == *k) break;
			}
			i++;
		}
		result /= 10;
		i = 0;
		add2 *= 10;
	}
	return 0;
}
int main() {
	int n, k, d[10];
	scanf_s("%d%d", &n, &k);

	for (int i = 0;i < k;i++) {
		scanf_s("%d", &d[i]);
	}
	dis(&n, &d[0], &k);
	printf("%d\n",n );
}

Compiler output:
main.c: In function 'main':
main.c:24:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
   24 |         scanf_s("%d%d", &n, &k);
      |         ^~~~~~~
      |         scanf
Language: C++

n,k = map(int,input().split())
d = list(map(int,input().split()))
for i in range(10001):
  nn = n+i
  cnt = 0
  for j in d:
    if str(j) in str(nn):
      break
    else:
      cnt += 1
  if cnt == len(d):
    print(nn)
    break

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

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int k = sc.nextInt();
    int[] nonuse = new int[10];
    for(int i = 0; i < k; i++) {
      nonuse[sc.nextInt()] = 1; 
    }
    int ans = n;
    while(true) {
      int p = 0;
      for(int i = 0; i < ans.length(); i++) {
        int d = Integer.parseInt(String.valueOf(ans.charAt(i)));
        if(nonuse[d] == 1) p++;
      }
      if(p == 0) {
        break;
      } else {
        ans++;
      }
    }
    System.out.println(ans);
  }
}


Compiler output:
Main.java:15: error: int cannot be dereferenced
      for(int i = 0; i < ans.length(); i++) {
                            ^
Main.java:16: error: int cannot be dereferenced
        int d = Integer.parseInt(String.valueOf(ans.charAt(i)));
                                                   ^
2 errors
Language: C++

#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, s, e) for (int i = (int)(s); i < (int)(e); i++)
#define _rep(i, n) for (int i = (int)(n - 1); i >= 0; i--)
#define _REP(i, e, s) for (int i = (int)(e - 1); i >= (int)(s); i--)

#define yes cout << "yes" << endl;
#define Yes cout << "Yes" << endl;
#define YES cout << "YES" << endl;

#define no cout << "no" << endl;
#define No cout << "No" << endl;
#define NO cout << "NO" << endl;

#define ll long long
#define ull unsigned long long

int N, K;
bool D[10];

bool isD(int N) {
    while (N > 0) {
        if (D[N % 10]) return true;
        N /= 10;
    }
    return false;
}

int main() {
    memset(D, false, sizeof(D));
    cin >> N >> K;
    rep(i, K) {
        int v;
        cin >> v;
        D[v] = true;
    }
    while (isD(N)) N++;
    cout << N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:5: error: 'memset' was not declared in this scope
   39 |     memset(D, false, sizeof(D));
      |     ^~~~~~
a.cc:9:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    8 | #include <stack>
  +++ |+#include <cstring>
    9 | using namespace std;
Language: Java

package abc42;

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

public class M {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		sc.close();
		sc = new Scanner(System.in);
		String s = sc.nextLine();
		sc.close();
		String[] strs = s.split(" ");
		List<Integer> d = new ArrayList<>();
		for (String str : strs) {
			d.add(Integer.parseInt(str));
		}

		boolean isGood = false;
		int len;
		len = String.valueOf(n).length();
		for (int i = 0; i < len; i++) {
			if (d.contains((n % (int) Math.pow(10, i + 1))
					/ (int) Math.pow(10, i))) {
				break;
			}
			if (i == len - 1) {
				isGood = true;
			}
		}

		if (isGood) {
			System.out.println(n);
			return;
		}
		n++;

	}
}


Compiler output:
Main.java:7: error: class M is public, should be declared in a file named M.java
public class M {
       ^
1 error
Language: Java

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

public class C {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] nums = new int[2];
		int count = 0;
		while(count < 2) {
			int i = sc.nextInt();
			nums[count] = i;
			count++;
		}
		sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] strs = s.split(" ");
		List<Character> d = new ArrayList<>();
		for (String str : strs) {
			char[] c = str.toCharArray();
			for (char c1 : c) {
				d.add(c1);
			}

		}

		String str;
		char[] c;
		List<Character> chara;
		boolean isGood = false;
		if (d.size() == 10) {
			return;
		}
		while (true) {
			str = String.valueOf(nums[0]);
			c = str.toCharArray();
			chara = toList(c);
			for (int i = 0; i < str.length(); i++) {
				if (d.contains(chara.get(i))) {
					break;
				}
				if (i == str.length() - 1) {
					isGood = true;
				}
			}

			if (isGood) {
				System.out.println(nums[0]);
				return;
			}
			nums[0]++;
		}

	}

	public static ArrayList<Character> toList(char[] arr) {
		ArrayList<Character> list = new ArrayList<>();
		for (char c : arr) list.add(c);
		return list;
	}
}


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

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

public class C {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int[] nums = new int[2];
		int count = 0;
		while(count < 2) {
			int i = sc.nextInt();
			nums[count] = i;
			count++;
		}
		sc = new Scanner(System.in);
		String s = sc.nextLine();
		String[] strs = s.split(" ");
		List<Character> d = new ArrayList<>();
		for (String str : strs) {
			char[] c = str.toCharArray();
			for (char c1 : c) {
				d.add(c1);
			}

		}

		String str;
		char[] c;
		List<Character> chara;
		boolean isGood = false;
		if (d.size() == 10) {
			return;
		}
		while (true) {
			str = String.valueOf(nums[0]);
			c = str.toCharArray();
			chara = toList(c);
			for (int i = 0; i < str.length(); i++) {
				if (d.contains(chara.get(i))) {
					break;
				}
				if (i == str.length() - 1) {
					isGood = true;
				}
			}

			if (isGood) {
				System.out.println(nums[0]);
				return;
			}
			nums[0]++;
		}

	}

	public static ArrayList<Character> toList(char[] arr) {
		ArrayList<Character> list = new ArrayList<>();
		for (char c : arr) list.add(c);
		return list;
	}
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package abc42;
      | ^~~~~~~
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.ArrayList;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.List;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Scanner;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: expected unqualified-id before 'public'
    6 | public class C {
      | ^~~~~~
Language: C++

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

int main() {
	int n, k,
	cin >> n >> k;
	vector<int> d(k);
	for (int i = 0; i < k; ++i)
	{
		cin >> d(i);
	}
	int ans;
	for (int i = n; i < 10*n + 1; ++i){
		int a, b, c, d;
		a = i/1000;
		b = i%1000/100;
		c = i%100/10;
		d = i%10;
		for (int j = 0; j < k; ++j)
		{
			if (a != d[j] && b != d[j] && c != d[j] && d != d[j]) {
				ans = i;
				break;
			}
			if (ans != 0) {
				cout << ans << endl;
				break;
			}
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected initializer before '>>' token
    8 |         cin >> n >> k;
      |             ^~
a.cc:12:25: error: no match for call to '(std::vector<int>) (int&)'
   12 |                 cin >> d(i);
      |                        ~^~~
a.cc:23:35: error: invalid types 'int[int]' for array subscript
   23 |                         if (a != d[j] && b != d[j] && c != d[j] && d != d[j]) {
      |                                   ^
a.cc:23:48: error: invalid types 'int[int]' for array subscript
   23 |                         if (a != d[j] && b != d[j] && c != d[j] && d != d[j]) {
      |                                                ^
a.cc:23:61: error: invalid types 'int[int]' for array subscript
   23 |                         if (a != d[j] && b != d[j] && c != d[j] && d != d[j]) {
      |                                                             ^
a.cc:23:74: error: invalid types 'int[int]' for array subscript
   23 |                         if (a != d[j] && b != d[j] && c != d[j] && d != d[j]) {
      |                                                                          ^
Language: C++

// IlyM

#include <bits/stdc++.h>
#define pb push_back
#define sp " "
#define sl "\n"
#define fi first
#define se second
#define mp make_pair
#define sz(a) ((int)a.size())
#define tra(a,b) for (auto a:b) 
#define fo(a,b,c) for (int a=b;a<=c;a++) 
#define ms(a,b) memset(a,b,sizeof(a)) 
#define all(a) a.begin(),a.end()
#define rev(a) reverse(a.begin(),a.end())
#define bit(i,j) (i&(1<<j))

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef pair<int,ii> iii;

const int N=2e5+5,mod=998244353;
int n,k,a[N];
string trans(int u)
{
	string w;
	while (u) {
		w.pb(u%10+'0'); u/=10;
	}
	return w;
}
int main()
{
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	cin>>n>>k;
	fo(i,0,k-1) { cin>>a[i]; b[a[i]]=false; }
	fo(i,n,1000000) {
		string k=trans(i);
		bool t=true;
		for (int j=0;j<sz(k);j++) if (!b[k[i]-'0']) t=false;
		if (t) {
			cout<<i;
			return 0;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:40:34: error: 'b' was not declared in this scope
   40 |         fo(i,0,k-1) { cin>>a[i]; b[a[i]]=false; }
      |                                  ^
a.cc:44:48: error: 'b' was not declared in this scope
   44 |                 for (int j=0;j<sz(k);j++) if (!b[k[i]-'0']) t=false;
      |                                                ^
Language: C++

// IlyM

#include <bits/stdc++.h>
#define pb push_back
#define sp " "
#define sl "\n"
#define fi first
#define se second
#define mp make_pair
#define sz(a) ((int)a.size())
#define tra(a,b) for (auto a:b) 
#define fo(a,b,c) for (int a=b;a<=c;a++) 
#define ms(a,b) memset(a,b,sizeof(a)) 
#define all(a) a.begin(),a.end()
#define rev(a) reverse(a.begin(),a.end())
#define bit(i,j) (i&(1<<j))

using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> ii;
typedef vector<ii> vii;
typedef pair<int,ii> iii;

const int N=2e5+5,mod=998244353;
int n,k,a[N];
string trans(int u)
{
	string w;
	while (u) {
		w.b(u%10+'0'); u/=10;
	}
	return w;
}
int main()
{
	cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(0);
	cin>>n>>k;
	fo(i,0,k-1) { cin>>a[i]; b[a[i]]=false; }
	fo(i,n,1000000) {
		string k=trans(i);
		bool t=true;
		for (int j=0;j<sz(k);j++) if (!b[k[i]-'0']) t=false;
		if (t) {
			cout<<i;
			return 0;
		}
	}
	return 0;
}


Compiler output:
a.cc: In function 'std::string trans(int)':
a.cc:32:19: error: 'std::string' {aka 'class std::__cxx11::basic_string<char>'} has no member named 'b'
   32 |                 w.b(u%10+'0'); u/=10;
      |                   ^
a.cc: In function 'int main()':
a.cc:40:34: error: 'b' was not declared in this scope
   40 |         fo(i,0,k-1) { cin>>a[i]; b[a[i]]=false; }
      |                                  ^
a.cc:44:48: error: 'b' was not declared in this scope
   44 |                 for (int j=0;j<sz(k);j++) if (!b[k[i]-'0']) t=false;
      |                                                ^
Language: C++

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

bool isValid(vector<int> &digits, int result)
{
    while (result) {
	int d = result % 10;
	if (find(digits.begin(), digits.end(), d) != digits.end()) {
	    return false;
	}
	result /= 10;
    }
    return true;
}

void main()
{
    int n, k;
    cin >> n >> k;
    vector<int> digits;
    while (k--)
    {
	int d;
	cin >> d;
	digits.push_back(d);
    }
    int result = n;
    while (true)
    {
	if (isValid(digits, result))
	{
	    cout << result;
	    break;
	}
	result++;
    }
}


Compiler output:
a.cc:19:1: error: '::main' must return 'int'
   19 | void main()
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define all(v) v.begin(), v.end()
using in = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define Yes cout<<"Yes"<<endl 
#define No cout<<"No"<<endl
#define yes cout<<"yes"<<endl 
#define no cout<<"no"<<endl
#define vec(a,y,x)  vector<vector<char>> a (y,vector<char>(x))
const vector<int> dx={1,0,-1,0};
const vector<int> dy={0,1,0,-1};
vector<int>a(4,-1);
bool ans(int deg,vector<int> &notd,int n){
  if(deg==0){
    if(n<=0) return true;
    else a.assign(4,-1);
  }
  
  for(i : notd){
    a.at(deg-1)=i;
    return ans(deg-1,notd,n-i*pow(10,deg));
  }
}

int main(){
  int n,k;
  cin>>n>>k;
  vector<int> d(k),notd;
  rep(i,k)
    cin>>d.at(i);
  rep(i,10){
    if(find(all(d),i)==d.end())
      notd.push(i);
  }
  string s=tostring(n);
  int deg=s.size();
  bool nan = ans(deg,notd,n);
  if(a.at(0)==-1&&a.at(1)==-1&&a.at(2)==-1&&a.at(3)==-1){
    if(notd.at(0)!=0)
      cout<<notd.at(0)*10000;
    else
      cout<<notd.at(1)*10000;
  }
  rep(i,deg)
    cout<<a.at(deg-1-i);
  cout<<endl;
}

Compiler output:
a.cc: In function 'bool ans(int, std::vector<int>&, int)':
a.cc:21:9: error: found ':' in nested-name-specifier, expected '::'
   21 |   for(i : notd){
      |         ^
      |         ::
a.cc:21:7: error: 'i' has not been declared
   21 |   for(i : notd){
      |       ^
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:24:4: error: expected ';' before '}' token
   24 |   }
      |    ^
      |    ;
   25 | }
      | ~   
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc:24:4: error: expected ')' before '}' token
   24 |   }
      |    ^
      |    )
   25 | }
      | ~   
a.cc:21:6: note: to match this '('
   21 |   for(i : notd){
      |      ^
a.cc:25:1: error: expected primary-expression before '}' token
   25 | }
      | ^
a.cc: In function 'int main()':
a.cc:35:12: error: 'class std::vector<int>' has no member named 'push'
   35 |       notd.push(i);
      |            ^~~~
a.cc:37:12: error: 'tostring' was not declared in this scope
   37 |   string s=tostring(n);
      |            ^~~~~~~~
a.cc: In function 'bool ans(int, std::vector<int>&, int)':
a.cc:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,t;
  cin>>n>>t;
  set<int> st;
  while(t--){
    int g;cin>>g;
  st.insert(g);
  }
  for(int i=n;i>=n;i++){
     string k =to_string(i);
    int f=0;
     for(int i=0;i<k.length();i++){
      if(st.find(s[i]-'0')!=st.end()){
        f=1;
        break;
      }
     }
    if(f==0){
    cout<<k;
      break;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:18: error: 's' was not declared in this scope
   15 |       if(st.find(s[i]-'0')!=st.end()){
      |                  ^
Language: C++

/******************************************************************************

            EYENINE,THE ELDER_WAND!!!
            THE ROOT OVER MINUS EIGHTY ONE!!

*******************************************************************************/
#include<bits/stdc++.h>
#include<string>
#define ALL_UP_WITH return 0
#define vi vector<int>
using namespace std;
int count1=0;
char d[10];int n,k;
int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n>>k;
    for(int i=0;i<k;i++){
        char f;
        cin>>f;
        d[f-'0']=1;
    }
    for(int i=n;i<10000;i++){
        string s=to_string(i);
        for(int j=0;j<s.size();j+=){
            if(d[s[j]-'0']==1)goto e;
        }
        cout<<i<<endl;break;e:;
    }
    ALL_UP_WITH;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:35: error: expected primary-expression before ')' token
   26 |         for(int j=0;j<s.size();j+=){
      |                                   ^
Language: C++

/******************************************************************************

            EYENINE,THE ELDER_WAND!!!
            THE ROOT OVER MINUS EIGHTY ONE!!

*******************************************************************************/
#include<bits/stdc++.h>
#define ALL_UP_WITH return 0
#define vi vector<int>
using namespace std;
int count1=0;
char d[10];int n,k;
int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    cin>>n>>k;
    for(int i=0;i<k;i++){
        char f;
        cin>>f;
        d[f-'0']=1;
    }
    for(int i=n;i<10000;i++){
        string s=to_string(i);
        for(int j=0;j<s.size();j+=){
            if(d[s[j]-'0']==1)goto e;
        }
        cout<<i<<endl;break;e:;
    }
    ALL_UP_WITH;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:35: error: expected primary-expression before ')' token
   25 |         for(int j=0;j<s.size();j+=){
      |                                   ^
Language: C++

#include "iostream"
#include "vector"
using namespace std; 

bool has_digit(int n, int d) {
	while (n != 0) {
    	if (n % 10 == d) return true;
      	n /= 10;
    }
  return false;
}

bool has_digit(int n, const vector<int>& ds) {
  for (int d: ds) if has_digit(n, d) return true;
  return false;
}

int main() {
	int n, k; 
    cin >> n >> k; 
  	
    vector<int> ds(k);
  	for (int i = 0; i < k; ++i) cin >> ds[i];
  
    while (n > 0 or has_digit(n, ds)) --n; 
  
	cout << n << endl; 
}

Compiler output:
a.cc: In function 'bool has_digit(int, const std::vector<int>&)':
a.cc:14:22: error: expected '(' before 'has_digit'
   14 |   for (int d: ds) if has_digit(n, d) return true;
      |                      ^~~~~~~~~
      |                      (
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F(i, a, b) for (int i = (a); i <= (b); i++)
#define D(i, a, b) for (int i = (a); i >= (b); i--)
#define R(i, a, b) for (int i = (a); i < (b); i++)
#define N 500000
int main()
{
#ifdef DOC
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#endif
  string n;
  int l; cin >> n >> l;
  vector<bool> at(11);
  R(i,0,l){
    int t; cin >> t;
    at[t] = true;
  }
  vector<int> like;
  R(i,0,10){
    if(!at[i]) like.push_back(i);
  }
  vector<int> res;  
  
  for(char c : n){
    int ch = res.size();
    for(int k : like){      
      if(c - '0' <= k) {             
        res.push_back(k);
        break;
        }        
    }
    if(res.size() == ch) res.push_back(like[0]);
  }
  res.
  for(int x : res) cout << x;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:3: error: expected unqualified-id before 'for'
   38 |   for(int x : res) cout << x;
      |   ^~~
Language: C++

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

int main(){
    int n;
    int k;
    cin >> n >> k;
    char d[k];
    for(int i=0;i<k;i++) cin >> d[i];
    int ans;
    while(1){
        string str=to_string(i);
        int count=0;
        for(int j=0;j<str.size();j++){
            for(int l=0;l<k;l++){
                if(str[j]==d[l]) continue;
                if(str[j]!=d[k-1]) count++;
            }
        }
        if(count==str.size()){
            ans=i;
            break;
        }
    }
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:30: error: 'i' was not declared in this scope
   12 |         string str=to_string(i);
      |                              ^
Language: C++

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

int main() {

	vector<char> total, hatelist;
	int hate;
	string temp;

	cin >> temp >> hate;

	for (int i = 0; i < temp.length(); i++)
	{
		total.push_back(temp[i]);
	}
	char tem;
	for (size_t i = 0; i < hate; i++)
	{
		cin >> tem;
		hatelist.push_back(tem);
	}
	
	for (size_t i = 0; i < total.size(); i++)
	{
		vector<char>::iterator it = find(hatelist.begin(), hatelist.end(), total[i]);

		if (it != hatelist.end())
		{
			total[i]++;
		}

	}

	for (size_t i = 0; i < total.size(); i++)
	{
		cout << total[i];
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:49: error: no matching function for call to 'find(std::vector<char>::iterator, std::vector<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   27 |                 vector<char>::iterator it = find(hatelist.begin(), hatelist.end(), total[i]);
      |                                             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:27:49: note:   '__gnu_cxx::__normal_iterator<char*, std::vector<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   27 |                 vector<char>::iterator it = find(hatelist.begin(), hatelist.end(), total[i]);
      |                                             ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C

#include<stdio.h>
int main()
  {
    int a[8],i,j,N,k,r;
      scanf("%d %d",&N,&k);
    for(i=0;i<=k;i++)
    {
      scanf("%d",&a[i]);
    }
 for(j=N;j>=N;j++)
  {
    p=j;
    m=j%10;
    i=0;
    while(a[i]!=m)
    {
      i++;
    }
    j=j/10;
  }
  return p;
      
  

Compiler output:
main.c: In function 'main':
main.c:12:5: error: 'p' undeclared (first use in this function)
   12 |     p=j;
      |     ^
main.c:12:5: note: each undeclared identifier is reported only once for each function it appears in
main.c:13:5: error: 'm' undeclared (first use in this function)
   13 |     m=j%10;
      |     ^
main.c:21:3: error: expected declaration or statement at end of input
   21 |   return p;
      |   ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n;
const int max_n = 1e6;
ll a[2][200];
int main(){
  cin >> n;
  bool ok[10]={false};
  for(int i=0 ; i<10 ; i++){
    int x;  cin >> x;
    ok[x] = true;
  }
  int ans = n;
  int now = 1;
  while(true){
    now = ans;
    while(now>0){
      if(d[now%10]){
        break;
      }
      now /= 10;
    }
    if(now == 0) break;
    ans++;
  }
  cout << ans << endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: 'd' was not declared in this scope
   19 |       if(d[now%10]){
      |          ^
Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<string>

using namespace std;

int main(void) {
    int price, k;
    map<int, bool> hate_num;
    vector<int> like_num;
    cin >> price >> k;
    string str_price = to_string(price);
    for (int i = 0; i < k; ++i) {
        int t;
        cin >> t;
        hate_num[t] = true;
    }
    for (int i = 0; i < 10; i++) {
        if (!hate_num[i]) {
            like_num.push_back(i);
        }
    }
    vector<int> prices;
    for (auto ln1: like_num) {
        for (auto ln2: like_num) {
            for (auto ln3: like_num) {
                for (auto ln4: like_num) {
                    for (auto ln5: like_num) {
                        int num1 = ln2 * 1000 + ln3 * 100 + ln4 * 10 + ln5;
                        if (num1 >= price) {
                            prices.push_back(num1);
                        }
                        if (prices.empty()) {
                            int num2 = ln1 * 10000 + ln2 * 1000 + ln3 * 100 + ln4 * 10 + ln5;
                            if (num2 >= price) {
                                prices.push_back(num2);
                            }
                        }
                    }
                }
            }
        }
    }

    sort(prices.begin(), prices.end());
    cout << prices[0] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:46:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   46 |     sort(prices.begin(), prices.end());
      |     ^~~~
      |     short
Language: C++

#include<stdio.h>
int main(){
 int N,K;
 int D[9];
 int data[4]={};
scanf("%d%d",&N&K);
for(int i=0;i<K;i++){
scanf("%d",&D[i]);
}
data[0]=N/1000;
data[1]=N/100-data[0]*4; 
data[2]=N/10-data[0]*100-data[1]*10;
data[3]=N-data[0]*1000-data[1]*100-data[2]*10;
while(N<10000){
    for(int j=0;j<4;j++){
        for(int i=0;i<K;i++){
            if(data[j]==D[i]){
                goto exit;    
            }
            
        }
}
    }
    if(j==4){
        printf("%d",N);
    }
    exit:
    N++;
}

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:16: error: invalid operands of types 'int*' and 'int' to binary 'operator&'
    6 | scanf("%d%d",&N&K);
      |              ~~^~
      |              |  |
      |              |  int
      |              int*
a.cc:24:8: error: 'j' was not declared in this scope
   24 |     if(j==4){
      |        ^
a.cc: At global scope:
a.cc:31:9: error: expected unqualified-id before 'return'
   31 |         return 0;
      |         ^~~~~~
a.cc:32:1: error: expected declaration before '}' token
   32 | }
      | ^
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
public class Item {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        List<Integer> hatenum = new ArrayList<>();
        List<Integer> oneToTen = new ArrayList<Integer>(Arrays.asList(0,1,2,3,4,5,6,7,8,9));
        int paymoney = in.nextInt();
        int n = in.nextInt();
        int i = 0;
        while(i < n){
            hatenum.add(in.nextInt());
            i++;
        }
        oneToTen.removeAll(hatenum);
        int[] ud = {1, 10, 100, 1000, 10000};
        int[] di = {0, -1, -1, -1, -1};
        while (true) {
            int total = 0;
            for(int k = 0;-1 < di[k];k++) {
                total += ud[k] * oneToTen.get(di[k]);
            }
            if(paymoney < total) {
                System.out.println(total);
                break;
            }
            for (int k = 0;-1 < di[k];k++) {
                if (oneToTen.size() == di[k]) {
                    di[k] = 0;
                    di[k+1] += 1;
                }
            }
        }
    }
}

Compiler output:
Main.java:6: error: class Item is public, should be declared in a file named Item.java
public class Item {
       ^
1 error
Language: Java

import java.util.Scanner;

/**
 * ABC042C
 */
public class ABC042C {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int K = sc.nextInt();

        boolean[] dislike = new boolean[10];
        for (int i = 0; i < dislike.length; i++) {
            dislike[i] = false;
        }

        for (int i = 0; i < K; i++) {
            dislike[sc.nextInt()] = true;
        }

        String str_N = Integer.toString(N);
        String ans = "";
        
        int i = str_N.length() - 1;
        while (i >= -1) {
            int sequence = 1;
            if (i != -1) {
                sequence = str_N.charAt(i) - '0';
            }
            for (int j = 0; j < 10; j++) {
                if (dislike[(sequence + j) % 10])
                    continue;

                ans += Integer.toString((sequence + j) % 10);
                break;
            }

            if (i == 0 && ans.charAt(str_N.length() - 1) >= str_N.charAt(str_N.length() - 1))
                break;

            i--;
        }
        
        StringBuffer buf = new StringBuffer(ans);
        ans = buf.reverse().toString();

        System.out.println(ans);
    }
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int n,k;
	cin>>n>>k;
	int a[10];
	for(int i=0;i<10;i++) a[i]=1;
	while(k--)
	{
	    int x;
	    cin>>x;
	    a[x]=0;
	}
	//cout<<n<<endl;
	for(int i=n;;)
	{
	    bool b=true;
	    int cp=i;
	    //cout<<i<<endl;
	    while(i)
	    {
	        int d=i%10;
	        if(!a[d])
	        {
	            b=false;
	            break;
	        }
	        i/=10;
	    }
	    if(b)
	    {

Compiler output:
a.cc: In function 'int main()':
a.cc:32:14: error: expected '}' at end of input
   32 |             {
      |             ~^
a.cc:32:14: error: expected '}' at end of input
a.cc:17:9: note: to match this '{'
   17 |         {
      |         ^
a.cc:32:14: error: expected '}' at end of input
   32 |             {
      |              ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <bits/stdc++.h>

using namespace std ; 

int main () { 
	bool dis[10] ; 
	for ( int i = 0 ; i < 10 ; i ++ ) 
		dis[i] = false ; 
		
	int pay , k , a ; 
	
	cin >> pay >> k ; 
	for ( int i = 0 ; i < k ; i ++ ) {
		cin >> a ; 
		dis[a] = true ; 
	}
	while (true) { 
		int sol = pay ;
		bool check = true ; a
		while(sol) {
			if ( dis[sol%10] ) {
				check = false ; 
				break ; 
				}
			sol /= 10 ; 		
		}
		if (check){
			cout << pay << endl ;
			return 0 ; 
		} 
		pay ++ ;
		
	}
	
	
	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:38: error: expected ';' before 'while'
   19 |                 bool check = true ; a
      |                                      ^
      |                                      ;
   20 |                 while(sol) {
      |                 ~~~~~
Language: C++

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

int main(){
    string s;
    int k;
    cin>>s>>k;
    vector<int> d(k);
    vector<int> num;
    rep(i,k)cin>>d.at(i);
    for(int i=0;i<=9;++i){
        bool yes=true;
        for(int j=0;j<k;++j)
            if(d.at(j)==i){yes=false;break;}
        if(yes)num.push_back(i);
    }
    sort(all(num));
    for(int i=0;i<s.size();++i){
        bool yes=false;
        for(int j=0;j<num.size();++j)
            if(s.at(i)==num.at(j)+'0'){yes=true;break;}
        if(!yes){
            if(i==0&&num.at(0)==0)
                s.at(0)=num.at(1)+'0';
            else
                s.at(i)=num.at(0)+'0';
        }
    }
    cout<<s<<"\n"s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: 'i' was not declared in this scope
   10 |     rep(i,k)cin>>d.at(i);
      |         ^
a.cc:10:5: error: 'rep' was not declared in this scope
   10 |     rep(i,k)cin>>d.at(i);
      |     ^~~
a.cc:17:10: error: 'all' was not declared in this scope; did you mean 'std::filesystem::perms::all'?
   17 |     sort(all(num));
      |          ^~~
      |          std::filesystem::perms::all
In file included from /usr/include/c++/14/filesystem:51,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200,
                 from a.cc:1:
/usr/include/c++/14/bits/fs_fwd.h:158:7: note: 'std::filesystem::perms::all' declared here
  158 |       all               =  0777,
      |       ^~~
Language: Java

public class Main {
	static String str;
	public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();
        for(int i = 0; i < k; i++) {
        	str = sc.next();
        }
        for(int i = 0; i < 100000; i++ ) {
        	if(check(n)) {
        		System.out.print(i);
                return;
        	}
        }
        sc.close();
	}
	private static boolean check(int n){
		boolean result = true;
		String m;
		while(n >= 1) {
			m = String.valueOf(n % 10);
			int comp = m.lastIndexOf(str);
			if(comp != -1) {
				result = false;
			}
			n = n / 10;
		}
		
		return result;
    	
    }
}


Compiler output:
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner sc = new Scanner(System.in);
                         ^
  symbol:   class Scanner
  location: class Main
2 errors