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

#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>

using namespace std;

inline int read()
{
   int x=0,f=1;char ch=getchar();
   while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}
   while (isdigit(ch)){x=(x<<1)+(x<<3)+ch-'0';ch=getchar();}
   return x*f;
}

const int maxn = 1e5+1e2;

int a[maxn];
int n,m;
int ans;

int main()
{ 
  n=read(),m=read();
  for (int i=1;i*i<=m;i++)
  {
  	 if (n*i<=m) 
  	   if (m%i==0) ans=max(ans,i);
  	if (m%i==0 && n*(m/i)<=m)
  	  ans=max(ans,m/i);
  }
  cout<<ans;
  return 0;
}
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<cmath>

using namespace std;

inline int read()
{
   int x=0,f=1;char ch=getchar();
   while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}
   while (isdigit(ch)){x=(x<<1)+(x<<3)+ch-'0';ch=getchar();}
   return x*f;
}

const int maxn = 1e5+1e2;

int a[maxn];
int n,m;
int ans;

int main()
{ 
  n=read(),m=read();
  for (int i=1;i*i<=m;i++)
  {
  	 if (n*i<=m) 
  	   if (m%i==0) ans=max(ans,i);
  	if (m%i==0 && n*(m/i)<=m)
  	  ans=max(ans,m/i);
  }
  cout<<ans;
  return 0;
}


Compiler output:
a.cc:44:12: error: redefinition of 'int read()'
   44 | inline int read()
      |            ^~~~
a.cc:9:12: note: 'int read()' previously defined here
    9 | inline int read()
      |            ^~~~
a.cc:52:11: error: redefinition of 'const int maxn'
   52 | const int maxn = 1e5+1e2;
      |           ^~~~
a.cc:17:11: note: 'const int maxn' previously defined here
   17 | const int maxn = 1e5+1e2;
      |           ^~~~
a.cc:54:5: error: redefinition of 'int a [100100]'
   54 | int a[maxn];
      |     ^
a.cc:19:5: note: 'int a [100100]' previously declared here
   19 | int a[maxn];
      |     ^
a.cc:55:5: error: redefinition of 'int n'
   55 | int n,m;
      |     ^
a.cc:20:5: note: 'int n' previously declared here
   20 | int n,m;
      |     ^
a.cc:55:7: error: redefinition of 'int m'
   55 | int n,m;
      |       ^
a.cc:20:7: note: 'int m' previously declared here
   20 | int n,m;
      |       ^
a.cc:56:5: error: redefinition of 'int ans'
   56 | int ans;
      |     ^~~
a.cc:21:5: note: 'int ans' previously declared here
   21 | int ans;
      |     ^~~
a.cc:58:5: error: redefinition of 'int main()'
   58 | int main()
      |     ^~~~
a.cc:23:5: note: 'int main()' previously defined here
   23 | int main()
      |     ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
