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

#include <stdio.h>

int main(void){

	int N,K,i,k,l;
  	int j=0,flag=0;
  	scanf("%d %d",&N,&K);
  	int A[K];
  	for(i=0;i<K;i++){
      scanf("%d",&A[i]);
    }
  	int D[5];
  	for(i=N;i<10000;i++){
      	num=i;
     	while(num){
    		dig = num % 10;
        	D[j]=dig;
    		num = num / 10;
        	j++;
        }
      	j=0;
      	for(k=0;k<K;k++){
        	for(l=0;l<5;l++){
            	if(A[k]==D[l])flag=1;
            }
        }
      	if(flag==0)break;
  	}

  	
  	printf("%d\n",i);
  	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:14:9: error: 'num' undeclared (first use in this function)
   14 |         num=i;
      |         ^~~
main.c:14:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:16:17: error: 'dig' undeclared (first use in this function)
   16 |                 dig = num % 10;
      |                 ^~~
Language: C++

#include<iostream>
using namespace std;

int n,k;

bool check(int n, int d[]){
  bool flag=true;
  int a;
  for(int i=n;i==0;i/=10){
    a=i%10;
    for(int j=0;j<10;j++){
      if(a==d[j]) flag=false;
    }
  }
  return flag;
}

int main(){
  int d[10]=-1;
  cin>>n>>k;
  for(int i=0;i<k;i++){
    cin>>d[i];
  }
  
  for(int i=n;i<10000;i++){
    bool flag=false;
    flag=check(i,d);
    if(flag) {
      cout << i << '\n';
      break;
    }
  }
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:13: error: array must be initialized with a brace-enclosed initializer
   19 |   int d[10]=-1;
      |             ^~
Language: C++

#include<iostream>
using namespace std;

int d[10]=-1;
int n,k;

bool check(int n){
  bool flag=true;
  int a;
  for(int i=n;i==0;i/=10){
    a=i%10;
    for(int j=0;j<10;j++){
      if(a==d[j]) flag=false;
    }
  }
  return flag
}

int main(){
  cin>>n>>k;
  for(int i=0;i<k;i++){
    cin>>d[i];
  }
  
  for(int i=n;i<10000;i++){
    bool flag=false;
    flag=check(i,d);
    if(flag) {
      cout << i << '\n';
      break;
    }
  }
    
  return 0;
}

Compiler output:
a.cc:4:11: error: array must be initialized with a brace-enclosed initializer
    4 | int d[10]=-1;
      |           ^~
a.cc: In function 'bool check(int)':
a.cc:16:14: error: expected ';' before '}' token
   16 |   return flag
      |              ^
      |              ;
   17 | }
      | ~             
a.cc: In function 'int main()':
a.cc:27:15: error: too many arguments to function 'bool check(int)'
   27 |     flag=check(i,d);
      |          ~~~~~^~~~~
a.cc:7:6: note: declared here
    7 | bool check(int n){
      |      ^~~~~
Language: Java

import java.util.*;

public class C {

    public static StringBuilder output = new StringBuilder();

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int arr[] = new int[10];
        Arrays.fill(arr, 1);
        for (int i = 0; i < k; i++) {
            int c = in.nextInt();
            arr[c]--;
        }
        Solver solver = new Solver();
        solver.solve(arr, n);
        System.out.println(output);
    }

}

class Solver {
    public void solve(int arr[], int n) {
        while (helper(n, arr)) {
            n++;
        }

        C.output.append(n);
    }

    public boolean helper(int n, int arr[]) {
        while (n > 0) {
            if (arr[n % 10] == 0) {
                return true;
            }
            n /= 10;
        }
        return false;
    }
}

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

import java.util.*;

public class C {

    public static StringBuilder output = new StringBuilder();

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        int arr[] = new int[10];
        Arrays.fill(arr, 1);
        for (int i = 0; i < k; i++) {
            int c = in.nextInt();
            arr[c]--;
        }
        Solver solver = new Solver();
        solver.solve(arr, n);
        System.out.println(output);
    }

}

class Solver {
    public void solve(int arr[], int n) {
        String a = "";
        int amt = 0;
        for (int i = 0; i < arr.length; i++) {
            if (arr[i] != 0 && i > 0) {
                amt = n * i;
                break;
            }
        }
        C.output.append(amt);

    }
}

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

いろはちゃんはこだわりもので、嫌いな数字が 
K
 個あり、それぞれ 
D
1
,
D
2
,
.
.
.
,
D
K
 です。

いろはちゃんはお店でお買い物をしていて、 
N
 円の品物を買おうとしています。 もちろん、この品物は 
N
 円以上のお金を支払えば買うことができます。 しかし、先ほど述べたようにいろはちゃんは強いこだわりがあるので、自分がお店に支払う金額の 
10
 進表記にいろはちゃんの嫌いな数字が出現しないような最も少ない金額を支払おうとします。

いろはちゃんが支払う金額を求めてください。

Compiler output:
Main.java:1: error: illegal character: '\u3001'
????????????????????? 
              ^
Main.java:3: error: illegal character: '\u3001'
 ???????? 
    ^
Main.java:16: error: illegal character: '\u3002'
 ???
   ^
Main.java:18: error: illegal character: '\u3001'
???????????????????? 
                   ^
