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

#include <iostream>
using namespace std;

int rev(int dig, int num)
{
  if(num==1)
    return pow(10, dig)*9;
  else if(num==9)
    return pow(10, dig);
  else
    return pow(10, dig)*num;
}

int main(){
  int a;
  cin >> a;
  int dig[3];
  dig[0]=a%100;
  a/=10;
  dig[1]=a%10;
  a/=10;
  dig[2]=a;
  
  ans+=rev(0,dig[0]);
  ans+=rev(1,dig[1]);
  ans+=rev(2,dig[2]);
  cout << ans << '\n';
  
  
}

Compiler output:
a.cc: In function 'int rev(int, int)':
a.cc:7:12: error: 'pow' was not declared in this scope
    7 |     return pow(10, dig)*9;
      |            ^~~
a.cc:9:12: error: 'pow' was not declared in this scope
    9 |     return pow(10, dig);
      |            ^~~
a.cc:11:12: error: 'pow' was not declared in this scope
   11 |     return pow(10, dig)*num;
      |            ^~~
a.cc: In function 'int main()':
a.cc:24:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
   24 |   ans+=rev(0,dig[0]);
      |   ^~~
      |   abs
Language: C

#include <stdio.h>
int main(){
    int n;
    int c[3];
    scanf("%d",&n);
    c[0] = n%10;
    c[1] = (n/10)%10;
    c[2]= (n/100)%10;
      printf("%d\n",100*c[2]+10*c[1]+c[0]);
    for(int i = 0; i<3;i++){
        switch (c[i]){
        case 1:
            c[i] = 9;break;
        case 9:
            c[i] = 1;break;
        default:
            break;
        }
        }
    printf("%d\n",100*c[2]+10*c[1]+c[0);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:20:39: error: expected ']' before ')' token
   20 |     printf("%d\n",100*c[2]+10*c[1]+c[0);
      |                                       ^
      |                                       ]
Language: C

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

int main(void){
  int n;
  char s[100];
  
  scanf("%d",&n);
  
  itoa(n,s,10);
  
  for(int i=0;i<strlen(s);i++){
    if(s[i]=='1'){
      s[i]='9';
    }else if(s[i]=='9'){
      s[i]=='1';
    }
  }
  printf("%s\n",s);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:11:3: error: implicit declaration of function 'itoa' [-Wimplicit-function-declaration]
   11 |   itoa(n,s,10);
      |   ^~~~
Language: C

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

int main(void){
  int n;
  char s[100];
  
  scanf("%d",&n);
  
  s = (char)n;
  
  for(int i=0;i<strlen(s);i++){
    if(s[i]=='1'){
      s[i]='9';
    }else if(s[i]=='9'){
      s[i]=='1';
    }
  }
  printf("%s\n",s);
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: assignment to expression with array type
   10 |   s = (char)n;
      |     ^
Language: C++

#include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
#include<cmath>
#define inf 10000000
using namespace std;
typedef long long int ll;

int main(){

    int i;
    string n;
    cin >> n;

    for(i=0 ; i<3 ; i++){
        if(n[i] == "1"){
            n[i] = "9";
        }else if(n[i] == "9"){
            n[i] = "1";
        }
    }

    cout << n << endl;
    
}


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

#include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<algorithm>
#include<cmath>
#define inf 10000000
using namespace std;
typedef long long int ll;

int main(){

    string n;
    cin >> n;

    for(i=0 ; i<3 ; i++){
        if(n[i] == "1"){
            n[i] = "9";
        }else if(n[i] == "9"){
            n[i] = "1";
        }
    }

    cout << n << endl;
    
}

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

for i in input():
    if i == '9':
        print('1',end='')
    else:
        print('9',end='')
print()

Compiler output:
a.cc:3:23: error: empty character constant
    3 |         print('1',end='')
      |                       ^~
a.cc:5:23: error: empty character constant
    5 |         print('9',end='')
      |                       ^~
a.cc:1:1: error: expected unqualified-id before 'for'
    1 | for i in input():
      | ^~~
Language: C++

if __name__ == '__main__':
    n = str(raw_input())
    ans = ''
    for ch in n:
        if ch == '1':
            ans += '9'
        else:
            ans += '1'
    print ans


Compiler output:
a.cc:1:16: warning: multi-character literal with 8 characters exceeds 'int' size of 4 bytes
    1 | if __name__ == '__main__':
      |                ^~~~~~~~~~
a.cc:3:11: error: empty character constant
    3 |     ans = ''
      |           ^~
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if __name__ == '__main__':
      | ^~
Language: C++

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

int main() {
  string str;
  cin >> str;

  int count = 0;
  for (int i = 0; i < str.size(); i++) {
    if (str.at(i) == '1') {
      cout << '9'; 
    }
    else {
     cout <<  ='1';
    }
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:15: error: expected primary-expression before '=' token
   14 |      cout <<  ='1';
      |               ^
Language: C

#include <iostream>
#include <string>
using namespace std;
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define END return EXIT_SUCCESS;
#define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I))
#define ALL(C) (C).begin(),(C).end()
#define INPUT(P) cin>>(P);
#define INPUT2(P1,P2) cin>>(P1)>>(P2);
#define INPUT3(P1,P2,P3) cin>>(P1)>>(P2)>>(P3);
#define INPUTS(I,A,B,V) FOR(I,A,B)cin>>V[I];
#define OUTPUT(P) cout<<P<<endl;
#define OUTPUTS(I,A,B,V) FOR(I,A,B)cout<<V[i]<<endl;
typedef long long ll;
const double INF = 1e9;
inline void solve()
{
  int n;
  cin>>n;
  string string_n = to_string(n);
  replace(ALL(string_n), '1', 'X');
  replace(ALL(string_n), '9', '1');
  replace(ALL(string_n), 'X', '9');
  cout<<string_n<<endl;
}
int main(int argc,char**argv)
{
  BEGIN
  solve();
  END
}


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

#include <iostream>
#include <string>
using namespace std;
#define BEGIN ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define END return EXIT_SUCCESS;
#define FOR(I,A,B) for(int (I)=(A);(I)<(B);++(I))
#define ALL(C) (C).begin(),(C).end()
#define INPUT(P) cin>>(P);
#define INPUT2(P1,P2) cin>>(P1)>>(P2);
#define INPUT3(P1,P2,P3) cin>>(P1)>>(P2)>>(P3);
#define INPUTS(I,A,B,V) FOR(I,A,B)cin>>V[I];
#define OUTPUT(P) cout<<P<<endl;
#define OUTPUTS(I,A,B,V) FOR(I,A,B)cout<<V[i]<<endl;
typedef long long ll;
const double INF = 1e9;
inline void solve()
{
  int n;
  cin>>n;
  string string_n = to_string(n);
  replace(ALL(string_n), '1', 'X');
  replace(ALL(string_n), '9', '1');
  replace(ALL(string_n), 'X', '9');
  cout<<string_n<<endl;
}
int main(int argc,char**argv)
{
  BEGIN
  solve();
  END
}


Compiler output:
a.cc: In function 'void solve()':
a.cc:21:3: error: 'replace' was not declared in this scope
   21 |   replace(ALL(string_n), '1', 'X');
      |   ^~~~~~~
Language: C

#include<stdio.h>
int main(void){
  char s[2];
  int i;
  scanf("%s",s);
  for(i=0;i<3;i++)
    switch(s[i]-'0'){
      case 1:
        s[i]='9';
        break;
      case 9:
        s[i]='1'
          break;}
  printf("%s\n",s);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:17: error: expected ';' before 'break'
   12 |         s[i]='1'
      |                 ^
      |                 ;
   13 |           break;}
      |           ~~~~~
Language: C++

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

int main(int argc,char*argv[]){
int n;
cin >> n;

for(int i = 1;i < 10;i++)
if(n <= 111*i){
cout << 111*i << endl;
break;
}
return 0;
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:9:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 | cin >> n;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout << 111*i << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout << 111*i << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

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

for(int i = 1;i < 10;i++)
if(n <= 111*i){
cout << 111*i << endl;
break;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 | cin >> n;
      | ^~~
      | std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 | cout << 111*i << endl;
      | ^~~~
      | std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 | cout << 111*i << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<vecter>
#include<string>
#include<algorithm>
#include<cmath>

int main(int argc,char *argv[]){
int n;
cin >> n;

for(int i = 1;i < 10;i++)
if(n <= 111*i){
cout << 111*i << endl;
break;
}
return 0;
}

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

#include<stdio.h>
int main (void){
int a;

scanf("%d", &a );

printf("%d", 1=>9,9=>1)








return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:16: error: expected expression before '>' token
    7 | printf("%d", 1=>9,9=>1)
      |                ^
main.c:7:24: error: expected ';' before 'return'
    7 | printf("%d", 1=>9,9=>1)
      |                        ^
      |                        ;
......
   16 | return 0;
      | ~~~~~~
Language: C++

#include<stdio.h>
int main (void){
int a;

scanf("%d", &a );

printf("%d", 1=>9,9=>1)








return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: expected primary-expression before '>' token
    7 | printf("%d", 1=>9,9=>1)
      |                ^
a.cc:7:21: error: expected primary-expression before '>' token
    7 | printf("%d", 1=>9,9=>1)
      |                     ^
Language: C++

n = input()
l=len(n)
s1=str(n[0]*l)
s2=""
if n[0]=='9':
    s2="1"*(l+1)
else:
    s2=str(int(n[0])+1)*l

if n<=s1:
    print(s1)
else:
    print(s2)

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

n = list(input())

ans = ''
for i in n:
	if i=='9':
		ans+='1'
	elif i=='1':
		ans+='9'
	else:
		ans+=i

print(ans)

Compiler output:
a.cc:3:7: error: empty character constant
    3 | ans = ''
      |       ^~
a.cc:1:1: error: 'n' does not name a type
    1 | n = list(input())
      | ^
Language: C++

package main

import(
      "fmt"
)

func main(){
  var n int
  fmt.Scan(&n)
  fmt.Println(1110-n)
}

//====  ↓↓↓ template functions ↓↓↓  ======================

func min(a, b int) int{
  if a < b {
    return a
  }
  return b
}

func max(a, b int) int{
  if a > b {
    return a
  }
  return b
}

func abs(x int) int{
  if x < 0 {
    return -x
  }
  return x
}

func gcd(a, b int) int{
  if b == 0 {
    return a
  }else{
    return gcd(b, a%b)
  }
}

func lcm(a, b int) int{
  return a*b/gcd(a, b);
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:15:1: error: 'func' does not name a type
   15 | func min(a, b int) int{
      | ^~~~
a.cc:22:1: error: 'func' does not name a type
   22 | func max(a, b int) int{
      | ^~~~
a.cc:29:1: error: 'func' does not name a type
   29 | func abs(x int) int{
      | ^~~~
a.cc:36:1: error: 'func' does not name a type
   36 | func gcd(a, b int) int{
      | ^~~~
a.cc:44:1: error: 'func' does not name a type
   44 | func lcm(a, b int) int{
      | ^~~~
Language: C++

#include <iostream>

using namespace std;

int main(){
    string inp;
    cin >> inp;

    replace(inp.begin(), inp.end(), '1', '*');
    replace(inp.begin(), inp.end(), '9', '1');
    replace(inp.begin(), inp.end(), '*', '9');

    cout << inp << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'replace' was not declared in this scope
    9 |     replace(inp.begin(), inp.end(), '1', '*');
      |     ^~~~~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'strintg' was not declared in this scope; did you mean 'sprintf'?
    7 |   strintg s; cin>>s;
      |   ^~~~~~~
      |   sprintf
a.cc:7:19: error: 's' was not declared in this scope
    7 |   strintg s; cin>>s;
      |                   ^
Language: C++

#include <iostream>

int main()
{
	string n;
  	std::cin >> n;
  	for(int i = 0; i < 3; i++){
      if(n.at(i) == '1'){
        n.at(i) = '9';
      }else{
        n.at(i) = '1';
      }
    }
  	std::cout << n;
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string n;
      |         ^~~~~~
a.cc:5:9: 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:6:21: error: 'n' was not declared in this scope
    6 |         std::cin >> n;
      |                     ^
Language: C++

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

int main () {
  int N;
  cin >> N;
  if ( N.at(1) == 1 ) N.at(1) = 9;
  if ( N.at(1) == 9 ) N.at(1) = 1;
  if ( N.at(2) == 1 ) N.at(2) = 9;
  if ( N.at(2) == 9 ) N.at(2) = 1;
  if ( N.at(3) == 1 ) N.at(3) = 9;
  if ( N.at(3) == 9 ) N.at(3) = 1;
  cout << N << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if ( N.at(1) == 1 ) N.at(1) = 9;
      |          ^~
a.cc:7:25: error: request for member 'at' in 'N', which is of non-class type 'int'
    7 |   if ( N.at(1) == 1 ) N.at(1) = 9;
      |                         ^~
a.cc:8:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |   if ( N.at(1) == 9 ) N.at(1) = 1;
      |          ^~
a.cc:8:25: error: request for member 'at' in 'N', which is of non-class type 'int'
    8 |   if ( N.at(1) == 9 ) N.at(1) = 1;
      |                         ^~
a.cc:9:10: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   if ( N.at(2) == 1 ) N.at(2) = 9;
      |          ^~
a.cc:9:25: error: request for member 'at' in 'N', which is of non-class type 'int'
    9 |   if ( N.at(2) == 1 ) N.at(2) = 9;
      |                         ^~
a.cc:10:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   10 |   if ( N.at(2) == 9 ) N.at(2) = 1;
      |          ^~
a.cc:10:25: error: request for member 'at' in 'N', which is of non-class type 'int'
   10 |   if ( N.at(2) == 9 ) N.at(2) = 1;
      |                         ^~
a.cc:11:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   11 |   if ( N.at(3) == 1 ) N.at(3) = 9;
      |          ^~
a.cc:11:25: error: request for member 'at' in 'N', which is of non-class type 'int'
   11 |   if ( N.at(3) == 1 ) N.at(3) = 9;
      |                         ^~
a.cc:12:10: error: request for member 'at' in 'N', which is of non-class type 'int'
   12 |   if ( N.at(3) == 9 ) N.at(3) = 1;
      |          ^~
a.cc:12:25: error: request for member 'at' in 'N', which is of non-class type 'int'
   12 |   if ( N.at(3) == 9 ) N.at(3) = 1;
      |                         ^~
Language: C++

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

using namespace std;
int main(){
    string n;
    cin >> n;

    for(int i = 0,i < 3;i++){
        if(n[i] == '1')
            n[i] = '9';
        if(n[i] == '9')
            n[i] = '1';
    }

    cout << n << endl;
  
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: expected ';' before '<' token
   11 |     for(int i = 0,i < 3;i++){
      |                    ^~
      |                    ;
a.cc:11:21: error: expected primary-expression before '<' token
   11 |     for(int i = 0,i < 3;i++){
      |                     ^
Language: C++

import java.util.Scanner;

public class Main {

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

		String input = scan.nextLine();
		String replace = "";
		String m;
		for(int i=0; i<input.length(); i++) {
			if(input.charAt(i) == '1') {
				m = "9";
			} else {
				m = "1";
			}
			replace = replace+m;
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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++

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

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


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

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

int main() 
{
  string s;
  for(int i=0;i<3;i++)
  {
    int s.at(i);cin>>s.at(i);
    if(s.at(i)==1)
    {
      s.at(i)=9;
    }
     if(s.at(i)==9)
    {
      s.at(i)=1;
    }
  }
  cout<<s;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected initializer before '.' token
    9 |     int s.at(i);cin>>s.at(i);
      |          ^
Language: C++

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

int main() 
{
  int n;
  for(int i=0;i<3;i++)
  {
    int n.at(i);cin>>n.at(i);
    if(n.at(i)==1)
    {
      n.at(i)=9;
    }
     if(n.at(i)==9)
    {
      n.at(i)=1;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: expected initializer before '.' token
    9 |     int n.at(i);cin>>n.at(i);
      |          ^
a.cc:9:24: error: request for member 'at' in 'n', which is of non-class type 'int'
    9 |     int n.at(i);cin>>n.at(i);
      |                        ^~
a.cc:10:10: error: request for member 'at' in 'n', which is of non-class type 'int'
   10 |     if(n.at(i)==1)
      |          ^~
a.cc:12:9: error: request for member 'at' in 'n', which is of non-class type 'int'
   12 |       n.at(i)=9;
      |         ^~
a.cc:14:11: error: request for member 'at' in 'n', which is of non-class type 'int'
   14 |      if(n.at(i)==9)
      |           ^~
a.cc:16:9: error: request for member 'at' in 'n', which is of non-class type 'int'
   16 |       n.at(i)=1;
      |         ^~
Language: C++

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

int main() 
{
  for(int i=0;i<3;i++)
  {
    int n.at(i);cin>>n.at(i);
    if(n.at(i)==1)
    {
      n.at(i)=9;
    }
     if(n.at(i)==9)
    {
      n.at(i)=1;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected initializer before '.' token
    8 |     int n.at(i);cin>>n.at(i);
      |          ^
a.cc:8:22: error: 'n' was not declared in this scope
    8 |     int n.at(i);cin>>n.at(i);
      |                      ^
Language: Java

import java.util.*;
import static java.lang.Math.*;

public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String n = sc.next();
		char[] chars = n.toCharArray();
		for (int i=0; i<chars.length;i++) {
			if (chars[i] == '1') chars[i] = '9';
			if (chars[i] == '9') chars[i] = '1';
		}
		System.out.println(new String(chars))
	}
}

Compiler output:
Main.java:13: error: ';' expected
		System.out.println(new String(chars))
		                                     ^
1 error
Language: C++

#include<iostream>
using namespace std;

int main(){
  int n,result; cin >> n;
  int i,a;

  result = 0;
  for ( i = 0; i<3;i++){
    a = n / (10**i);
    if ( a == 1 ){
      result += 9 * (10**i);
    }
    else if(a == 9){
      result += 1 * (10**i);
    }
    else{
      result += a * (10**i);
    }
  }
  cout << result << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: invalid type argument of unary '*' (have 'int')
   10 |     a = n / (10**i);
      |                 ^~
a.cc:12:25: error: invalid type argument of unary '*' (have 'int')
   12 |       result += 9 * (10**i);
      |                         ^~
a.cc:15:25: error: invalid type argument of unary '*' (have 'int')
   15 |       result += 1 * (10**i);
      |                         ^~
a.cc:18:25: error: invalid type argument of unary '*' (have 'int')
   18 |       result += a * (10**i);
      |                         ^~
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 n3 = n%10;
	     int n2 = n/10%10;
	     int n1 = n/100;

	     Switch(n1){
	     	case 1:
	     	n1 = 9;
	     	break;
	     	case 9:
	     	n1 = 1;
	     	break;
	     }

	     Switch(n2){
	     	case 1:
	     	n2 = 9;
	     	break;
	     	case 9:
	     	n2 = 1;
	     	break;
	     }

	     Switch(n3){
	     	case 1:
	     	n3 = 9;
	     	break;
	     	case 9:
	     	n3 = 1;
	     	break;
	     }

	     System.out.println(100*n1 + 10*n2 + n3);
	}
}

Compiler output:
Main.java:12: error: ';' expected
	     Switch(n1){
	               ^
Main.java:13: error: orphaned case
	     	case 1:
	     	^
Main.java:21: error: ';' expected
	     Switch(n2){
	               ^
Main.java:22: error: orphaned case
	     	case 1:
	     	^
Main.java:30: error: ';' expected
	     Switch(n3){
	               ^
Main.java:31: error: orphaned case
	     	case 1:
	     	^
6 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 n3 = n%10;
	     int n2 = n/10%10;
	     int n1 = n/100;

	     Switch(n1){
	     	case 1;
	     	n1 = 9;
	     	break;
	     	case 9;
	     	n1 = 1;
	     	break;
	     }

	     Switch(n2){
	     	case 1;
	     	n2 = 9;
	     	break;
	     	case 9;
	     	n2 = 1;
	     	break;
	     }

	     Switch(n3){
	     	case 1;
	     	n3 = 9;
	     	break;
	     	case 9;
	     	n3 = 1;
	     	break;
	     }

	     System.out.println(100*n1 + 10*n2 + n3);
	}
}

Compiler output:
Main.java:12: error: ';' expected
	     Switch(n1){
	               ^
Main.java:13: error: orphaned case
	     	case 1;
	     	^
Main.java:13: error: : or -> expected
	     	case 1;
	     	      ^
Main.java:16: error: : or -> expected
	     	case 9;
	     	      ^
Main.java:21: error: ';' expected
	     Switch(n2){
	               ^
Main.java:22: error: orphaned case
	     	case 1;
	     	^
Main.java:22: error: : or -> expected
	     	case 1;
	     	      ^
Main.java:25: error: : or -> expected
	     	case 9;
	     	      ^
Main.java:30: error: ';' expected
	     Switch(n3){
	               ^
Main.java:31: error: orphaned case
	     	case 1;
	     	^
Main.java:31: error: : or -> expected
	     	case 1;
	     	      ^
Main.java:34: error: : or -> expected
	     	case 9;
	     	      ^
12 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 n3 = n%10;
	     int n2 = n/10%10;
	     int n1 = n/100;

	     Switch(n1){
	     	case 1;
	     	n1 = 9;
	     	break;
	     	case 9;
	     	n1 = 9;
	     	break;
	     }

	     Switch(n2){
	     	case 1;
	     	n2 = 9;
	     	break;
	     	case 9;
	     	n2 = 1;
	     	break;
	     }

	     Switch(n3){
	     	case 1;
	     	n3 = 9;
	     	break;
	     	case 9;
	     	n3 = 1;
	     	break;
	     }

	     System.out.println(100*n1 + 10*n2 + n3);
	}
}

Compiler output:
Main.java:12: error: ';' expected
	     Switch(n1){
	               ^
Main.java:13: error: orphaned case
	     	case 1;
	     	^
Main.java:13: error: : or -> expected
	     	case 1;
	     	      ^
Main.java:16: error: : or -> expected
	     	case 9;
	     	      ^
Main.java:21: error: ';' expected
	     Switch(n2){
	               ^
Main.java:22: error: orphaned case
	     	case 1;
	     	^
Main.java:22: error: : or -> expected
	     	case 1;
	     	      ^
Main.java:25: error: : or -> expected
	     	case 9;
	     	      ^
Main.java:30: error: ';' expected
	     Switch(n3){
	               ^
Main.java:31: error: orphaned case
	     	case 1;
	     	^
Main.java:31: error: : or -> expected
	     	case 1;
	     	      ^
Main.java:34: error: : or -> expected
	     	case 9;
	     	      ^
12 errors
Language: C++

import java.util.*;
class Main {
  public static void main (String[] args) {
    
    Scanner scan = new Scanner (System.in);
    
    int x = scan.nextInt();
    String str = String.valueOf(x);
    
    if (str.charAt(0)=='1'){
      x = x + 800;
      }else{
        x = x -800;
        }
        
       System.out.println(x);
       
      
        if (str.charAt(1)=='1'){
      x = x + 80;
      }else{
        x = x -80;
        }
        
        System.out.println(x);
     
          if (str.charAt(2)=='1'){
      x = x + 8;
      }else{
        x = x -8;
        }
    
    System.out.println(x);
}
}


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:9: error: expected ':' before 'static'
    3 |   public static void main (String[] args) {
      |         ^~~~~~~
      |         :
a.cc:3:28: error: 'String' has not been declared
    3 |   public static void main (String[] args) {
      |                            ^~~~~~
a.cc:3:37: error: expected ',' or '...' before 'args'
    3 |   public static void main (String[] args) {
      |                                     ^~~~
a.cc:35:2: error: expected ';' after class definition
   35 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:5: error: 'Scanner' was not declared in this scope
    5 |     Scanner scan = new Scanner (System.in);
      |     ^~~~~~~
a.cc:7:13: error: 'scan' was not declared in this scope
    7 |     int x = scan.nextInt();
      |             ^~~~
a.cc:8:5: error: 'String' was not declared in this scope
    8 |     String str = String.valueOf(x);
      |     ^~~~~~
a.cc:10:9: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |     if (str.charAt(0)=='1'){
      |         ^~~
      |         std
a.cc:16:8: error: 'System' was not declared in this scope
   16 |        System.out.println(x);
      |        ^~~~~~
a.cc:19:13: error: 'str' was not declared in this scope; did you mean 'std'?
   19 |         if (str.charAt(1)=='1'){
      |             ^~~
      |             std
a.cc:27:15: error: 'str' was not declared in this scope; did you mean 'std'?
   27 |           if (str.charAt(2)=='1'){
      |               ^~~
      |               std
Language: Java

import java.util.*;
class Main {
  public static void main (String[] args) {
    
    Scanner scan = new Scanner (System.in);
    
    int x = scan.nextInt();
    String str = String.valueOf(x);
    
    if (str.charAt(0)==1){
      x = x + 800;
      }else{
        x = x -800;
        }
      
        if (str.charAt(1)==1){
      x = x + 80;
      }else{
        x = x -80;
        }
        
          if (str.charAt(2)==1){
      x = x + 8;
      }else{
        x = x -8;
        }
    
    return x;
}
}

Compiler output:
Main.java:28: error: incompatible types: unexpected return value
    return x;
           ^
1 error
Language: Java

import java.util.*;
class Main {
  public static void main (String[] args) {
    
    Scanner scan = new Scanner (System.in);
    
    int x = scan.nextInt();
    String str = x.toString();
    
    if (str.charAt(0)==1){
      x = x + 800;
      }else{
        x = x -800;
        }
      
        if (str.charAt(1)==1){
      x = x + 80;
      }else{
        x = x -80;
        }
        
          if (str.charAt(2)==1){
      x = x + 8;
      }else{
        x = x -8;
        }
    
    return x;
}
}

Compiler output:
Main.java:8: error: int cannot be dereferenced
    String str = x.toString();
                  ^
Main.java:28: error: incompatible types: unexpected return value
    return x;
           ^
2 errors
Language: C++

import java.util.*;
class Main {
  public static void main (String[] args) {
    
    Scanner scan = new Scanner (System.in);
    
    int x = scan.nextInt();
    String str = x.toString();
    
    if (str.charAt(0)==1){
      x = x + 800;
      }else{
        x = x -800;
        }
      
        if (str.charAt(1)==1){
      x = x + 80;
      }else{
        x = x -80;
        }
        
          if (str.charAt(2)==1){
      x = x + 8;
      }else{
        x = x -8;
        }
    
    return x;
}
}

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:9: error: expected ':' before 'static'
    3 |   public static void main (String[] args) {
      |         ^~~~~~~
      |         :
a.cc:3:28: error: 'String' has not been declared
    3 |   public static void main (String[] args) {
      |                            ^~~~~~
a.cc:3:37: error: expected ',' or '...' before 'args'
    3 |   public static void main (String[] args) {
      |                                     ^~~~
a.cc:30:2: error: expected ';' after class definition
   30 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:5: error: 'Scanner' was not declared in this scope
    5 |     Scanner scan = new Scanner (System.in);
      |     ^~~~~~~
a.cc:7:13: error: 'scan' was not declared in this scope
    7 |     int x = scan.nextInt();
      |             ^~~~
a.cc:8:5: error: 'String' was not declared in this scope
    8 |     String str = x.toString();
      |     ^~~~~~
a.cc:10:9: error: 'str' was not declared in this scope; did you mean 'std'?
   10 |     if (str.charAt(0)==1){
      |         ^~~
      |         std
a.cc:16:13: error: 'str' was not declared in this scope; did you mean 'std'?
   16 |         if (str.charAt(1)==1){
      |             ^~~
      |             std
a.cc:22:15: error: 'str' was not declared in this scope; did you mean 'std'?
   22 |           if (str.charAt(2)==1){
      |               ^~~
      |               std
a.cc:28:12: error: return-statement with a value, in function returning 'void' [-fpermissive]
   28 |     return x;
      |            ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: expected ',' before '[' token
    7 |     S[0]='9';
      |      ^
      |      ,
a.cc:7:6: error: expected identifier before '[' token
a.cc:7:13: error: expected ']' before ';' token
    7 |     S[0]='9';
      |             ^
      |             ]
a.cc: In lambda function:
a.cc:7:13: error: expected '{' before ';' token
a.cc: At global scope:
a.cc:8:4: error: expected unqualified-id before 'else'
    8 |   }else if(S[0]=='9')[
      |    ^~~~
a.cc:10:3: error: expected declaration before '}' token
   10 |   }
      |   ^
a.cc:11:3: error: expected unqualified-id before 'if'
   11 |   if(S[1]=='1')[
      |   ^~
a.cc:13:3: error: expected declaration before '}' token
   13 |   }else if(S[1]=='9')[
      |   ^
a.cc:13:4: error: expected unqualified-id before 'else'
   13 |   }else if(S[1]=='9')[
      |    ^~~~
a.cc:15:3: error: expected declaration before '}' token
   15 |   }
      |   ^
a.cc:16:3: error: expected unqualified-id before 'if'
   16 |   if(S[2]=='1')[
      |   ^~
a.cc:18:3: error: expected declaration before '}' token
   18 |   }else if(S[2]=='9')[
      |   ^
a.cc:18:4: error: expected unqualified-id before 'else'
   18 |   }else if(S[2]=='9')[
      |    ^~~~
a.cc:20:3: error: expected declaration before '}' token
   20 |   }
      |   ^
a.cc:21:3: error: 'cout' does not name a type
   21 |   cout<<S<<endl;
      |   ^~~~
a.cc:22:3: error: expected unqualified-id before 'return'
   22 |   return 0;
      |   ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: Java

package AtCoder;

import java.util.Scanner;

public class Atcoder {
	public static void main(String[] args){
		int i;
		int [] str = new int [3];
		int [] str2 = new int [3];

		Scanner sc = new Scanner(System.in);

		for(i = 0; i < 3; i++){
			str[i] = sc.nextInt();
			if(str[i] == 1){
				str2[i] = 9;
			} else {
				str2[i] = 1;
			}
		}

		for(i = 0; i < 3; i++){
			System.out.println(str2[i]);
		}

		sc.close();
	}
}


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

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'cout'
    6 |   cin>>n
      |         ^
      |         ;
    7 |     cout<<111+999-n<<endl;
      |     ~~~~
Language: C++

#include<iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected ';' before 'cout'
    6 |   cin>>n
      |         ^
      |         ;
    7 |     cout<<111+999-n<<endl;
      |     ~~~~ 
a.cc:8:4: error: expected '}' at end of input
    8 |   {
      |   ~^
a.cc:8:4: error: expected '}' at end of input
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C

#include <stdio.h>
int main(void){
    int N;
    scanf(“%d”,&N);
    printf("%d\n",(N-1)/111*111);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:11: error: stray '\342' in program
    4 |     scanf(<U+201C>%d<U+201D>,&N);
      |           ^~~~~~~~
main.c:4:12: error: expected expression before '%' token
    4 |     scanf(“%d”,&N);
      |            ^
main.c:4:14: error: stray '\342' in program
    4 |     scanf(<U+201C>%d<U+201D>,&N);
      |                     ^~~~~~~~
Language: C++

using System;

namespace aoj
{
    public class Program
    {
        public static void Main(string[] args)
        {
            string str = Console.ReadLine();
            string ans = "";
            for (int i = 0; i < str.Length; i++) 
            {
                ans += str[i] == '1' ? "9" : "1";
            }
            Console.WriteLine(ans);
        }
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:5:5: error: expected unqualified-id before 'public'
    5 |     public class Program
      |     ^~~~~~
Language: C++

#include <iostream>

#define ELEMENTS_MAX 99999
long long int N, counter_even[ELEMENTS_MAX], counter_odd[ELEMENTS_MAX];

int main(){
	for( int i=0; i<ELEMENTS_MAX; ++i ){ counter_even[i] = 0; counter__odd[i] = 0;}

	std::cin >> N;
	for( int v, i=0; i<N; ++i ){
		std::cin >> v;
		if( i % 2 ){
			counter_even[v]++;
		} else{
			counter_odd[v]++;
		}
	}

	int max_counted[2] = {0,0};
	for( int i=0; i<N; i++ ){
		if( counter_even[i] > max_counted[0] ){
			max_counted[0] = counter_even[i];
		}
		if( counter_odd[i] > max_counted[1] ){
			max_counted[1] = counter_odd[i];
		}
	}

	std::cout << (N-max_counted[0]) + (N-max_counted[1]) << std::endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:67: error: 'counter__odd' was not declared in this scope; did you mean 'counter_odd'?
    7 |         for( int i=0; i<ELEMENTS_MAX; ++i ){ counter_even[i] = 0; counter__odd[i] = 0;}
      |                                                                   ^~~~~~~~~~~~
      |                                                                   counter_odd
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;
}
}
}

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

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


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

import java.util.Scanner;

public class Problem1 {
    public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        StringBuffer n = new StringBuffer(scanner.next());
        for(int i = 0; i < n.length(); i++){
            switch (n.charAt(i)){
                case '1':
                    n.setCharAt(i, '9');
                    break;
                case '9':
                    n.setCharAt(i, '1');
                    break;
            }
        }
        System.out.println(n);
    }
}

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

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


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

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


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

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
    int a = 119;
    String data = String.valueOf(a);
    String answer = "";

    for (int i = 0; i < data.length(); i++) {
      String num = String.valueOf(data.charAt(i));
      int n = Integer.parseInt(num);
      if (n == 9) {
        answer += "1";
      } else {
        answer += "9";
      }
    }
    System.out.println(answer);
	}
}


Compiler output:
Main.java:6: error: variable a is already defined in method main(String[])
    int a = 119;
        ^
1 error
Language: C++

#include <bits/stdc++.h>
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:8:17: error: extended character ’ is not valid in an identifier
    8 |         if(c == ’1’){
      |                 ^
a.cc:8:17: error: extended character ’ is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:17: error: '\U000020191\U00002019' was not declared in this scope
    8 |         if(c == ’1’){
      |                 ^~~
a.cc: At global scope:
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>

using namespace std;

int main(void){
	int a,b,;
	
	cin >> a;
	if(a/100==9){
		if((a%100)/10==9){
			if(a%10==9){
				cout << 111 << endl;
			}
			else
			cout << 119 << endl;
		}
		else if(a%10==9){
		cout << 191 << endl;
		}
		else 
		cout << 199 << endl;
	}else if((a%100)/10==9){
		if(a%10==9){
			cout << 911 << endl;
		}else 
			cout << 919 << endl;
	}else if(a%10==9){
		cout << 991 << endl;
	}else
		cout << 999 << endl;
		
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: expected unqualified-id before ';' token
    6 |         int a,b,;
      |                 ^
Language: Java

class MyClass {


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

    for (char c:n){

        System.out.println (char) ('1' + '9' - c);
    }

    }

}

Compiler output:
Main.java:10: error: '.class' expected
        System.out.println (char) ('1' + '9' - c);
                                ^
Main.java:10: error: ';' expected
        System.out.println (char) ('1' + '9' - c);
                                 ^
Main.java:10: error: not a statement
        System.out.println (char) ('1' + '9' - c);
                                               ^
Main.java:10: error: ';' expected
        System.out.println (char) ('1' + '9' - c);
                                                ^
4 errors
Language: Java

public class MyClass {


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

    for (char c:n){
        System.out.println(char)('1' + '9' - c);
    }

    }

}

Compiler output:
Main.java:9: error: '.class' expected
        System.out.println(char)('1' + '9' - c);
                               ^
Main.java:9: error: ';' expected
        System.out.println(char)('1' + '9' - c);
                                ^
Main.java:9: error: not a statement
        System.out.println(char)('1' + '9' - c);
                                             ^
Main.java:9: error: ';' expected
        System.out.println(char)('1' + '9' - c);
                                              ^
4 errors
Language: Java

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

    for (char c:n){
        System.out.println(char)('1' + '9' - c);
    }

}

Compiler output:
Main.java:6: error: not a statement
        System.out.println(char)('1' + '9' - c);
                                             ^
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main (String [] args){
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:6: error: '.class' expected
        System.out.println(char)('1' + '9' - c);
                               ^
Main.java:6: error: ';' expected
        System.out.println(char)('1' + '9' - c);
                                ^
Main.java:6: error: ';' expected
        System.out.println(char)('1' + '9' - c);
                                              ^
5 errors
Language: C++

#include<iostrem>
using namespace std;
main()
{
  string s;cin>>s;
  if(s[0]=='9')s[0]='1';
  else s[0]='9';
  if(s[1]=='9')s[1]='1';
  else s[1]='9';
  if(s[2]=='9')s[2]='1';
  else s[2]='9';
  cout<<s<<endl;
}

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

int main(){
  int n; std::cin >> n;
  std::cout << 1110-n << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:15: error: 'cin' is not a member of 'std'
    2 |   int n; std::cin >> n;
      |               ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main(){
a.cc:3:8: error: 'cout' is not a member of 'std'
    3 |   std::cout << 1110-n << std::endl;
      |        ^~~~
a.cc:3:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:3:31: error: 'endl' is not a member of 'std'
    3 |   std::cout << 1110-n << std::endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main(){
Language: C++

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

int main(){
        int n;
        cin>>n;
        int m,r;
        m=n/111;
        r=n%111;
        if(r==0){cout<<n<<endl;}
        else{cout<<111*(m+1)<<endl;}
return 0;
}

~


Compiler output:
a.cc:16:2: error: expected class-name at end of input
   16 | ~
      |  ^