long long n,m,ans=0;
int main(){
cin>>n>>m;
for(int i=1;i*i<=m;++i) {
if(m%i==0) {
if(m/i>=n) {
ans=max(ans,m/i);
}
if(i>=n) {
ans=max(ans,i);
}
}
}
cout<<ans<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: no matching function for call to 'max(long long int&, int&)'
   12 | ans=max(ans,i);
      |     ~~~^~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:12:8: note:   deduced conflicting types for parameter 'const _Tp' ('long long int' and 'int')
   12 | ans=max(ans,i);
      |     ~~~^~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:12:8: note:   mismatched types 'std::initializer_list<_Tp>' and 'long long int'
   12 | ans=max(ans,i);
      |     ~~~^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
ll n,m,ans=0;
int main(){
cin>>n>>m;
for(int i=1;i*i<=m;++i) {
if(m%i==0) {
if(m/i>=n) {
ans=max(ans,m/i);
}
if(i>=n) {
ans=max(ans,i);
}
}
}
cout<<ans<<endl;
}

Compiler output:
a.cc:3:1: error: 'll' does not name a type
    3 | ll n,m,ans=0;
      | ^~
a.cc: In function 'int main()':
a.cc:5:6: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 | cin>>n>>m;
      |      ^
      |      yn
a.cc:5:9: error: 'm' was not declared in this scope; did you mean 'tm'?
    5 | cin>>n>>m;
      |         ^
      |         tm
a.cc:9:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 | ans=max(ans,m/i);
      | ^~~
      | abs
a.cc:12:1: error: 'ans' was not declared in this scope; did you mean 'abs'?
   12 | ans=max(ans,i);
      | ^~~
      | abs
a.cc:16:7: error: 'ans' was not declared in this scope; did you mean 'abs'?
   16 | cout<<ans<<endl;
      |       ^~~
      |       abs
Language: C++

#include<iosream>
using namespace std;
int main(){
  int a;
  cin>>a;
  int b[3];
  for(int i=0;i<3;i++){
    b[i]=a%10;
    a=a/10;
    if(b[i]=1)
      b[i]=9;
    else
      b[i]=1;
  }
  return 0;
}

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

#include<iostream>
using namespace std;
int main(){
  int a;
  cin>>a;
  int b;
  for(int i=0;i<3;i++){
    if(a.at(i)==1)
      a.at(i)=9;
    else if(a.at(i)==9)
      a.at(i)=1;
  }
  return 0;
}

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

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

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

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

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  for (int i=0;i<3;i++){
if(s.at(i)=='1'){s.at(i)='9';}
    else if(s.at(i)=='9'){s.at(i)='1'}
  }
  cout<<s<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:38: error: expected ';' before '}' token
    7 |     else if(s.at(i)=='9'){s.at(i)='1'}
      |                                      ^
      |                                      ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  for (int i=0;i<3;i++){
if(s.at(i)=='1'){s.at(i)='9';}
    else if(s.at(i)=='9'){s.at(i)=='1'}
  }
  cout<<s<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:39: error: expected ';' before '}' token
    7 |     else if(s.at(i)=='9'){s.at(i)=='1'}
      |                                       ^
      |                                       ;
Language: C++


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


	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:3:1: error: 'string' was not declared in this scope
    3 | string s;
      | ^~~~~~
a.cc:4:1: error: 'cin' was not declared in this scope
    4 | cin>>s;
      | ^~~
a.cc:4:6: error: 's' was not declared in this scope
    4 | cin>>s;
      |      ^
a.cc:8:18: error: 'cout' was not declared in this scope
    8 |                  cout<<"9";
      |                  ^~~~
a.cc:10:18: error: 'cout' was not declared in this scope
   10 |                  cout<<"9";
      |                  ^~~~
Language: C++

#include <iostream>
using namespace std;

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

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: invalid use of member function 'std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::size_type std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::length() const [with _CharT = char; _Traits = std::char_traits<char>; _Alloc = std::allocator<char>; size_type = long unsigned int]' (did you forget the '()' ?)
    7 | for(int i=0; i<s.length ;i=i+1)
      |                ~~^~~~~~
      |                        ()
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:10:27: error: invalid use of member function 'std::vector<char>::at' (did you forget the '()' ?)
   10 |   else if(h.at(i)=='9') h.at.(i)='1';
      |                         ~~^~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: expected ';' before 'if'
    8 |   cin >> h.at(i)
      |                 ^
      |                 ;
    9 |   if(h.at(i)=='1') h.at(i)='9';
      |   ~~             
a.cc:10:3: error: 'else' without a previous 'if'
   10 |   else if(h.at(i)=='9') h.at.(i)='1';
      |   ^~~~
a.cc:10:27: error: invalid use of member function 'std::vector<char>::at' (did you forget the '()' ?)
   10 |   else if(h.at(i)=='9') h.at.(i)='1';
      |                         ~~^~
Language: C++

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

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

Compiler output:
a.cc:6:1: error: extended character 　 is not valid in an identifier
    6 | 　string s;
      | ^
a.cc: In function 'int main()':
a.cc:6:1: error: '\U00003000string' was not declared in this scope
    6 | 　string s;
      | ^~~~~~~~
a.cc:7:8: error: 's' was not declared in this scope
    7 |   cin>>s;
      |        ^
Language: C++

/*
 * a.cc:
 */

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
#include<iomanip>

using namespace std;

/* constant */

/* typedef */

/* global variables */

/* subroutines */

/* main */
int main(){
  string n;
  cin>>n;

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

    if(n.at(i)=="1") n.at(i)=9;
    
    else n.at(i)=1;
    
  }

  cout<<n<<endl;
  


  






  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   42 |     if(n.at(i)=="1") n.at(i)=9;
      |        ~~~~~~~^~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int A, ans;
  cin >> A;
  ans = 0;
  if(A % 10 = 1) {
    ans += 1;
  }
  else {
    ans += 9;
  }
  if((A + 10) % 100 <= 10) {
    ans += 90;
  }
  else {
    ans += 10;
  }
  if((A + 100) % 1000 <= 100) {
    ans += 900;
  }
  else {
    ans += 100;
  }
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: lvalue required as left operand of assignment
    7 |   if(A % 10 = 1) {
      |      ~~^~~~
Language: C++

// Online C++ compiler to run C++ online.
// Write C++ code in this online editor and run it.

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

int main() {
    string s;
    cin >> s;
    for(auto &c:s){
        if(c == '1'){
            c = '9';
        } else if (c == '9'){
            c = '1';
        }
    }
    cout << s << endl;
    //std::cout << "Hello World!";
    return 0;
}

Compiler output:
a.cc:5:17: error: expected identifier before ';' token
    5 | using namespace ;
      |                 ^
a.cc: In function 'int main()':
a.cc:8:5: error: 'string' was not declared in this scope
    8 |     string s;
      |     ^~~~~~
a.cc:8:5: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:9:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |     cin >> s;
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:12: error: 's' was not declared in this scope
    9 |     cin >> s;
      |            ^
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout << s << 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:17:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     cout << s << endl;
      |                  ^~~~
      |                  std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
string s;cin>>s;
  rep(i,3){
    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:6:7: error: 'i' was not declared in this scope
    6 |   rep(i,3){
      |       ^
a.cc:6:3: error: 'rep' was not declared in this scope
    6 |   rep(i,3){
      |   ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:21: error: 's' was not declared in this scope
    9 |                 if (s[i] == '1') s[i] = '9';
      |                     ^
a.cc:10:21: error: 's' was not declared in this scope
   10 |                 if (s[i] == '9') s[i] = '1';
      |                     ^
Language: C++

#include <iostream>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'elseif' was not declared in this scope
   11 |     elseif(s[i] == '9') s[i] = '1';
      |     ^~~~~~
Language: C++

#include <iostream>

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;
    return 0;
}


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

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

int main() {
  string S ; 
  cin >> S ; 
  for(int i = 0 ; i < S.size() ; i++){
    if (S.at(i) == '1'){
      cout << 9  ; 
    }
    else if(S.at(i) == '9'){
      cout << 1 
    }
    
  }
  cout << endl ; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before '}' token
   12 |       cout << 1
      |                ^
      |                ;
   13 |     }
      |     ~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n;
    cin>>n;
    
    for(int i;i<=3;i++)
        if(n[i]=="1"){
            n.replace(0,i,9)
        }
        if(n[i]=="9"){
            n.replace(0,i,1)
        }
    cout<<n<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid types 'int[int]' for array subscript
    8 |         if(n[i]=="1"){
      |             ^
a.cc:9:15: error: request for member 'replace' in 'n', which is of non-class type 'int'
    9 |             n.replace(0,i,9)
      |               ^~~~~~~
a.cc:11:14: error: 'i' was not declared in this scope
   11 |         if(n[i]=="9"){
      |              ^
a.cc:12:15: error: request for member 'replace' in 'n', which is of non-class type 'int'
   12 |             n.replace(0,i,1)
      |               ^~~~~~~
Language: Java

import java.util.Scanner;

public class A_AtCoderBeginnerContest999 {
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
		
		System.out.println(s.replace('9','o').replace('1', '9').replace('o', '1'));
	}
}


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

function main(input) {
   input = input.trim();
  const replaced = 
        input.replace(/1/g, 'a').replace(/9/g, 'b').replace(/a/g, '9').replace(/b/g, '1')
  console.log(replaced);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
function main(input) {
^
  (use --enable-preview to enable unnamed classes)
Main.java:1: error: <identifier> expected
function main(input) {
                   ^
Main.java:3: error: illegal start of expression
  const replaced = 
  ^
Main.java:4: error: illegal start of expression
        input.replace(/1/g, 'a').replace(/9/g, 'b').replace(/a/g, '9').replace(/b/g, '1')
                      ^
Main.java:4: error: illegal start of expression
        input.replace(/1/g, 'a').replace(/9/g, 'b').replace(/a/g, '9').replace(/b/g, '1')
                                         ^
Main.java:4: error: illegal start of expression
        input.replace(/1/g, 'a').replace(/9/g, 'b').replace(/a/g, '9').replace(/b/g, '1')
                                                            ^
Main.java:4: error: illegal start of expression
        input.replace(/1/g, 'a').replace(/9/g, 'b').replace(/a/g, '9').replace(/b/g, '1')
                                                                               ^
Main.java:4: error: ';' expected
        input.replace(/1/g, 'a').replace(/9/g, 'b').replace(/a/g, '9').replace(/b/g, '1')
                                                                                         ^
Main.java:7: error: class, interface, enum, or record expected
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
^
Main.java:7: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
             ^
Main.java:7: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                ^
Main.java:7: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                ^
Main.java:7: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                           ^
Main.java:7: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                              ^
Main.java:7: error: unclosed character literal
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
                                                   ^
15 errors
Language: C++

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

int main(){
  int A;
  cin >> A;
  if(A/100==1){
    cout << 9;
  }
  else{
    cout << 1;
  }
  if((A%100-A%10)/10==1){
    cout << 9;
  }
  else{
    cout << 1;
  }
  if(A%10==1){
    cout << 9;
  }
  else{
    cout << 1;
  }

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

#include <stdio.h>

int main(void)
{
        char s[3];
        scanf("%s",s);

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


Compiler output:
main.c: In function 'main':
main.c:8:13: error: 'i' undeclared (first use in this function)
    8 |         for(i=0;i<3;i++){
      |             ^
main.c:8:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: no match for call to '(std::vector<int>) (int)'
   17 |   cout<<moji(3)<<endl;
      |         ~~~~^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main()
{
      string n;
      cin >> n;

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


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

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

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

#include<iostream>
using namespace std;

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

Compiler output:
a.cc:10:18: warning: missing terminating ' character
   10 |     else cout << '1"
      |                  ^
a.cc:10:18: error: missing terminating ' character
   10 |     else cout << '1"
      |                  ^~~
a.cc: In function 'int main()':
a.cc:11:3: error: expected primary-expression before '}' token
   11 |   }
      |   ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: expected ';' before '}' token
    9 |       S.at(i)='9'
      |                  ^
      |                  ;
   10 |     }
      |     ~             
a.cc:12:18: error: expected ';' before '}' token
   12 |       S.at(i)='1'
      |                  ^
      |                  ;
   13 |     }
      |     ~
Language: C++

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

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

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'naemespace'
    2 | using naemespace std;
      |       ^~~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'string' was not declared in this scope
    5 |   string S;
      |   ^~~~~~
a.cc:5:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin >> S;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout << S << 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:15:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |   cout << S << endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int> a(3);
  a.at(0) = n / 100;
  a.at(1) = (n - n / 100 * 100) / 10;
  a.at(2) = n % 10;
  vector<int> b(3); = {a.at(0), a.at(1), a.at(2)};
  rep(i, 3) {
    if (a.at(i) == 9) b.at(i) = 1;
    else if (a.at(i) == 1) b.at(i) = 9;
  }
  cout << b.at(0) << b.at(1) << b.at(2) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected primary-expression before '=' token
   12 |   vector<int> b(3); = {a.at(0), a.at(1), a.at(2)};
      |                     ^
Language: C++

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

int main() {
  int n;
  cin >> n;
  vector<int> a(3);
  a.at(0) = n / 100;
  a.at(1) = (n - n / 100 * 100) / 10;
  a.at(2) = n % 10;
  vector<int> b(3) = {a.at(0), a.at(1), a.at(2)};
  rep(i, 3) {
    if (a.at(i) == 9) b.at(i) = 1;
    else if (a.at(i) == 1) b.at(i) = 9;
  }
  cout << b.at(0) << b.at(1) << b.at(2) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: expected ',' or ';' before '=' token
   12 |   vector<int> b(3) = {a.at(0), a.at(1), a.at(2)};
      |                    ^
Language: C++

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

Compiler output:
a.cc:4:17: error: expected declaration before '}' token
    4 |                 }
      |                 ^
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
    
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	char a[3];
	cin>>a;
	for(int i=0;i<3;i++){
		if(arr[i]=='9'){
			cout<<"1";
		}
		else{
          cout<<"9";
		}
    }
	
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:20: error: 'arr' was not declared in this scope
   11 |                 if(arr[i]=='9'){
      |                    ^~~
Language: C++

#include <bits/stdc++.h>
 
using namespace std;
			cout<<"9";
		}
	}
    
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	char a[3];
	cin>>a;
	for(int i=0;i<3;i++){
		if(arr[i]=='9'){
			cout<<"1";
		}
		else{
 return 0;
}

Compiler output:
a.cc:4:25: error: 'cout' does not name a type
    4 |                         cout<<"9";
      |                         ^~~~
a.cc:5:17: error: expected declaration before '}' token
    5 |                 }
      |                 ^
a.cc:6:9: error: expected declaration before '}' token
    6 |         }
      |         ^
a.cc: In function 'int main()':
a.cc:14:20: error: 'arr' was not declared in this scope
   14 |                 if(arr[i]=='9'){
      |                    ^~~
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:13:29: note: to match this '{'
   13 |         for(int i=0;i<3;i++){
      |                             ^
a.cc:19:2: error: expected '}' at end of input
   19 | }
      |  ^
a.cc:8:11: note: to match this '{'
    8 | int main(){
      |           ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:17: error: expected ';' before '}' token
   15 |     cout << '\n'
      |                 ^
      |                 ;
   16 | }
      | ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define pii pair<int,int>
const long long MOD=1e9+7;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 's' was not declared in this scope
   12 |     if(s[i]=='1') cout<<"9";
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REP(i,n) for(int (i)=0;(i)<=(int)(n);(i)++)
#define rep1(i,x,n) for(int (i)=(x);(i)<(int)(n);(i)++)
#define REP1(i,x,n) for(int (i)=(x);(i)<=(int)(n);(i)++)
#define rrep(i,x) for(int i=((int)(x)-1);i>=0;i--)
using namespace std;
using ll = long long;
using ull = unsigned long long;
using Int = long long;

//INT_MAX = 2147483647;
//LLONG_MAX = 9223372036854775807;
//ULLONG_MAX = 18446744073709551615;
const int MOD = 1000000007;
const ll INF = numeric_limits<ll>::max();
const int inf = 1e8;
typedef pair<int,int> P;
typedef std::priority_queue<int> IntPrioQueue;
typedef std::priority_queue<int, std::vector<int>, std::greater<int> > IntReversePrioQueue;

//少数点表示
//cout << std::fixed << std::setprecision(14) << 値

int main(){
    cin.tie( 0 ); ios::sync_with_stdio( false );
    int n;
    cin >> n;
    
    cout << 1110-s << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:18: error: 's' was not declared in this scope
   30 |     cout << 1110-s << endl;
      |                  ^
Language: C++

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: 'n' was not declared in this scope
    6 |   for(int i=0; i<n; i++){
      |                  ^
a.cc:10:2: error: expected '}' at end of input
   10 | }
      |  ^
a.cc:4:11: note: to match this '{'
    4 | int main(){
      |           ^
Language: C++

#include <iostream>
#include <vector>
#include <queue>
using namespace std;
using Graph = vector<vector<int>>;



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

import java.util.*;

public class Main{
      public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String str = sc.next();
            String[] str2 = str.split("");
            for(int i = 0; i < str2.length; i++){
              if("1".equals(str[i])){
                System.out.println("9");
              } else if("9".equals(str[i])){
                System.out.println("1");
              } else {
                System.out.println(str2[i]);
              }
            }
            }
}

Compiler output:
Main.java:9: error: array required, but String found
              if("1".equals(str[i])){
                               ^
Main.java:11: error: array required, but String found
              } else if("9".equals(str[i])){
                                      ^
2 errors
Language: Java

import java.util.*;

public class Main{
      public static void main(String[] args) {
            Scanner sc = new Scanner(System.in);
            String str = sc.next();
            String[] str2 = str.split("");
            for(int i = 0; i < str2.length; i++){
              if("1".equals(str[i])){
                System.out.println("9");
              } else if("9".equals(str[i])){
                System.out.println("1");
              } else {
                System.out.println(str2[i]);
              }
            }
}

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

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define PI 3.14159265358979323846
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long INFL = numeric_limits<long long>::max() / 2;
constexpr int MOD = 1000000007;
using Graph = vector<vector<int>>;



int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);

    string n;
    cin >> n;
    rep(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:19:26: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   19 |         if(n[i]==1) n[i]="9";
      |                          ^~~
      |                          |
      |                          const char*
a.cc:20:19: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   20 |         else n[i]="1";
      |                   ^~~
      |                   |
      |                   const char*
Language: C++

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

int main() {
  int S;
  cin >> S;
  
  if (S == 111) {
    cout << 999 << endl;
  } else if (S === 191) {
    cout << 919 << endl;
  } else if (S == 119) {
    cout << 991 << endl;
  } else if (S == 911) {
    cout << 199 << endl;
  } else if (S == 991) {
    cout << 119 << endl;
  } else if (S == 199) {
    cout << 911 << endl;
  } else if (S == 999) {
    cout << 111 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before '=' token
   10 |   } else if (S === 191) {
      |                  ^
Language: C++

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

int main() {
  string S;
  cin >> S;
  
  if (S[0] == '1') {
    S[0] = '9';
    if (S[0 == '9') {
      S[0] = '1';
    }
  } else if (S[1] == '1') {
    S[1] = '9';
    if (S[1] == '9') {
      S[1] = '1';
    }
  } else if (S[2] == '1') {
    S[2] = '9';
    if (S[2] == '9') {
      S[2] = '1';
    }
  }
  cout << S << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ']' before ')' token
   10 |     if (S[0 == '9') {
      |                   ^
      |                   ]
Language: C++

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

int main() {
  string S;
  cin >> S;
  
  if (S[0] == '1') {
    S[0] = '9';
    if (S[0 == '9') {
      S[0] = '1';
    }
  } else if (S[1] == '1') {
    S[1] = '9';
    if (S[1] == '9') {
      S[1] = '1';
    }
  } else if (S[2] == "1") {
    S[2] = '9';
    if (S[2] == '9') {
      S[2] = '1';
    }
  }
  cout << S << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:19: error: expected ']' before ')' token
   10 |     if (S[0 == '9') {
      |                   ^
      |                   ]
a.cc:18:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |   } else if (S[2] == "1") {
Language: C++

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

int main() {
  string S;
  cin >> S;
  
  if (S[0] == "1") {
    S[0] = "9";
    if (S[0 == "9") {
      S[0] = "1";
    }
  } else if (S[1] == "1") {
    S[1] = "9";
    if (S[1] == "9") {
      S[1] = "1";
    }
  } else if (S[2] == "1") {
    S[2] = "9";
    if (S[2] == "9") {
      S[2] = "1";
    }
  }
  cout << S << endl;
}

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

#include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;

int n[1000];

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

Compiler output:
a.cc: In function 'int main()':
a.cc:17:26: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |                 if (n[i] == "1")
a.cc:19:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |                 else if (n[i] == "9")
Language: C++

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

int main(){
  int n;
  cin>>n;
  if(n[0]==1){
    n[0]=9;
  }
  if(n[0]==9){
    n[0]=1;
  }
  if(n[1]==1){
    n[1]=9;
  }
  if(n[1]==9){
    n[1]=1;
  }
  if(n[2]==1){
    n[2]=9;
  }
  if(n[2]==9){
    n[2]=1;
  }
  cout<<n<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: invalid types 'int[int]' for array subscript
    7 |   if(n[0]==1){
      |       ^
a.cc:8:6: error: invalid types 'int[int]' for array subscript
    8 |     n[0]=9;
      |      ^
a.cc:10:7: error: invalid types 'int[int]' for array subscript
   10 |   if(n[0]==9){
      |       ^
a.cc:11:6: error: invalid types 'int[int]' for array subscript
   11 |     n[0]=1;
      |      ^
a.cc:13:7: error: invalid types 'int[int]' for array subscript
   13 |   if(n[1]==1){
      |       ^
a.cc:14:6: error: invalid types 'int[int]' for array subscript
   14 |     n[1]=9;
      |      ^
a.cc:16:7: error: invalid types 'int[int]' for array subscript
   16 |   if(n[1]==9){
      |       ^
a.cc:17:6: error: invalid types 'int[int]' for array subscript
   17 |     n[1]=1;
      |      ^
a.cc:19:7: error: invalid types 'int[int]' for array subscript
   19 |   if(n[2]==1){
      |       ^
a.cc:20:6: error: invalid types 'int[int]' for array subscript
   20 |     n[2]=9;
      |      ^
a.cc:22:7: error: invalid types 'int[int]' for array subscript
   22 |   if(n[2]==9){
      |       ^
a.cc:23:6: error: invalid types 'int[int]' for array subscript
   23 |     n[2]=1;
      |      ^
Language: C++

#include<bits/stdc++.h>
#define fast ios::sync_with_stdio(false), cin.tie(0);
#define ll long long
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define endl '\n'

using namespace std;

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

Compiler output:
a.cc:12:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   12 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:21:22: error: expected ';' before 'else'
   21 |             cout<<'9'
      |                      ^
      |                      ;
   22 |         else if (n[i]=='9')
      |         ~~~~
Language: C++

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

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

   return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:11: error: 'a' was not declared in this scope
   10 |   else if(a[i] == '9') s[i] -= 8;
      |           ^
Language: C++

#include <iostream>
#include <algorithm>
#include <iomanip>
using namespace std;
string alphabet = "abcdefghijklmnopqrstuvwxyz";
string ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

int main(){
 string s;
 cin >> s;
 for(int 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:13:36: error: expected ';' before ':' token
   13 |      else if(s[i] == '9')s[i] = '1':
      |                                    ^
      |                                    ;
Language: C++

#include <bits/stdc++.h>
using namespace std; 
int main(){
  string s;
  cin >> s;
  for(i=0;i<3;i++){
    if(s.at(i)=='9'){
      s.at(i)='1';
    }else{
      s.at(i)='9';
    }
  }
}

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

n = input()
ans = []
for i in range(3):
    if (n[i]=="1"):
        ans.append("9")
    else:
        ans.append("1")
print(ans[0]+ans[1]+ans[2])

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

#include <bits/stdc++.h>
using namespace std;
int main(){
string n;
  cin>>n;
  for(char &c=n){
  if(c=='1'){
  c=9;
  }if(c=='9'){
 c=1;
  }
    cout<<c<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: invalid initialization of reference of type 'char&' from expression of type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    6 |   for(char &c=n){
      |               ^
a.cc:6:16: error: expected ';' before ')' token
    6 |   for(char &c=n){
      |                ^
      |                ;
a.cc:6:16: error: expected primary-expression before ')' token
a.cc:6:16: error: expected ';' before ')' token
    6 |   for(char &c=n){
      |                ^
      |                ;
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
    6 |   char c =n;
      |           ^
      |           |
      |           std::string {aka std::__cxx11::basic_string<char>}
a.cc:8:8: error: request for member 'at' in 'c', which is of non-class type 'char'
    8 |   if(c.at(i)=='9'){
      |        ^~
a.cc:9:5: error: request for member 'at' in 'c', which is of non-class type 'char'
    9 |   c.at(i)=1;
      |     ^~
a.cc:12:10: error: request for member 'at' in 'c', which is of non-class type 'char'
   12 |     if(c.at(i)=='1'){
      |          ^~
a.cc:13:7: error: request for member 'at' in 'c', which is of non-class type 'char'
   13 |     c.at(i)==9;
      |       ^~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'char' in initialization
    6 |   char c =n
      |           ^
      |           |
      |           std::string {aka std::__cxx11::basic_string<char>}
a.cc:7:15: error: 'i' was not declared in this scope
    7 |   for(int i=0;i<n.size();i++){
      |               ^