Main.java:20: error: illegal character: '\u3002'
 ??????????????? ?????????? 
               ^
Main.java:20: error: illegal character: '\u3001'
 ??????????????? ?????????? 
                     ^
Main.java:22: error: illegal character: '\u3002'
 ????????????????????? ???????????????????????????????????????????? 
                     ^
Main.java:22: error: illegal character: '\u3001'
 ????????????????????? ???????????????????????????????????????????? 
                          ^
Main.java:22: error: illegal character: '\u3001'
 ????????????????????? ???????????????????????????????????????????? 
                                                      ^
Main.java:24: error: illegal character: '\u3002'
 ??????????????????????????????????????????
                                          ^
Main.java:26: error: illegal character: '\u3002'
?????????????????????
                    ^
11 errors
Language: C++

#include <iostream>
#include <iomanip>
#include <cmath>
#include <vector>
#include <algorithm>
#include <set>
#include <unordered_set>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(a) (a).begin(), (a).end()
typedef long long ll;
using namespace std;
const int N = 2e5 + 5;
 
using namespace std;

int main() 
{
    int n , k;
    cin >> n >> k;
    vector<int>liked;
    int unliked[10];
    rep(i , 10) {
        unliked[i] = 0;
    }
    rep(i, k) {
        int x;
        cin >> x;
        unliked[x]++;
    }
    rep(i, 10) {
        if (unliked[i] == 0) {
            liked.push_back(i);
        }
    }
    vector<int> digits;
    while (n > 9) {
        int d = n % 10;
        digits.push_back(d);
        n /=10;
    }
    digits.push_back(n);
    reverse(digits.begin(), digits.end());


    for (auto d : digits) {
        for (auto l : liked) {
            if (l >= d) {
                cout << l; 
                res += l;
                break;
            }
        }
    }
    cout << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:53:17: error: 'res' was not declared in this scope; did you mean 'rep'?
   53 |                 res += l;
      |                 ^~~
      |                 rep
Language: C++

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

int main(){
    int m;
    int n;
    int a[10], b;

    cin >> m;
    cin >> n;

    for (int i = 0; i < 10; i++){
        a[i] = 0;
    }

    for (int i = 0; i < n; i++){
        cin >> b;
        a[b]++;
    }

    for (int i = m; i < 100000; i++){
        b = i;
        while (b != 0){
            if (a[b % 10] != 0){
                break;
            }
            b /= 10;
        }
        if (b == 0){
            printf("%d", i)
            return 0;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:28: error: expected ';' before 'return'
   30 |             printf("%d", i)
      |                            ^
      |                            ;
   31 |             return 0;
      |             ~~~~~~
Language: C++

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

int main(){
    int m;
    int n;
    int a[10], b;

    cin >> m;
    cin >> n;

    for (int i = 0; i < 10; i++){
        a[i] = 0;
    }

    for (int i = 0; i < n; i++){
        cin >> b;
        a[b]++;
    }

    for (i = m; i < 100000; i++){
        b = i;
        while (b != 0){
            if (a[b % 10] != 0){
                break;
            }
            b /= 10;
        }
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:10: error: 'i' was not declared in this scope
   21 |     for (i = m; i < 100000; i++){
      |          ^
Language: Java

import java.util.*;
import java.io.BufferedReader; 
import java.io.IOException; 
import java.io.InputStreamReader; 
import java.util.StringTokenizer;

public class Main {
	static class IO 
    { 
        BufferedReader br; 
        StringTokenizer st; 
  
        public IO() 
        { 
            br = new BufferedReader(new
                     InputStreamReader(System.in)); 
        } 
  
        String next() 
        { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } 
  
        int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } 
  
        long nextLong() 
        { 
            return Long.parseLong(next()); 
        } 
  
        double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } 
  
        String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } 
        int [] readarray(int sz){
            int [] ret = new int[sz];
            for(int i = 0; i<sz; i++)ret[i] = nextInt();
            return ret;
        }
    } 
    public static void main(String[] args){
        IO fs = new IO();
        long n = fs.nextLong(),k = fs.nextLong();
        Set<Long> st = new HashSet<Long>();
        for(long i = 0; i<k; i++){
            st.add(fs.nextLong());
        }
        long ans = 0;
        long count = 0;
        long rem = 0;
        while(n!=0){
            long dig = n%10;
            dig+=rem;
            while(st.contains(dig%10)dig+=1;
            long newdig = (dig)%10;
            rem = (dig)/10;
            ans += (newdig*power(10,count));
            count+=1;
            n/=10;
        }
        while(rem!=0){
            while(st.contains(rem%10))rem-=1;
            ans += (rem%10)*power(10,count);
            rem/=10;
            count+=1;
        }
        System.out.println(ans);
    }
    public static long power(long x,long y){
        long res = 1;
        while(y>0){
            if(y%2 == 1)res = (res*x);
            y>>=1;
            x = x*x;
        }
        return res;
    }
}


Compiler output:
Main.java:82: error: ')' expected
            while(st.contains(dig%10)dig+=1;
                                     ^
1 error
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main(){
int n,k,dd;
  cin>>n>>k;
  vector<int>> d(10,0);
  for(int i=0;i<n;i++){
    cin>>dd;
    d[dd]=1;
  }
  
  for(int i=n;i<=10000;i++){
      int flag=1;
    int tmp=i;
    while(tmp!=0){
      if(d[tmp%10]==1){
        flag=0;
        break;
      }
      tmp/=10;
    }
    if(flag){
      cout<<i<<endl;
      break;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: expected unqualified-id before '>' token
    7 |   vector<int>> d(10,0);
      |             ^~
a.cc:10:5: error: 'd' was not declared in this scope
   10 |     d[dd]=1;
      |     ^
a.cc:17:10: error: 'd' was not declared in this scope
   17 |       if(d[tmp%10]==1){
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,k,dd;
  cin>>n>>k;
  vector<int> d(10,0);
  for(int i=0;i<k;i++){
    cin>>dd;
    d[dd]=1;
  }
  for(int i=n;i<100000;i++){
    int flag=1;
    int tmp=i;
    while(tmp!=0){
       if(d[tmp%10]==1){
         flag=0;
         break;
       }
      tmp/=10;
    }
    if(flag){
      cout<<i<<endl;
       break;
    }
  }
  return 0;
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'vector' was not declared in this scope
    6 |   vector<int> d(10,0);
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:6:10: error: expected primary-expression before 'int'
    6 |   vector<int> d(10,0);
      |          ^~~
a.cc:9:5: error: 'd' was not declared in this scope
    9 |     d[dd]=1;
      |     ^
a.cc:15:11: error: 'd' was not declared in this scope
   15 |        if(d[tmp%10]==1){
      |           ^
Language: Java

import javax.persistence.criteria.CriteriaBuilder;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N, K, size, i;
        N = input.nextInt();
        K = input.nextInt();
        i = 0;
        List<Integer> list = new Vector<>();
        while (K-- > 0) {
            list.add(input.nextInt());
        }
        String number = Integer.toString(N);
        size = number.length();
        while (i < size) {
            int num = number.charAt(i) - 48;
            if (list.contains(num)) N++;
            else i++;
            number = Integer.toString(N);
        }
        System.out.println(N);
    }
}


Compiler output:
Main.java:1: error: package javax.persistence.criteria does not exist
import javax.persistence.criteria.CriteriaBuilder;
                                 ^
1 error
Language: C++

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N, K;
        int ara[] = new int[10];
        for (int i = 0; i < 10; i++) ara[i] = i;
        N = input.nextInt();
        K = input.nextInt();
        for (int i = 0; i < K; i++) {
            int num = input.nextInt();
            ara[num] = 0;
        }
        Arrays.sort(ara);
        String st = "";
        while (N >= 10) {
            for (int i = K; ; i++) {
                int n = N % 10;
                if (ara[i] >= n) {
                    st = ara[i] + st;
                    break;
                }
            }
            N = N / 10;
        }
        if (ara[K] == 0) K++;
        for (; K < 10; K++) {
            if (ara[K] >= N){
                st = ara[K] + st;
                break;
            }
        }
        System.out.println(st);
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N, K;
        int ara[] = new int[10];
        for (int i = 0; i < 10; i++) ara[i] = i;
        N = input.nextInt();
        K = input.nextInt();
        for (int i = 0; i < K; i++) {
            int num = input.nextInt();
            ara[num] = 0;
        }
        Arrays.sort(ara);
        String st = "";
        while (N >= 10) {
            for (int i = K; ; i++) {
                int n = N % 10;
                if (ara[i] >= n) {
                    st = ara[i] + st;
                    break;
                }
            }
            N = N / 10;
        }
        if (ara[K] == 0) K++;
        for (; K < 10; K++) {
            if (ara[K] >= N){
                st = ara[K] + st;
                break;
            }
        }
        System.out.println(st);
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Arrays;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.Scanner;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: expected unqualified-id before 'public'
    4 | public class Main {
      | ^~~~~~
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.at(i);
  
  for(int ans=n;ans<n*10;ans++){
    string s=to_string(ans);
    bool jg=false;
    for(auto x:d){
      if(s.find(x)!=-1)
        break;
      if(x==s.at(s.size()-1){
        jg=true;
        break;
      }
    }
    if(jg){
      cout << ans << endl;
      return 0;
    }
  }
}

        


Compiler output:
a.cc: In function 'int main()':
a.cc:19:29: error: expected ')' before '{' token
   19 |       if(x==s.at(s.size()-1){
      |         ~                   ^
      |                             )
a.cc:23:5: error: expected primary-expression before '}' token
   23 |     }
      |     ^
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.at(i);
  
  for(int ans=n;ans<n*10;ans++){
    string s{ans};
    bool jg=false;
    for(auto x:d){
      if(s.find(x)!=-1)
        break;
      if(x==s.at(s.end()-1)){
        jg=true;
        break;
      }
    }
    if(jg){
      cout << ans << endl;
      return 0;
    }
  }
}

        

Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: warning: narrowing conversion of 'ans' from 'int' to 'char' [-Wnarrowing]
   14 |     string s{ans};
      |              ^~~
a.cc:14:14: warning: narrowing conversion of 'ans' from 'int' to 'char' [-Wnarrowing]
a.cc:19:17: error: no matching function for call to 'std::__cxx11::basic_string<char>::at(__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >)'
   19 |       if(x==s.at(s.end()-1)){
      |             ~~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:1287:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::const_reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; const_reference = const char&; size_type = long unsigned int]'
 1287 |       at(size_type __n) const
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1287:20: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1287 |       at(size_type __n) const
      |          ~~~~~~~~~~^~~
/usr/include/c++/14/bits/basic_string.h:1309:7: note: candidate: 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::reference std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::at(size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; reference = char&; size_type = long unsigned int]'
 1309 |       at(size_type __n)
      |       ^~
/usr/include/c++/14/bits/basic_string.h:1309:20: note:   no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' to 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'}
 1309 |       at(size_type __n)
      |          ~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n)for(long long i=0;i<(long long)(n);i++)
#define all(a) a.begin(), a.end()
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
 
const ll MOD=1e9+7;
const ll INF=1e18;
const int MAX=510000;
const double pi=acos(-1);
int dx[8] = {1,0,-1,0,1,1,-1,-1};
int dy[8] = {0,1,0,-1,-1,1,1,-1};
// int d[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};


int main(){
  cin.tie(0);
  ios::sync_with_stdio(false); 
  
  int n,k;
  cin >> n >> k;
  set<int>st;
  rep(i,k){
    int d;
    cin >> d;
    st.insert(d);
  }
  for(int i=n;i<100000;i++){
    string s = to_string(i);
    bool ok = true;
    rep(j,s.size()){
      if(st.find(s[j]-'0')) ok = false;
    }
    if(ok){
      cout <<i << endl;
      return 0;
    }
  }
    
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:17: error: could not convert 'st.std::set<int>::find((((int)s.std::__cxx11::basic_string<char>::operator[](((std::__cxx11::basic_string<char>::size_type)j))) - 48))' from 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'bool'
   36 |       if(st.find(s[j]-'0')) ok = false;
      |          ~~~~~~~^~~~~~~~~~
      |                 |
      |                 std::set<int>::iterator {aka std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator}
Language: Java

import java.util.Arrays;
import java.util.Scanner;

public class solveAtCode {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N, K;
        int ara[] = new int[10];
        for (int i = 0; i < 10; i++) ara[i] = i;
        N = input.nextInt();
        K = input.nextInt();
        for (int i = 0; i < K; i++) {
            int num = input.nextInt();
            ara[num] = 0;
        }
        Arrays.sort(ara);
        String st = "";
        while (N >= 10) {
            for (int i = K; ; i++) {
                int n = N % 10;
                if (ara[i] >= n) {
                    st = ara[i] + st;
                    break;
                }
            }
            N = N / 10;
        }
        if (ara[K] == 0) K++;
        for (; K < 10; K++) {
            if (ara[K] >= N){
                st = ara[K] + st;
                break;
            }
        }
        System.out.println(st);
    }
}


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

import java.util.Arrays;
import java.util.Scanner;

public class solve {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N, K;
        int ara[] = new int[10];
        for (int i = 0; i < 10; i++) ara[i] = i;
        N = input.nextInt();
        K = input.nextInt();
        for (int i = 0; i < K; i++) {
            int num = input.nextInt();
            ara[num] = 0;
        }
        Arrays.sort(ara);
        String st = "";
        while (N >= 10) {
            for (int i = K; ; i++) {
                int n = N % 10;
                if (ara[i] >= n) {
                    st = ara[i] + st;
                    break;
                }
            }
            N = N / 10;
        }
        if (ara[K] == 0) K++;
        for (; K < 10; K++) {
            if (ara[K] >= N){
                st = ara[K] + st;
            }
        }
        System.out.println(st);
    }
}

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

package atCoder;

import java.util.Arrays;
import java.util.Scanner;

public class solve {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int N, K;
        int ara[] = new int[10];
        for (int i = 0; i < 10; i++) ara[i] = i;
        N = input.nextInt();
        K = input.nextInt();
        for (int i = 0; i < K; i++) {
            int num = input.nextInt();
            ara[num] = 0;
        }
        Arrays.sort(ara);
        String st = "";
        while (N >= 10) {
            for (int i = K; ; i++) {
                int n = N % 10;
                if (ara[i] >= n) {
                    st = ara[i] + st;
                    break;
                }
            }
            N = N / 10;
        }
        if (ara[K] == 0) K++;
        for (; K < 10; K++) {
            if (ara[K] >= N){
                st = ara[K] + st;
            }
        }
        System.out.println(st);
    }
}


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

import java.util.*;
public class Main
{
  public static void main(String[] args)
  {
    int n=sc.nextInt();
    int k=sc.nextInt();
    HashSet<Integer> h=new HashSet<Integer>();
    for(int j=1;j<=k;j++)
      h.add(sc.nextInt());
    while(!comp(n,h))n++;
    System.out.println(n);
  }
  public static boolean comp(int k,HashSet<Integer> h)
  {
    String s=Integer.toString(k);
    for(int i=0;i<s.length();i++)
    {
      int o=s.charAt(i)-'0';
      if(h.contains(o))
        return false;
    }
    return true;}}


Compiler output:
Main.java:6: error: cannot find symbol
    int n=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
Main.java:7: error: cannot find symbol
    int k=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
Main.java:10: error: cannot find symbol
      h.add(sc.nextInt());
            ^
  symbol:   variable sc
  location: class Main
3 errors
Language: Java

public class Main
{
  public static void main(String[] args)
  {
    int n=sc.nextInt();
    int k=sc.nextInt();
    HashSet<Integer> h=new HashSet<Integer>();
    for(int j=1;j<=k;j++)
      h.add(sc.nextInt());
    while(!comp(n,h))n++;
    System.out.println(n);
  }
  public static boolean comp(int k,HashSet<Integer> h)
  {
    String s=Integer.toString(k);
    for(int i=0;i<s.length();i++)
    {
      int o=s.charAt(i)-'0';
      if(h.contains(o))
        return false;
    }
    return true;}}

Compiler output:
Main.java:13: error: cannot find symbol
  public static boolean comp(int k,HashSet<Integer> h)
                                   ^
  symbol:   class HashSet
  location: class Main
Main.java:5: error: cannot find symbol
    int n=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
Main.java:6: error: cannot find symbol
    int k=sc.nextInt();
          ^
  symbol:   variable sc
  location: class Main
Main.java:7: error: cannot find symbol
    HashSet<Integer> h=new HashSet<Integer>();
    ^
  symbol:   class HashSet
  location: class Main
Main.java:7: error: cannot find symbol
    HashSet<Integer> h=new HashSet<Integer>();
                           ^
  symbol:   class HashSet
  location: class Main
Main.java:9: error: cannot find symbol
      h.add(sc.nextInt());
            ^
  symbol:   variable sc
  location: class Main
6 errors
Language: C++

#include <cstdio>

bool isOk(bool *isDisLike, int num){
  while(num){
    if(isDisLike[num % 10]) return false;
    num /= 10;
  }
  return true;
}

int main(){
  int N, K;
  scanf(“%d %d”, &N, &K);
  bool isDisLike[10];
  for(int l = 0, dislike; l < K; l++){
    scanf(“%d”, &dislike);
    isDisLike[dislike] = true;
  }
  
  for(int n = N;;n++){
    if(isOk(n)){
      printf(“%d\n”, n);
      break;
    }
  }

  return 0;
}


Compiler output:
a.cc:13:9: error: extended character “ is not valid in an identifier
   13 |   scanf(“%d %d”, &N, &K);
      |         ^
a.cc:13:14: error: extended character ” is not valid in an identifier
   13 |   scanf(“%d %d”, &N, &K);
      |              ^
a.cc:16:11: error: extended character “ is not valid in an identifier
   16 |     scanf(“%d”, &dislike);
      |           ^
a.cc:16:13: error: extended character ” is not valid in an identifier
   16 |     scanf(“%d”, &dislike);
      |             ^
a.cc:22:14: error: extended character “ is not valid in an identifier
   22 |       printf(“%d\n”, n);
      |              ^
a.cc:22:17: error: stray '\' in program
   22 |       printf(“%d\n”, n);
      |                 ^
a.cc:22:18: error: extended character ” is not valid in an identifier
   22 |       printf(“%d\n”, n);
      |                  ^
a.cc: In function 'int main()':
a.cc:13:9: error: '\U0000201c' was not declared in this scope
   13 |   scanf(“%d %d”, &N, &K);
      |         ^
a.cc:13:11: error: 'd' was not declared in this scope
   13 |   scanf(“%d %d”, &N, &K);
      |           ^
a.cc:13:14: error: 'd\U0000201d' was not declared in this scope
   13 |   scanf(“%d %d”, &N, &K);
      |              ^~
a.cc:21:13: error: invalid conversion from 'int' to 'bool*' [-fpermissive]
   21 |     if(isOk(n)){
      |             ^
      |             |
      |             int
a.cc:21:12: error: too few arguments to function 'bool isOk(bool*, int)'
   21 |     if(isOk(n)){
      |        ~~~~^~~
a.cc:3:6: note: declared here
    3 | bool isOk(bool *isDisLike, int num){
      |      ^~~~
Language: C++

#include <cstdio>

bool isOk(bool *isDisLike, int num) {
  while(num) {
    if(isDisLike[num % 10]) return false;
    num /= 10;
  }
  return true;
}

int main () {
  int N, K;
  scanf(“%d %d”, &N, &K);
  bool isDisLike[10];
  for(int l = 0, dislike; l < K; l++) {
    scanf(“%d”, &dislike);
    isDisLike[dislike] = true;
  }
  
  for(int n = N;;n++) {
    if(isOk(n)) {
      printf(“%d\n”, n);
      break;
    }
  }

  return 0;
}


Compiler output:
a.cc:13:9: error: extended character “ is not valid in an identifier
   13 |   scanf(“%d %d”, &N, &K);
      |         ^
a.cc:13:14: error: extended character ” is not valid in an identifier
   13 |   scanf(“%d %d”, &N, &K);
      |              ^
a.cc:16:11: error: extended character “ is not valid in an identifier
   16 |     scanf(“%d”, &dislike);
      |           ^
a.cc:16:13: error: extended character ” is not valid in an identifier
   16 |     scanf(“%d”, &dislike);
      |             ^
a.cc:22:14: error: extended character “ is not valid in an identifier
   22 |       printf(“%d\n”, n);
      |              ^
a.cc:22:17: error: stray '\' in program
   22 |       printf(“%d\n”, n);
      |                 ^
a.cc:22:18: error: extended character ” is not valid in an identifier
   22 |       printf(“%d\n”, n);
      |                  ^
a.cc: In function 'int main()':
a.cc:13:9: error: '\U0000201c' was not declared in this scope
   13 |   scanf(“%d %d”, &N, &K);
      |         ^
a.cc:13:11: error: 'd' was not declared in this scope
   13 |   scanf(“%d %d”, &N, &K);
      |           ^
a.cc:13:14: error: 'd\U0000201d' was not declared in this scope
   13 |   scanf(“%d %d”, &N, &K);
      |              ^~
a.cc:21:13: error: invalid conversion from 'int' to 'bool*' [-fpermissive]
   21 |     if(isOk(n)) {
      |             ^
      |             |
      |             int
a.cc:21:12: error: too few arguments to function 'bool isOk(bool*, int)'
   21 |     if(isOk(n)) {
      |        ~~~~^~~
a.cc:3:6: note: declared here
    3 | bool isOk(bool *isDisLike, int num) {
      |      ^~~~
Language: C++

int main(){
    // N円の商品を買う。 K個の数が嫌い。
    int N, K;
    int temp;
    int hateNunbers[10];
    cin >> N >> K;
    for (int i = 0; i < K; i++) {
      cin >> hateNunbers[i];
   }
   int num = N;
   while(1){
       string s = to_string(num);
       bool can = true;

       for(int i = 0;i < K; i++){
           if(count(s.begin(),s.end(), hateNunbers[i])){
               can = false;
               num++;
               break;
           }
       }
       if (can) {
         cout << num << endl;
         return 0;
      }
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope
    6 |     cin >> N >> K;
      |     ^~~
a.cc:12:8: error: 'string' was not declared in this scope
   12 |        string s = to_string(num);
      |        ^~~~~~
a.cc:16:21: error: 's' was not declared in this scope
   16 |            if(count(s.begin(),s.end(), hateNunbers[i])){
      |                     ^
a.cc:16:15: error: 'count' was not declared in this scope
   16 |            if(count(s.begin(),s.end(), hateNunbers[i])){
      |               ^~~~~
a.cc:23:10: error: 'cout' was not declared in this scope
   23 |          cout << num << endl;
      |          ^~~~
a.cc:23:25: error: 'endl' was not declared in this scope
   23 |          cout << num << endl;
      |                         ^~~~
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cost = Integer.parseInt(sc.next());
    int dislikeN = Integer.parseInt(sc.next());
    int[] dislikeArray = new int[10];
    for(int i=0; i<10; i++){
      dislikeArray[Integer.parseInt(sc.next())] = 1;
    }
    
    int pay = cost;
    int safety = 0;
    while(true){
      for(int i=0; i<dislikeN; i++){
        if(judge(dislikeArray[i], pay) && i==dislikeN-1){
          System.out.println(pay);
          safety++;
          break;
        }
      }
      if(safety != 0){
        break;
      }
      pay++;
    }
  }
  
  private static boolean judge(int check, int n){
    while(true){
      if(n%10 == check){
        return false;
      }
      n = n/10;
      if(n == 0){
        return true;
      }
    }
  }

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

#include<iostream>
bool fr(int z, int a[10]){
	
	int r;
	while(z){
		r=z%10;
		if(a[r]) return true;
		z/=10;
	}
	return false;
}
int f(int z,int a[10]){
	int ans=z;
	while(fr(ans,a)) ans++;
	return ans;
}


	

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: Java

import java.util.Scanner;

class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int cost = Integer.parseInt(sc.next());
    int dislike = Integer.parseInt(sc.next());
    int[] numbers = new int[10];
    for(int i=0; i<dislike; i++){
      numbers[Integer.parseInt(sc.next())] = 1;
    }
    int[] likeNumbers = new int[10-dislike];
    int j = 0;
    for(int i=0; i<10; i++){
      if(numbers[i] != 1){
        likeNumbers[j] = i;
        j++;
      } 
    }
    
    j = 0;
    while(true){
      if(cost/Math.pow(10, j) != 0){
        j++;
      }else{
        break;
      }
    }
    
    int pay = 0;
    for(int i=0; i<j; i++){
      pay += Math.pow(likeNumbers[9-dislike], j-i);
    }
    if(cost == pay){
      System.out.println(pay);
    }
    
    for(int s=j; 0<=s; s--){
      for(int t=0; t<9; t++){
        if(pay%Math.pow(10, s)+likeNumbers[9-dislike-t] < cost){
          pay = pay%Math.pow(10, s)+likeNumbers[9-dislike-t+1]*Math.pow(10, s);
          break;
        }
      }
    }
    System.out.println(pay);
  }
}

Compiler output:
Main.java:41: error: incompatible types: possible lossy conversion from double to int
          pay = pay%Math.pow(10, s)+likeNumbers[9-dislike-t+1]*Math.pow(10, s);
                                   ^
1 error
Language: Java

package atCoder;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int price = sc.nextInt();
		int dislikeNumsCount = sc.nextInt();
      
		String dislikeNums = null ;
		int dislikeNum = sc.nextInt();
		dislikeNums += dislikeNum;
		for (int i = 0; i < dislikeNumsCount-1; i++) {
			dislikeNum = sc.nextInt();
			dislikeNums += "||"+dislikeNum;
		}
		dislikeNums = "["+dislikeNums+"]";
		int compare = price;
		String compareStr = String.valueOf(compare);
		while (compare >= price) {
				if (compareStr.contains(dislikeNums)) {
					compare++;
				} else {
					break;
				}
			}
		int payment = Integer.parseInt(compareStr);
		System.out.println(payment);
	}

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

# include "stdio.h"

int main(){
    int n,k,t,c1=0,c2=0,c3=0;
    scanf("%d %d",&n,&k);
    int d[k], use[10] = {0}, num = 0;
    int i, j, l;
    for( i=0;i<k;i++)
        scanf("%d",&d[i]);
    //好きな数
    for (i = 0 ; i<k ; i++) {
        use[d[i]] = 1;  //use[]の中が0なら使用可能
        }

    //桁数
    t=n;
    while(t>0){
        c1++;
        t= t/10;
    };
    t=n;
    //各桁を保存
    int keta[c1];
    for(i=c1-1;i>=0;i--){
        keta[i]=t%10;
        t=t/10;
    }
    int key=0;
    for(i=0;i<c1;i++){
        if (key == 0) {
            if (use[keta[i]] == 0) {
                num += keta[i];
            }
            else {
                for (j = keta[i] + 1 ;j < 10;j++) {
                    if (use[j] == 0) {
                        num += j;
                        key=1;
                        break;
                    }
                }
            }
        }
        else {
            for (int l=0;l < 10;l++) {
                if (use[l] == 0) {
                    num += l;
                    break;
                }
            }
        }
        if(i<c1-1) num=num*10;
    }

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

    if (num == 0) {
        for (int l=1;l < 10;l++) {
            if (use[l] == 0) {
                for (i = 0;i <= c1;i++){
                    num = (num * 10 + l);
                }
                break;
            }
        }
        if (use[0] == 0) {
            for (i = 0;i < c1;i++)
                num = num / 10;
            for (i = 0;i < c1;i++)
                num = num * 10;
        }
    }
    printf("%d\n",num);

Compiler output:
a.cc: In function 'int main()':
a.cc:73:24: error: expected '}' at end of input
   73 |     printf("%d\n",num);
      |                        ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: Java

import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	int price = sc.nextInt();
      	int dislikeNumsCount = sc.nextInt();
      	int payment=0;
      	List<Integer> nums = new ArrayList<>();
      	for (int i=0;i<10;i++){
        	nums.add(i);
        }
      	for(int i=0;i<dislikeNumsCount;i++){
          int dislikeNum = sc.nextInt();
          if(nums.contains(dislikeNum)){
          	nums.remove(nums.indexOf(dislikeNum));
          }
        }
 		if(price<10){
          	int onesDigit=0;
         	while(true){
        		int onesDigit=nums.get(i);
          		if(onesDigit>price){
              	break;
        		}
        	}
            payment=onesDigit;
        }else if(price>=10 && price<100){
        	int tensDigit=0;
          	int onesDigit=0;
        	while(true){
        		tensDgit=nums.get(i);
          		if(tenDigit*10>price){
              	break;
        		}
        	}
         	while(true){
        		onesDigit=nums.get(i);
          		if(tensDigit*10+onesDigit>price){
              	break;
        		}
        	}
         	payment=tensDigit*10+onesDigit;
		}else if(price>=100 && price<1000){
        	int hundredsDigit=0;
        	int tensDigit=0;
          	int onesDigit=0;
           	while(true){
              hundredsDigit=nums.get(i);
              if(hundredsDigit*100>price){
                break;
              }
       		}
        	while(true){
        		tensDigit=nums.get(i);
          		if(hundredsDigit*100+tensDigit*10>price){
              	break;
        		}
        	}
         	while(true){
        		onesDigit=nums.get(i);
          		if(hundredsDigit*100+tensDigit*10+onesDigit>price){
              	break;
        	}
            payment=hundredsDigit*100+tensDigit*10+onesDigit;
        }else if(price>=1000 && price<10000){
            int thousandsDigit=0;
        	int hundredsDigit=0;
        	int tensDigit=0;
          	int onesDigit=0;
            while(true){
              thousandsDigit=nums.get(i);
              if(thousandsDigit*1000>price){
                break;
              }
       		}
           	while(true){
              hundredsDigit=nums.get(i);
              if(thousandsDigit*1000+hundredsDigit*100>price){
                break;
              }
       		}
        	while(true){
        		tenDgit=nums.get(i);
          		if(thousandsDigit*1000+hundredsDigit*100+tensDigit*10>price){
              	break;
        		}
        	}
         	while(true){
        		onesDigit=nums.get(i);
          		if(thousandsDigit*1000+hundredsDigit*100+tensDigit*10+onesDigit>price){
              	break;
        	}
            payment=thousandsDigit*1000+hundredsDigit*100+tensDigit*10+onesDigit;
        }
       	System.out.println(payment);
   		sc.close();
	}
}

Compiler output:
Main.java:68: error: 'else' without 'if'
        }else if(price>=1000 && price<10000){
         ^
Main.java:101: error: reached end of file while parsing
}
 ^
2 errors
Language: C++

int main(){
    int n,k,t,c1=0,c2=0,c3=0;
    scanf("%d %d",&n,&k);
    int d[k],use[10-k],num=0;
    for(int i=0;i<k;i++)
        scanf("%d",&d[i]);
    //好きな数
        for(int j=0;j<10;j++){
            for(int l=0;l<k;l++){
                if(j!=d[l]) c2++;
            }
            if(c2==k){
                use[num]=j;
                num++;
            }
            c2=0;
        }

    //桁数
    t=n;
    while(t>0){
        c1++;
        t= t/10;
    };
    t=n;
    //各桁を保存
    int keta[c1+1];
    for(int i=0;i<c1;i++){
        keta[i]=t%10;
        t=t/10;
    }
    keta[c1]=0;

    int key=0;
    for(int i=0;i<c1+1;i++){
        do{
            if(i==c1&&keta[c1]==0) break;
            for(int j=0;j<10-k;j++){
                if(keta[i]==use[j]){
                    key=1;
                    break;
                }
            }
            if(key==0) keta[i]++;
            if(keta[i]>=10){
                keta[i]=0;
                keta[i+1]++;
            }
        }while(key==0);
        key=0;
    }

    int ans=0,pow=1;
    for(int i=0;i<c1+1;i++){
        for(int j=0;j<i;j++){
        pow=pow*10;
        }
        ans =ans+keta[i]*pow;
        pow=1;
    }
    printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:5: error: 'scanf' was not declared in this scope
    3 |     scanf("%d %d",&n,&k);
      |     ^~~~~
a.cc:61:5: error: 'printf' was not declared in this scope
   61 |     printf("%d\n",ans);
      |     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(){
Language: C++

#include<bits/stdc++.h>
#define fastio     ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define all(x)     (x).begin() , (x).end()
#define rep(i,a,b) for(int i=a;i<b;i++)
#define endl       '\n'
#define MAX        1000000
#define debug(x...) cerr << "[" << #x << "] = ["; _print(x)
typedef long long int ll;
using namespace std;

void __print(int x) {cerr << x;}
void __print(long x) {cerr << x;}
void __print(long long x) {cerr << x;}
void __print(unsigned x) {cerr << x;}
void __print(unsigned long x) {cerr << x;}
void __print(unsigned long long x) {cerr << x;}
void __print(float x) {cerr << x;}
void __print(double x) {cerr << x;}
void __print(long double x) {cerr << x;}
void __print(char x) {cerr << '\'' << x << '\'';}
void __print(const char *x) {cerr << '\"' << x << '\"';}
void __print(const string &x) {cerr << '\"' << x << '\"';}
void __print(bool x) {cerr << (x ? "true" : "false");}

template<typename T, typename V>
void __print(const pair<T, V> &x) {cerr << '{'; __print(x.first); cerr << ','; __print(x.second); cerr << '}';}
template<typename T>
void __print(const T &x) {int f = 0; cerr << '{'; for (auto &i: x) cerr << (f++ ? "," : ""), __print(i); cerr << "}";}
void _print() {cerr << "]\n";}
template <typename T, typename... V>
void _print(T t, V... v) {__print(t); if (sizeof...(v)) cerr << ", "; _print(v...);}


const ll mod = 1e9+7;
const double eps = 1e-9;
const double pi = acos(-1);

void solve(){
    int k;
    int n;
    cin>>n>>k;
    bool arr[11];
    memset(arr,false,sizeof(arr));
    for(int i=0;i<k;i++) {
        int t;
        cin>>t;
        arr[t]=true;
    }
    for(int i=n;i<10000;i++) {
        string ans=to_string(i);
        bool flag=true;
        for(int j=0;j<(int)ans.size();j++) {
            if(arr[s[j]-'0']) {
                flag=false;
                break;
            }
        }
        if(flag) {
            cout<<ans<<"\n";
            return;
        }
    }
}





int main(){
    fastio
    int test=1;
    while(test--)
        solve();
    return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:53:20: error: 's' was not declared in this scope
   53 |             if(arr[s[j]-'0']) {
      |                    ^
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[] ilist = 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:12: error: cannot find symbol
      String str = String.valueOf(iList[i]);
                                  ^
  symbol:   variable iList
  location: class Main
Main.java:20: error: cannot find symbol
        if(nstr.contais(str)){
               ^
  symbol:   method contais(String)
  location: variable nstr of type String
2 errors
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();    
    String[] ilist =　new String[k]; 
    
    for(int i = 0; i<k; i++){
      ilist[i] = String.valueOf(sc.nextInt());
    }
    
    while(true){
      boolean boo = true;
      String nstr = String.valueOf(n);
      for(String str : ilist){
        if(nstr.contais(str)){
          boo = false;
          break;
        }
      }
      if(boo){
        break;
      }
      n++;
    }
    System.out.println(n);
  }
}


Compiler output:
Main.java:7: error: illegal character: '\u3000'
    String[] ilist =?new String[k]; 
                    ^
Main.java:7: error: not a statement
    String[] ilist =?new String[k]; 
                     ^
2 errors
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[] ilist =　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[] ilist =?new int[k]; 
                 ^
Main.java:9: error: not a statement
    int[] ilist =?new int[k]; 
                  ^
2 errors