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);

        String S = sc.next();
        for (int i = 0; i < S.length(); i++) {
            System.out.print( S.substring( i, i+1 ).equals("1") ? "9" : "1" );
        }
        sc.close();
    }
}

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

import java.util.Scanner;

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

        Scanner sc = new Scanner(System.in);

        String S = sc.next();
        for (int i = 0; i < S.length(); i++) {
            System.out.print( S.substring( i, i+1 ).equals("1") ? "9" : "1" );
        }
        sc.close();
    }
}

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

#include<iostream>
using namespace std;
int main(){ string n;
cin >> n; for(char c:n){
if(c == ’1’){
cout << 9;
}else{
cout << 1;
} }
return 0; }
 

Compiler output:
a.cc:5:9: error: extended character ’ is not valid in an identifier
    5 | if(c == ’1’){
      |         ^
a.cc:5:9: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:5:9: error: '\U000020191\U00002019' was not declared in this scope
    5 | if(c == ’1’){
      |         ^~~
Language: C++

#include<iostream>
using namespace std;
int main(){ int n;
}
cin >> n;
cout << 111 + 999 − n << endl; return 0;

Compiler output:
a.cc:6:19: error: extended character − is not valid in an identifier
    6 | cout << 111 + 999 − n << endl; return 0;
      |                   ^
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> n;
      | ^~~
a.cc:6:1: error: 'cout' does not name a type
    6 | cout << 111 + 999 − n << endl; return 0;
      | ^~~~
a.cc:6:32: error: expected unqualified-id before 'return'
    6 | cout << 111 + 999 − n << endl; return 0;
      |                                ^~~~~~
Language: C++


#include<iostream>
using namespace std;
int main(){ int n;
}
cin >> n;
cout << 111 + 999 − n << endl; return 0;

Compiler output:
a.cc:7:19: error: extended character − is not valid in an identifier
    7 | cout << 111 + 999 − n << endl; return 0;
      |                   ^
a.cc:6:1: error: 'cin' does not name a type
    6 | cin >> n;
      | ^~~
a.cc:7:1: error: 'cout' does not name a type
    7 | cout << 111 + 999 − n << endl; return 0;
      | ^~~~
a.cc:7:32: error: expected unqualified-id before 'return'
    7 | cout << 111 + 999 − n << endl; return 0;
      |                                ^~~~~~
Language: C++

#include <stdio>
#include <iostream>

using namespace std;

int main(){
  char c;
  while(cin >> c){
   if(c=='9')cout << '1';else cout << '9';
  }
  cout << endl;
}

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

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <complex>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cassert>
#include <iomanip>
using namespace std;

#define Rep(b, e, i) for(int i = b; i <= e; i++)
#define Repr(e, b, i) for(int i = e; i >= b; i--)
#define rep(n, i) Rep(0, n-1, i)
#define repr(n, i) Repr(n-1, 0, i)
#define all(v) (v).begin(), (v).end()
#define pb(v) push_back(v)
#define uniq(v) (v).erase(unique(all(v)),(v).end())
#define bitcnt(x) __builtin_popcount(x)
#define fst first
#define snd second
#define Pqaz(T) priority_queue<T,vector<T>,greater<T>>
#define Pqza(T) priority_queue<T>
#define put(x) cout << x;
#define putsp(x) cout << x << ' ';
#define putbd cout << "---------------------------------------------" << endl;
#define putln(x) cout << x << endl;
#define debug(x) cerr << #x << "=" << x << endl;
#define ENJYU std::ios::sync_with_stdio(false);std::cin.tie(0);

typedef long long ll;
typedef pair<ll, ll> llP;
typedef pair<int, int> intP;
typedef complex<double> comp;
typedef vector <int> vec;
typedef vector <ll> vecll;
typedef vector <double> vecd;
typedef vector <vec> mat;
typedef vector <vecll> matll;
typedef vector <vecd> matd;

//vector の中身を出力
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

const int MAX = 200020;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const ll INFL = 1e18;
const ll MOD = 1e9+7;

const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
//const int dx[]={-1,-1,-1,0,1,1,1,0},dy[]={-1,0,1,1,1,0,-1,-1};

//********************************template END****************************************//

void solve(void){

	string S;
	cin >> S;
	rep(3, i)
	{
		if (S[i] == '1') put('9');
		else put('1');
	}

	cout << endl;

}

int main(void){
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:74:17: error: 'else' without a previous 'if'
   74 |                 else put('1');
      |                 ^~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cmath>
#include <complex>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cassert>
#include <iomanip>
using namespace std;

#define Rep(b, e, i) for(int i = b; i <= e; i++)
#define Repr(e, b, i) for(int i = e; i >= b; i--)
#define rep(n, i) Rep(0, n-1, i)
#define repr(n, i) Repr(n-1, 0, i)
#define all(v) (v).begin(), (v).end()
#define pb(v) push_back(v)
#define uniq(v) (v).erase(unique(all(v)),(v).end())
#define bitcnt(x) __builtin_popcount(x)
#define fst first
#define snd second
#define Pqaz(T) priority_queue<T,vector<T>,greater<T>>
#define Pqza(T) priority_queue<T>
#define put(x) cout << x;
#define putsp(x) cout << x << ' ';
#define putbd cout << "---------------------------------------------" << endl;
#define putln(x) cout << x << endl;
#define debug(x) cerr << #x << "=" << x << endl;
#define ENJYU std::ios::sync_with_stdio(false);std::cin.tie(0);

typedef long long ll;
typedef pair<ll, ll> llP;
typedef pair<int, int> intP;
typedef complex<double> comp;
typedef vector <int> vec;
typedef vector <ll> vecll;
typedef vector <double> vecd;
typedef vector <vec> mat;
typedef vector <vecll> matll;
typedef vector <vecd> matd;

//vector の中身を出力
template <class T>ostream &operator<<(ostream &o,const vector<T>&v)
{o<<"{";for(int i=0;i<(int)v.size();i++)o<<(i>0?", ":"")<<v[i];o<<"}";return o;}

const int MAX = 200020;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = 1<<29;
const ll INFL = 1e18;
const ll MOD = 1e9+7;

const int dx[]={1,0,-1,0},dy[]={0,1,0,-1};
//const int dx[]={-1,-1,-1,0,1,1,1,0},dy[]={-1,0,1,1,1,0,-1,-1};

//********************************template END****************************************//

void solve(void){

	string S;
	cin >> S;
	rep(3, i)
	{
		if (S[i] == '1') put('9');
		else put('9';)
	}

	cout << endl;

}

int main(void){
	solve();
	//cout << "yui(*-v・)yui" << endl;
	return 0;
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:74:17: error: 'else' without a previous 'if'
   74 |                 else put('9';)
      |                 ^~~~
Language: C++

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

int main() {
    string n;
    cin >> n;
    for (int tmp = 0; tmp < (int)n.size(), tmp++){
        if (n[tmp] == '1'){
            n[tmp] = '9';
        } else if (n[tmp] =='9'){
            n[tmp] = '1';
        }
    }
    cout << n << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:49: error: expected ';' before ')' token
    8 |     for (int tmp = 0; tmp < (int)n.size(), tmp++){
      |                                                 ^
      |                                                 ;
Language: C++

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

int main() {
    string n;
    cin >> n;
    for (int tmp = 0; tmp < (int)n.size(), tmp++){
        if (n[tmp] == '1'){
            n[tmp] = '9';
        } else if (n[tmp] =='9'){{
            n[tmp] = '1';
        }
    }
    cout << n << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:49: error: expected ';' before ')' token
    8 |     for (int tmp = 0; tmp < (int)n.size(), tmp++){
      |                                                 ^
      |                                                 ;
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C++

#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>
#include <cstring>
#include <map>
#include <queue>
#include <cmath>
#include <complex> // complex<double> a(1.2 , 2.3);// real(): 1.2, imag()2.3
using namespace std;

#define MOD 1000000007
#define ll long long
#define ld long double
#define FOR(i,a,b) for(ll i=(ll)a;i<(ll)b;i++)
#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}
#define pq_pair_tB priority_queue <pair<ll,ll>, vector<pair<ll,ll> > , greater<pair<ll,ll> > >
#define pq_pair_ts priority_queue <pair<ll,ll> > //第二成分の大きさが関係ない
template<typename X> bool exist(vector<X> vec, X item){return find(all(vec), item)!=vec.end();}
ll gcd(ll a, ll b){if(b==0)return a;return gcd(b,a%b);}
ll lcm(ll a, ll b){return a/gcd(a,b)*b;}


int main()
{
	string inp;
	cin >> inp;
	rep(i,inp.size()){
		if(inp[i] == '9') inp[i] = '1';
		else if(inp[i] == '1') inp[i] = '9';
	}
	
	return inp;

    return 0;
}

/*
/^[\w!\x22\#$%&@\'() * +,-.\/;:]+$/
*/


Compiler output:
a.cc: In function 'int main()':
a.cc:39:16: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'int' in return
   39 |         return inp;
      |                ^~~
      |                |
      |                std::string {aka std::__cxx11::basic_string<char>}
Language: Java

import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.new);
        int n = scanner.nextInt();

        int n100 = 10 - (n / 100);
        int n10 = 10 - ((n - n100) / 10);
        int n1 = 10 - (n - n100 - n10);
        System.out.print(n100);
        System.out.print(n10);
        System.out.println(n1);
    }
}


Compiler output:
Main.java:5: error: <identifier> expected
        Scanner scanner = new Scanner(System.new);
                                                ^
1 error
Language: C++

>,--->++++++[<--------->-]<[>+++++[<+++++++++++++>-]<.>+++[<------------------->-]<<+>]<-[+>>+++++++[<+++++++>-]<.>+++++++[<------->-]<<]
>,--->++++++[<--------->-]<[>+++++[<+++++++++++++>-]<.>+++[<------------------->-]<<+>]<-[+>>+++++++[<+++++++>-]<.>+++++++[<------->-]<<]
>,--->++++++[<--------->-]<[>+++++[<+++++++++++++>-]<.>+++[<------------------->-]<<+>]<-[+>>+++++++[<+++++++>-]<.>+++++++[<------->-]<<]
++++++++++.

Compiler output:
a.cc:1:1: error: expected unqualified-id before '>' token
    1 | >,--->++++++[<--------->-]<[>+++++[<+++++++++++++>-]<.>+++[<------------------->-]<<+>]<-[+>>+++++++[<+++++++>-]<.>+++++++[<------->-]<<]
      | ^
Language: Java

package Topsic;

import java.util.Scanner;

public class practice{

    public static void main(String[] args){


        Scanner scanNum = new Scanner(System.in);

        String inputNum = scanNum.next();

        scanNum.close();

        char[] charArray = inputNum.toCharArray();

        String print = "";

        for(int i=0; i < inputNum.length() ; i++){
            if(charArray[i] == '1'){
                charArray[i] = '9';
                print = print + 9;
            }
            else{
                charArray[i] = '1';
                print = print + 1;
            }
        }


        System.out.print(print);
    }
}


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

#include <bits/stdc++.h>
#include <numeric>
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define SORT_INV(c) sort((c).begin(), (c).end(), greater<int>())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
#define LL long long
#define Dev 1000000007

// sort(a.begin(), a.end(), std::greater<int>());
using namespace std;

int main()
{
    stirng s;
    cin >> s;
    rep(i, s.size())
    {
        if (s[i] == '1')
            s[i] = '9';
        else if (s[i] == '9')
            s[i] = '1';
    }
    cout << s << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'stirng' was not declared in this scope
   18 |     stirng s;
      |     ^~~~~~
a.cc:19:12: error: 's' was not declared in this scope
   19 |     cin >> s;
      |            ^
Language: C++

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

int main() {
  string s;
  cin>>s;
  
  for(i=0;i<3;++i){
    if(s[i]=='1')
      s[i]='9';
    else if(s[i]=='9')
      s[i]='1';
  }
  
  cout<<s<<endl;
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'i' was not declared in this scope
   10 |   for(i=0;i<3;++i){
      |       ^
Language: C++

#include<stdio.h>

int main(){
  int n;
  scanf("%d",&n);

  if(n%10==1){
  	ans = 9;
    n = n/10;
  }else{
  	ans = 1;
    n = n/10;
  }
    printf("%d\n",ans);
  if(n%10==1){
  	ans = ans+(10*9);
    n = n/10;
  }else{
  	ans = ans+(10*1);
    n = n/10;
  }
   if(n%10==1){
  	ans = ans+(100*9);
    n = n/10;
  }else{
  	ans = ans+(100*1);;
    n = n/10;
  }

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: 'ans' was not declared in this scope
    8 |         ans = 9;
      |         ^~~
a.cc:11:9: error: 'ans' was not declared in this scope
   11 |         ans = 1;
      |         ^~~
a.cc:14:19: error: 'ans' was not declared in this scope
   14 |     printf("%d\n",ans);
      |                   ^~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  string n;
  cin >> n;
  for(char c:n){
    if(c =="1"){
      cout << 9;
    } else {
      cout << 1;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(c =="1"){
      |        ~~^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
  string n;
  for(char c:n){
    if(c =="1"){
      cout << 9;
    } else {
      cout << 1;
    }
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(c =="1"){
      |        ~~^~~~~
Language: Java

import.java.sql.*;
class main{
  int N;
  
  N=Scanner.nextInt();
  int M=N;
  if(N%100=1){
   M+=800;
    }
  if(N%100=9){
   M-=800;
    }
  N/=10;
  if(N%10=9){
   M-=800;
    }
  if(N%10=1){
   M+=800;
    } 
  N/=10;
  if(N=9){
   M-=8;
    }
  if(N=1){
   M+=8;
    }
  System.out.println(M);
  }
}

Compiler output:
Main.java:1: error: <identifier> expected
import.java.sql.*;
      ^
Main.java:5: error: <identifier> expected
  N=Scanner.nextInt();
   ^
Main.java:7: error: illegal start of type
  if(N%100=1){
  ^
Main.java:7: error: <identifier> expected
  if(N%100=1){
      ^
Main.java:10: error: illegal start of type
  if(N%100=9){
  ^
Main.java:10: error: <identifier> expected
  if(N%100=9){
      ^
Main.java:13: error: <identifier> expected
  N/=10;
   ^
Main.java:14: error: illegal start of type
  if(N%10=9){
  ^
Main.java:14: error: <identifier> expected
  if(N%10=9){
      ^
Main.java:17: error: illegal start of type
  if(N%10=1){
  ^
Main.java:17: error: <identifier> expected
  if(N%10=1){
      ^
Main.java:20: error: <identifier> expected
  N/=10;
   ^
Main.java:21: error: illegal start of type
  if(N=9){
  ^
Main.java:21: error: <identifier> expected
  if(N=9){
      ^
Main.java:21: error: ';' expected
  if(N=9){
        ^
Main.java:24: error: illegal start of type
  if(N=1){
  ^
Main.java:24: error: <identifier> expected
  if(N=1){
      ^
Main.java:24: error: ';' expected
  if(N=1){
        ^
Main.java:27: error: <identifier> expected
  System.out.println(M);
                    ^
Main.java:27: error: <identifier> expected
  System.out.println(M);
                      ^
Main.java:29: error: class, interface, enum, or record expected
}
^
21 errors
Language: C++

#include <iostream>
using namespace std;

int main() {
  char n[3];
  cin >> n;
  
  for(int i = 0; i++; i < n) {
    if(n[i] == '1') {
      cout << 9;
    } else {
      cout << 1;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   for(int i = 0; i++; i < n) {
      |                       ~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
char a[100];
int main() {
	gets(a);
	int len = strlen(a);
	for(int i = 0; i < len; i++) {
		if(a[i] == '9')a[i] = '1';
		else if(a[i] == '1')a[i] = '9';
	}
	for(int i = 0; i < len; i++) {
		cout<<a[i];
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
    5 |         gets(a);
      |         ^~~~
      |         getw
Language: C++

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

int main() {
  string  n;
  cin >> n;
  
  for(int i = 0; i++ i < 3) {
    if(n[i] == '1') {
      n[i] = 9;
    }
    else {
      n[i] = 1;
    }
  }
  cout << n << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before 'i'
    8 |   for(int i = 0; i++ i < 3) {
      |                     ^~
      |                     ;
Language: C++

# -*- coding : utf-8 -*-

n = int(input())
ans = ""

for i in str(n):
    if int(i) == 1:
        i = 9
    elif int(i) == 9:
        i = 1

    ans = ans + str(i)

print(int(ans))


Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding : utf-8 -*-
      |   ^
a.cc:3:1: error: 'n' does not name a type
    3 | n = int(input())
      | ^
Language: C++

#include <iostream>
using namespace std;

int main(){
  int num1;
  cin >> num1;
  switch(num1){
      case 000:
      num1 = 999;
      break;
      
      case 009:
      num1 = 990;
      break;
      
      case 090:
      num1 = 909;
      break;
      
      case 099:
      num1 = 900;
      break;
      
      case 900:
      num1 = 099;
      break;
      
      case 909:
      num1 = 090;
      break;
      
      case 990:
      num1 = 009;
      break;
      
      case 999:
      num1 = 000;
      break;      
  }
  
  cout << num1 << endl;
  return 0;
}

Compiler output:
a.cc:12:12: error: invalid digit "9" in octal constant
   12 |       case 009:
      |            ^~~
a.cc:16:12: error: invalid digit "9" in octal constant
   16 |       case 090:
      |            ^~~
a.cc:20:12: error: invalid digit "9" in octal constant
   20 |       case 099:
      |            ^~~
a.cc:25:14: error: invalid digit "9" in octal constant
   25 |       num1 = 099;
      |              ^~~
a.cc:29:14: error: invalid digit "9" in octal constant
   29 |       num1 = 090;
      |              ^~~
a.cc:33:14: error: invalid digit "9" in octal constant
   33 |       num1 = 009;
      |              ^~~
Language: C++

tran = str.maketrans('19', '91')
print(input().translate(tran))

Compiler output:
a.cc:1:22: warning: multi-character character constant [-Wmultichar]
    1 | tran = str.maketrans('19', '91')
      |                      ^~~~
a.cc:1:28: warning: multi-character character constant [-Wmultichar]
    1 | tran = str.maketrans('19', '91')
      |                            ^~~~
a.cc:1:1: error: 'tran' does not name a type
    1 | tran = str.maketrans('19', '91')
      | ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;
  cin >> n;
  for(i = n%10; i != 0;n /= 10,  i = n%10)
    cout << (i == 1?9:1);
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   for(i = n%10; i != 0;n /= 10,  i = n%10)
      |       ^
Language: Java

import java.util.Scanner;
public class A929 {
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String line=sc.nextLine();
        char[] num=new char[line.length()];
        for(int i=0;i<num.length;i++){
            if(line.charAt(i)=='1')
                num[i]='9';
            else if(line.charAt(i)=='9')
                num[i]='1';
            else
                num[i]=line.charAt(i);
            System.out.print(num[i]);
        }
        System.out.println();
    }
}


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

#include<stdio.h>
int main(){
  char s[3];
  int i;
  scanf("%s",a);
  for(i=0;i<3;i++){
    if(s[i] == '1'){
      s[i] = '9';
    }else{
      s[i] == '1';
    }
  }
  printf("%s\n", s);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:14: error: 'a' was not declared in this scope
    5 |   scanf("%s",a);
      |              ^
Language: C++

s = list(input())
t = ''
for i in range(3):
    if(s[i] == '1'):
        t += '9'
    else:
        t += '1'

print(t)



Compiler output:
a.cc:2:5: error: empty character constant
    2 | t = ''
      |     ^~
a.cc:1:1: error: 's' does not name a type
    1 | s = list(input())
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string a;
  	int i,l;
  	cin>>a;
  	l=a.size();
  	for (i=0;i<l;i++){
      if (a[i]=="1") a[i]="9";
      else if (a[i]=="9") a[i]="1";
    }
  	cout<<a;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if (a[i]=="1") a[i]="9";
a.cc:9:27: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       if (a[i]=="1") a[i]="9";
      |                           ^~~
      |                           |
      |                           const char*
a.cc:10:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       else if (a[i]=="9") a[i]="1";
a.cc:10:32: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |       else if (a[i]=="9") a[i]="1";
      |                                ^~~
      |                                |
      |                                const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	string a;
  	int i,l;
  	cin>>a;
  	l=a.size();
  	for (i=0;i<l;i++){
      if (a[i]=="1") a[i]="9";
      else if (a[i]=="9") a[i]="1";
    }
  	cout<<a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |       if (a[i]=="1") a[i]="9";
a.cc:9:27: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       if (a[i]=="1") a[i]="9";
      |                           ^~~
      |                           |
      |                           const char*
a.cc:10:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |       else if (a[i]=="9") a[i]="1";
a.cc:10:32: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   10 |       else if (a[i]=="9") a[i]="1";
      |                                ^~~
      |                                |
      |                                const char*
Language: C++

#import<ios>
main(){int a;std::cin>>a;std::cout<<1110-a;}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<ios>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a;std::cin>>a;std::cout<<1110-a;}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:19: error: 'cin' is not a member of 'std'
    2 | main(){int a;std::cin>>a;std::cout<<1110-a;}
      |                   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #import<ios>
  +++ |+#include <iostream>
    2 | main(){int a;std::cin>>a;std::cout<<1110-a;}
a.cc:2:31: error: 'cout' is not a member of 'std'
    2 | main(){int a;std::cin>>a;std::cout<<1110-a;}
      |                               ^~~~
a.cc:2:31: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#import<iostream>
main(){int a;std::cin>>a;puts(1110-a);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){int a;std::cin>>a;puts(1110-a);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:35: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    2 | main(){int a;std::cin>>a;puts(1110-a);}
      |                               ~~~~^~
      |                                   |
      |                                   int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

#import<iostream>
main(){std::string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){std::string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:54: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | main(){std::string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}
      |                                                      ^~~~
      |                                                      std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#import<iostream>
main(){string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}

Compiler output:
a.cc:1:2: warning: #import is a deprecated GCC extension [-Wdeprecated]
    1 | #import<iostream>
      |  ^~~~~~
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:2:8: error: 'string' was not declared in this scope
    2 | main(){string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}
      |        ^~~~~~
a.cc:2:8: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:2:27: error: 's' was not declared in this scope
    2 | main(){string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}
      |                           ^
a.cc:2:49: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    2 | main(){string s;std::cin>>s;for(int i=0;i<3;i++)cout<<(s[i]-'9'?9:1);}
      |                                                 ^~~~
      |                                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {string n;cin>>n;
    for(int i=0;i<n.size();i++){
      if(n[i]=="1"){cout<<9;}
      else{cout<<1;}}
            cout<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    6 |       if(n[i]=="1"){cout<<9;}
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {string n;cin>>n;
    for(int i=0;i<n.size();i++){
      if(n[i]="1"){cout<<9;}
      else{cout<<1;}}
            cout<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    6 |       if(n[i]="1"){cout<<9;}
      |               ^~~
      |               |
      |               const char*
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {int n;cin>>n;
    for(int i=0;i<n.size();i++){
      if(n[i]=1){cout<<9;}
      else{cout<<1;}}
            cout<<endl;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:21: error: request for member 'size' in 'n', which is of non-class type 'int'
    5 |     for(int i=0;i<n.size();i++){
      |                     ^~~~
a.cc:6:11: error: invalid types 'int[int]' for array subscript
    6 |       if(n[i]=1){cout<<9;}
      |           ^
Language: C

#include <stdio.h>;

int main() {
	int n;
	scanf_s("%d",&n);
	int ans[3];
	for (int i = 0; i < 3; i++) {
		if (n % 10 == 1) {
			ans[i] = 9;
		}
		else if (n % 10 == 9) {
			ans[i] = 1;
		}
		else {
			ans[i] = n % 10;
		}
		n=n / 10;
	}
	printf("%d", ans[0] + ans[1] * 10+ans[2]*100);
	return 0;
}

Compiler output:
main.c:1:19: warning: extra tokens at end of #include directive
    1 | #include <stdio.h>;
      |                   ^
main.c: In function 'main':
main.c:5:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |         scanf_s("%d",&n);
      |         ^~~~~~~
      |         scanf
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
int main(){
  char x[3];
  for(int i=0;i<3;i++){
     cin>>x[i];
     if(x[i]=='9'){
       x[i]='1';
     }else{
       x[i]='9';
     }
 for(int i=0;i<3;i++){
   cout<<x[i];
 }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:2: error: expected '}' at end of input
   18 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
int main(){
  char x[3];
  for(int i=0;i<3;i++){
     cin>>x[i];
     if(x[i]=='9'){
       x[i]='1';
  }else{
       x[i]='9';
  }
 for(int i=0;i<3;i++){
   cout<<x[i];
}
cout<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
int main(){
  int x[3];
  for(int i=0;i<3;i++){
     cin>>x[i];
     if(x[i]==9){
       x[i]=1;
  }else{
       x[i]=9;
  }
 for(int i=0;i<3;i++){
   cout<<x[i];
}
cout<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>

using namespace std;

int main(){
  int x[3];
  for(int i=0;i<3;i++){
     cin>>x[i];
     if(x[i]==9){
       x[i]=1;
  }else{
       x[i]-9;
  }
 for(int i=0;i<3;i++){
   cout<<x[i];
}
cout<<endl;
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

#include<iostream>
#include<stiring>
#include<algorithm>
using namespace std;
int main () {
    storing a;
    cin>>a;
    for(int i=0;i<3;i++){
        if(a[i]==1)a[i]=9;
        if(a[i]==9)a[i]=1;
    }
    cout<<a<<endl;
    return 0;
}


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

#include<iostream>
using namespace std;
int main(){
  int n;
  cin>>n;
  int a[3];
  int a[0]=n/100;
  int a[1]=(n-a[0]*100)/10;
  int a[2]=n%10;
  for(int i=0;i<3;i++){
    if(a[i]==9)a[i]=1;
    else if(a[i]==1)a[i]=9;
    cout<<a[i];
  }
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: conflicting declaration 'int a [0]'
    7 |   int a[0]=n/100;
      |       ^
a.cc:6:7: note: previous declaration as 'int a [3]'
    6 |   int a[3];
      |       ^
a.cc:8:7: error: conflicting declaration 'int a [1]'
    8 |   int a[1]=(n-a[0]*100)/10;
      |       ^
a.cc:6:7: note: previous declaration as 'int a [3]'
    6 |   int a[3];
      |       ^
a.cc:9:7: error: conflicting declaration 'int a [2]'
    9 |   int a[2]=n%10;
      |       ^
a.cc:6:7: note: previous declaration as 'int a [3]'
    6 |   int a[3];
      |       ^
Language: C++

#include<iostream>
2
3 using namespace std;
4
5 int main(){
6 string n;
7 cin >> n;
8 for(char c:n){
9 if(c == ’1’){
10 cout << 9;
11 }else{
12 cout << 1;
13 }
14 }
15 return 0;
16 }

Compiler output:
a.cc:9:11: error: extended character ’ is not valid in an identifier
    9 | 9 if(c == ’1’){
      |           ^
a.cc:9:11: error: extended character ’ is not valid in an identifier
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2
      | ^
a.cc:4:1: error: expected unqualified-id before numeric constant
    4 | 4
      | ^
Language: C++

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

int main()
{
    string s;
    cin>>s;
    for(int i=0;i<s.length();i++){
        if(s[i]=='1') s[i]=='9';
        else if(s[i=='9]') s[i]=='1';
    }
    cout<<s;
    
}


Compiler output:
a.cc:10:22: warning: multi-character character constant [-Wmultichar]
   10 |         else if(s[i=='9]') s[i]=='1';
      |                      ^~~~
a.cc: In function 'int main()':
a.cc:10:26: error: expected ']' before ')' token
   10 |         else if(s[i=='9]') s[i]=='1';
      |                          ^
      |                          ]
Language: Java

import java.util.*;
class Main
{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String n=sc.next();
		StringBuffer sb = new StringBuffer();
		int len=n.length();
		for(int i=0;i<len;i++)
		{
			if(s.charAt(i)=='1')
				sb.append('9');
			else if(s.charAt(i)=='9')
				sb.append('1');
			else
				sb.append(s.charAt(i));
		}
		System.out.println(sb);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
			if(s.charAt(i)=='1')
			   ^
  symbol:   variable s
  location: class Main
Main.java:13: error: cannot find symbol
			else if(s.charAt(i)=='9')
			        ^
  symbol:   variable s
  location: class Main
Main.java:16: error: cannot find symbol
				sb.append(s.charAt(i));
				          ^
  symbol:   variable s
  location: class Main
3 errors
Language: C++

#include<iostream>
using namespace std;

int N;

int main()
{
	cin >> N;
	cout << 111+999-n<<endl;
	
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:25: error: 'n' was not declared in this scope
    9 |         cout << 111+999-n<<endl;
      |                         ^
Language: C++

#include<bits/stdc++.h>
#define ll long long
#define rep(i,n) for((ll)i=0;i<(ll)(n);i++)
using namespace std;
int main(){
  string s;
  cin>>s;
	rep(i,3)cout<<((s[i]=='1')?"9":"1");
  cout<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: 'i' was not declared in this scope
    8 |         rep(i,3)cout<<((s[i]=='1')?"9":"1");
      |             ^
a.cc:3:26: note: in definition of macro 'rep'
    3 | #define rep(i,n) for((ll)i=0;i<(ll)(n);i++)
      |                          ^
Language: C++

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

int main()
{
    int nb;
    cin >> nb;
    if((nb % 111) = 0)
    {
        cout << nb;
    }
    else
    {
        nb = nb / 100;
        nb = nb * 111;
        cout << nb;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: lvalue required as left operand of assignment
    8 |     if((nb % 111) = 0)
      |        ~~~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main{
int n;
cin >> n;
cout << 1110-n <<endl;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main{
      |     ^~~~
a.cc:4:1: error: expected primary-expression before 'int'
    4 | int n;
      | ^~~
a.cc:4:1: error: expected '}' before 'int'
a.cc:3:9: note: to match this '{'
    3 | int main{
      |         ^
a.cc:5:1: error: 'cin' does not name a type
    5 | cin >> n;
      | ^~~
a.cc:6:1: error: 'cout' does not name a type
    6 | cout << 1110-n <<endl;
      | ^~~~
a.cc:7:1: error: expected declaration before '}' token
    7 | }
      | ^
Language: C++

#include<bits.stdc++.h>
using namespace std;
int main{
	int n;
	cin >> n;
	cout << 1110-n <<endl;
	}

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

#include<bits.stdc++.h>
using namespace std;
int main{
int n;
cin >> n;
cout << 1110-n <<endl;
}


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

#include<stdio.h>

int main(void)
{
	char n[4];
	int i;
	
	scanf("%s", n);

	for(i=0;i<3;++i){

	if(n[i]=='1'){
	n[i]='9';}
	else if(n[i]=='9'){
	n[i]='1';
	}
	
	printf("%s",n);
	return 0;
}


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

#include<stdio.h>
#include<string.h>

int main(void)
{
	char str[8];

	scanf("%s", str);

	if(str[0]==1){
	char a[]=9;
	}else{
	
	if(str[0]==9){
	char a[]=1;
	}else{
	
	char a[]=str[0];
	}}

	
	if(str[1]==1){
	char b[]=9;
	}else
	
	if(str[1]==9){
	char b[]=1;
	}else{
	
	char b[]=str[1];
	}};


	if(str[2]==1){
	char c[]=9;
	}else{
	
	if(str[2]==9){
	char c[]=1;
	}else{
	
	char c[]=str[2];
	}};

	printf("%s%s%s",a,b,c);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:18: error: invalid initializer
   11 |         char a[]=9;
      |                  ^
main.c:15:18: error: invalid initializer
   15 |         char a[]=1;
      |                  ^
main.c:18:18: error: invalid initializer
   18 |         char a[]=str[0];
      |                  ^~~
main.c:23:18: error: invalid initializer
   23 |         char b[]=9;
      |                  ^
main.c:27:18: error: invalid initializer
   27 |         char b[]=1;
      |                  ^
main.c:30:18: error: invalid initializer
   30 |         char b[]=str[1];
      |                  ^~~
main.c: At top level:
main.c:34:9: error: expected identifier or '(' before 'if'
   34 |         if(str[2]==1){
      |         ^~
main.c:36:10: error: expected identifier or '(' before 'else'
   36 |         }else{
      |          ^~~~
main.c:45:16: error: expected declaration specifiers or '...' before string constant
   45 |         printf("%s%s%s",a,b,c);
      |                ^~~~~~~~
main.c:45:25: error: unknown type name 'a'
   45 |         printf("%s%s%s",a,b,c);
      |                         ^
main.c:45:27: error: unknown type name 'b'
   45 |         printf("%s%s%s",a,b,c);
      |                           ^
main.c:45:29: error: unknown type name 'c'
   45 |         printf("%s%s%s",a,b,c);
      |                             ^
main.c:46:9: error: expected identifier or '(' before 'return'
   46 |         return 0;
      |         ^~~~~~
main.c:47:1: error: expected identifier or '(' before '}' token
   47 | }
      | ^
Language: C++

#include <iostream>
#include <algorithm>
#include <cmath>
#include <limits>
#include <vector>
#include <cstdio>
#include <bits/stdc++.h>
#include <set>
#include <map>
#include <stdio.h>
#include <stack>
#include <queue>
#include <deque>
#include <numeric>
#include<bits/stdc++.h>
#include <utility>

#define ALL(obj) (obj).begin(), (obj).end()
#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a); (b) <= i; i--)
#define REP(i,n) for(int i = 0; i < (n); i++)
#define RREP(i,n) for(int i = n; n <= i; i--)
#define ABS(a) ((a < 0) ? ((-1)*(a)) : (a))
#define elif else if
#define MOD 1000000007
#define INF (1<<29)

using namespace std;
using ll = long long;
map <int ,int> mpa,mpb;
typedef pair<ll, ll> P;
priority_queue<P, vector<P>, greater<P>> pque;

int main(){
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  string N;
  cin >> N;
  n=N.size();
  for(int i=0;i<n;i++){
    if(N[i]=='1') cout << '9';
    else cout << '1';
  }
  cout << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:3: error: 'n' was not declared in this scope
   39 |   n=N.size();
      |   ^
Language: C++

const int N = 100005;

int v[N], n;
int cnt[N][2];

int a[N], b[N];

int main(){

    scanf("%d", &n);

    for(int i = 0; i < n; i++) scanf("%d", v+i);

    for(int i = 0; i < n; i++)
        cnt[ v[i] ][i % 2]++;

    for(int i = 0; i < N; i++) a[i] = b[i] = i;
    sort(a, a+N, [](int q, int w){
        return cnt[q][0] > cnt[w][0];
    });
    
    sort(b, b+N, [](int q, int w){
        return cnt[q][1] > cnt[w][1];
    });

    if(a[0] != b[0]){
        printf("%d\n", n - (cnt[ a[0] ][0] + cnt[ b[0] ][1]));
    }
    else{
        int ans = n;
        ans = min(ans, n - (cnt[ a[1] ][0] + cnt[ b[0] ][1]));
        ans = min(ans, n - (cnt[ a[0] ][0] + cnt[ b[1] ][1]));
        printf("%d\n", ans);
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'scanf' was not declared in this scope
   10 |     scanf("%d", &n);
      |     ^~~~~
a.cc:18:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   18 |     sort(a, a+N, [](int q, int w){
      |     ^~~~
      |     short
a.cc:27:9: error: 'printf' was not declared in this scope
   27 |         printf("%d\n", n - (cnt[ a[0] ][0] + cnt[ b[0] ][1]));
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | const int N = 100005;
a.cc:31:15: error: 'min' was not declared in this scope; did you mean 'main'?
   31 |         ans = min(ans, n - (cnt[ a[1] ][0] + cnt[ b[0] ][1]));
      |               ^~~
      |               main
a.cc:33:9: error: 'printf' was not declared in this scope
   33 |         printf("%d\n", ans);
      |         ^~~~~~
a.cc:33:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
#define LLINF 9223372036854775807
#define MOD ll(1e9+7)

int main(){
    int n;
    cin >> n;
    string s = to_string(n);
    for(int i = 0; i < s.size(); i++){
        if(s[i]=='9'){cout << "1";}
        else{cout << "9"}
    }
    cout << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:25: error: expected ';' before '}' token
   15 |         else{cout << "9"}
      |                         ^
      |                         ;
Language: C++

#include <stdio.h>
 #include<string.h>
int main()
{
   int i;
  char k[100];
  gets(k);
  for(i=0;i<strlen(k);i++)
  {
      printf("%c",(k[i]=='9')?'1':'9');
  }
 
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |   gets(k);
      |   ^~~~
      |   getw
Language: C++

#include <stdio.h>

int main()
{
   int i;
  char k[100];
  gets(k);
  for(i=0;i<strlen(k);i++)
  {
      printf("%c",(k[i]=='9')?'1':'9');
  }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |   gets(k);
      |   ^~~~
      |   getw
a.cc:8:13: error: 'strlen' was not declared in this scope
    8 |   for(i=0;i<strlen(k);i++)
      |             ^~~~~~
a.cc:2:1: note: 'strlen' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Atcoder111B {
    public static void main(String[] args) throws Exception {
        BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
        char[] digits = input.readLine().toCharArray();
        int value  = Integer.parseInt(digits[0] + "");
        if (digits[0] >= digits[1] && digits[0] >= digits[2]) {
            System.out.println(value + "" + value + "" + value);
        }else{
            value++;
            System.out.println(value + "" + value + "" + value);
        }
    }
}


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