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

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

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


    

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:11:12: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   11 |       s[i]="9";
      |            ^~~
      |            |
      |            const char*
a.cc:12:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     }else if(s[i]=="9"){
a.cc:13:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |       s[i]=="1";
Language: C++

#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;

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


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

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

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

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, n) for (int i = (n); i >= 0; --i)
#define FOR(i, m, n) for (int i = (m); i < (n); ++i)
#define FORR(i, m, n) for (int i = (m); i >= (n); --i)
using namespace std;
typedef long long ll;
const ll mod = 1000000007;
const ll mod2 = 998244353;

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

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

#include <iostream>
#include <iomanip>
#include <vector>
#include <cmath>
#include <algorithm>
#include <iomanip>
#include <cstring>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;

int main() {
  string n; cin >> n;
  rep(i, 3) cout << (n[i]=='1' ? '9' : '1');
  cout << endl
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:15: error: expected ';' before 'return'
   17 |   cout << endl
      |               ^
      |               ;
   18 |   return 0;
      |   ~~~~~~
Language: C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void){
char s[10];
scanf("%s",s);
for(count=0;s[count]!='\0';count++){
if(s[count]=='9'){s[count]='1';count++;}
else if(s[count]=='1'){s[count]='9';count++;}
}
  printf("%s",s);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:5: error: 'count' undeclared (first use in this function)
    7 | for(count=0;s[count]!='\0';count++){
      |     ^~~~~
main.c:7:5: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int main() {
  string S; cin >> S;
  for (int i = 0; i < S.size(); i++) {
    cout << (S[i] == "1" ? 9 : 1 );
  }
  cout << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     cout << (S[i] == "1" ? 9 : 1 );
Language: C++

#include <bits/stdc++.h> 
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define all(vec) vec.begin(), vec.end()
#define tmax(x,y,z) max((x),max((y),(z)))
#define tmin(x,y,z) min((x),min((y),(z)))
typedef long long ll;ll MM = 1000000000;ll mod = MM + 7; ll MMM=9223372036854775807;//2^63 -1
ll GCD(ll x, ll y) {if (y == 0) return x;else return GCD(y, x % y);}
ll LCM(ll x, ll y) { return x / GCD(x, y) * y;}
//cout << fixed << setprecision(10);

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


Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected primary-expression before '<<' token
   18 |   <<endl;
      |   ^~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: expected ';' before '}' token
   13 |       N[i] = '1'
      |                 ^
      |                 ;
   14 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>

#include <cstdlib>  // abs() for integer 絶対値求めやつ

#include <cmath>    // abs() for float, and fabs()

#include <algorithm>

#define rep(i,n) for(int i = 0 ; i< (n);i++)

#define ic(n) int (n); cin>>(n);

#define SORT(a) sort((a).begin(),(a).end());

#define che(a,string) cout<<string<<":"<<(a)<<endl;

#define ch(a,string) cout<<string<<":"<<(a)<<" ";

using namespace std;

typedef pair<int,int> P;

int main(){

	
string s;
		cin >>s;
		int a ;
		rep(i,3){
			if(s.at(i)==1){
			  a=9;
			  }
			  else{
				  a=1;
				}
			cout<<a<<enbl;
		  }
  }

Compiler output:
a.cc: In function 'int main()':
a.cc:36:34: error: 'enbl' was not declared in this scope
   36 |                         cout<<a<<enbl;
      |                                  ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main() {
	string n; cin >> n;
	for (int i = 0; i < 3; i++) {
		if (n[i] == '1') { n[i] = '9'; }
		else { n[i] = '1'; }
	}
	cout << n << endl;
	return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:17: error: expected ';' before '}' token
   11 |         return 0
      |                 ^
      |                 ;
   12 | }
      | ~
Language: C++

 #include<iostream>

using namespace std;

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

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:13:9: error: 's' was not declared in this scope
   13 |   cout<<s<<endl;
      |         ^
Language: Java

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

public class Main {

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

Compiler output:
Main.java:17: error: empty character literal
        System.out.println('');
                           ^
1 error
Language: Java

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

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        char[] input = sc.next().toCharArray();
        for (i = 0; i < input.length; i++) {
            if (input[i] == '1')
                System.out.print('9');
                else
                System.out.print('1');
        }
    }
}

Compiler output:
Main.java:11: error: cannot find symbol
        for (i = 0; i < input.length; i++) {
             ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        for (i = 0; i < input.length; i++) {
                    ^
  symbol:   variable i
  location: class Main
Main.java:11: error: cannot find symbol
        for (i = 0; i < input.length; i++) {
                                      ^
  symbol:   variable i
  location: class Main
Main.java:12: error: cannot find symbol
            if (input[i] == '1')
                      ^
  symbol:   variable i
  location: class Main
4 errors
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{
      s.at(i)='1'
    }
  }
}

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

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

int main(){
  string n;
  cin >>n;
  
  repeat(i,3) s[i]==1 ?  s[i]==9 : s[i]==1;
  
  string ans = s;
  
  cout << ans <<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: 's' was not declared in this scope
    9 |   repeat(i,3) s[i]==1 ?  s[i]==9 : s[i]==1;
      |               ^
a.cc:11:16: error: 's' was not declared in this scope
   11 |   string ans = s;
      |                ^
Language: C++

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

const int MOD = 1000000007;
const int INF = 1e9;

//long long
using ll = long long;

//出力系
#define print(x) cout << x << endl
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
 
// begin() end()
#define all(x) (x).begin(),(x).end()

//for
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n, i##_len=(n); i>=0; i--)
#define FOR(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)

//最大公約数 
unsigned gcd(unsigned a, unsigned b) {
  if(a < b) return gcd(b, a);
  unsigned r;
  while ((r=a%b)) {
    a = b;
    b = r;
  }
  return b;
} 

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'
     }

     print(S);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:42:29: error: expected ';' before '}' token
   42 |           else S.at(i) = '1'
      |                             ^
      |                             ;
   43 |      }
      |      ~
Language: C

#include <cstdio>
 
int main()
{
	int N;
	scanf("%d", &N);
 
	int i = N / 111;
	if (N % 111 != 0) ++i;
 
	printf("%d\n", i * 111);
	return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
 
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:9:18: error: expected ';' before '}' token
    9 |       n.at(i)='9'
      |                  ^
      |                  ;
   10 |     }
      |     ~             
a.cc:12:18: error: expected ';' before '}' token
   12 |       n.at(i)='1'
      |                  ^
      |                  ;
   13 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
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:9:18: error: expected ';' before '}' token
    9 |       n.at(i)='9'
      |                  ^
      |                  ;
   10 |     }
      |     ~             
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else{
      |     ^~~~
a.cc:13:12: error: 'i' was not declared in this scope
   13 |       n.at(i)='1'
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
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:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(n.at(i)=="1"){
      |        ~~~~~~~^~~~~
a.cc:9:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       n.at(i)="9"
      |               ^~~
      |               |
      |               const char*
a.cc:9:18: error: expected ';' before '}' token
    9 |       n.at(i)="9"
      |                  ^
      |                  ;
   10 |     }
      |     ~             
a.cc:12:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |       n.at(i)="1"
      |               ^~~
      |               |
      |               const char*
a.cc:12:18: error: expected ';' before '}' token
   12 |       n.at(i)="1"
      |                  ^
      |                  ;
   13 |     }
      |     ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
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:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(n.at(i)=="1"){
      |        ~~~~~~~^~~~~
a.cc:9:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       n.at(i)="9"
      |               ^~~
      |               |
      |               const char*
a.cc:9:18: error: expected ';' before '}' token
    9 |       n.at(i)="9"
      |                  ^
      |                  ;
   10 |     }
      |     ~             
a.cc:12:5: error: 'else' without a previous 'if'
   12 |     else{
      |     ^~~~
a.cc:13:12: error: 'i' was not declared in this scope
   13 |       n.at(i)="1"
      |            ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
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:8:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(n.at(i)=="1"){
      |        ~~~~~~~^~~~~
a.cc:9:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
    9 |       n.at(i)="9"
      |               ^~~
      |               |
      |               const char*
a.cc:9:18: error: expected ';' before '}' token
    9 |       n.at(i)="9"
      |                  ^
      |                  ;
   10 |     }
      |     ~             
a.cc:12:15: error: invalid conversion from 'const char*' to '__gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type' {aka 'char'} [-fpermissive]
   12 |       n.at(i)="1"
      |               ^~~
      |               |
      |               const char*
a.cc:12:18: error: expected ';' before '}' token
   12 |       n.at(i)="1"
      |                  ^
      |                  ;
   13 |     }
      |     ~             
a.cc:15:4: error: expected '}' at end of input
   15 |   }
      |    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

string S;

int main(){
  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:9:22: error: 'N' was not declared in this scope
    9 |   for(int i = 0; i < N ;i++){
      |                      ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  int n;
  cin >> n;
  int hund,ten,one;
  hund=n/100;
  ten=(n%100)/10;
  one=((n%100)%10);
  if(hund=9){
    hund=1;
    else if(hund=1)
      hund=9;
  }
  if(ten=9){
    ten=1;
    else if(ten=1)
      ten=9;
  }
  if(one=9){
    one=1;
    else if(one=1)
      one=9;
  }
  cout << 100*hund+10*ten+one << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: expected '}' before 'else'
   13 |     else if(hund=1)
      |     ^~~~
a.cc:11:13: note: to match this '{'
   11 |   if(hund=9){
      |             ^
a.cc: At global scope:
a.cc:16:3: error: expected unqualified-id before 'if'
   16 |   if(ten=9){
      |   ^~
a.cc:21:3: error: expected unqualified-id before 'if'
   21 |   if(one=9){
      |   ^~
a.cc:26:3: error: 'cout' does not name a type
   26 |   cout << 100*hund+10*ten+one << endl;
      |   ^~~~
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
#define debug(x) cerr << "\n" \
                      << #x << " = " << x << ".\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(xx) cout << (xx) << endl
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vint;
const int INF = ((1LL << 30) + (1LL << 29));
const ll MOD = 1000000007;
 
/* 
    TITLE:
*/
 
//=================================================
int N;
//=================================================
void input()
{
ciN>>N;
}
 
//=================================================
void solve()
{
int ans = 0;
for (int i = 0; N ; ++i){
  int m = N % 10;
  if (m == 1){
    m = 9;
  }
  else if (m == 9){
    m = 1;
  }
  ans += 10*i + m;
}
  cout<<ans<<endl;
}
//=================================================
signed main()
{
    input();
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void input()':
a.cc:23:1: error: 'ciN' was not declared in this scope
   23 | ciN>>N;
      | ^~~
Language: C++

#include <bits/stdc++.h>
#define debug(x) cerr << "\n" \
                      << #x << " = " << x << ".\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(xx) cout << (xx) << endl
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vint;
const int INF = ((1LL << 30) + (1LL << 29));
const ll MOD = 1000000007;
 
/* 
    TITLE:
*/
 
//=================================================
int N;
//=================================================
void input()
{
ciN>>N;
}
 
//=================================================
void solve()
{
int ans = 0;
for (int i = 0; N ; ++i){
  int m = N % 10;
  if (m == 1){
    m = 9;
  }
  else if (m == 9){
    m = 1;
  }
  ans += 10*i + m;
}
  cout<<ans<<endl;
 
//=================================================
signed main()
{
    input();
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void input()':
a.cc:23:1: error: 'ciN' was not declared in this scope
   23 | ciN>>N;
      | ^~~
a.cc: In function 'void solve()':
a.cc:43:12: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   43 | signed main()
      |            ^~
a.cc:43:12: note: remove parentheses to default-initialize a variable
   43 | signed main()
      |            ^~
      |            --
a.cc:43:12: note: or replace parentheses with braces to value-initialize a variable
a.cc:44:1: error: a function-definition is not allowed here before '{' token
   44 | {
      | ^
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:28:1: note: to match this '{'
   28 | {
      | ^
Language: C++

#include <bits/stdc++.h>
#define debug(x) cerr << "\n" \
                      << #x << " = " << x << ".\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(xx) cout << (xx) << endl
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vint;
const int INF = ((1LL << 30) + (1LL << 29));
const ll MOD = 1000000007;

/* 
    TITLE:
*/

//=================================================
int N;
//=================================================
void input()
{
ciN>>N;
}

//=================================================
void solve()
{
int ans = 0;
for int (i = 0; N ; ++i){
  int m = N % 10;
  if (m == 1){
    m = 9;
  }
  else if (m == 9){
    m = 1;
  }
  ans += 10*i + m;
}
  cout<<ans<<endl;

//=================================================
signed main()
{
    input();
    solve();
    return 0;
}

Compiler output:
a.cc: In function 'void input()':
a.cc:23:1: error: 'ciN' was not declared in this scope
   23 | ciN>>N;
      | ^~~
a.cc: In function 'void solve()':
a.cc:7:13: error: expected '(' before 'long'
    7 | #define int long long
      |             ^~~~
a.cc:30:5: note: in expansion of macro 'int'
   30 | for int (i = 0; N ; ++i){
      |     ^~~
a.cc:7:13: error: expected primary-expression before 'long'
    7 | #define int long long
      |             ^~~~
a.cc:30:5: note: in expansion of macro 'int'
   30 | for int (i = 0; N ; ++i){
      |     ^~~
a.cc:30:23: error: 'i' was not declared in this scope
   30 | for int (i = 0; N ; ++i){
      |                       ^
a.cc:43:12: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   43 | signed main()
      |            ^~
a.cc:43:12: note: remove parentheses to default-initialize a variable
   43 | signed main()
      |            ^~
      |            --
a.cc:43:12: note: or replace parentheses with braces to value-initialize a variable
a.cc:44:1: error: a function-definition is not allowed here before '{' token
   44 | {
      | ^
a.cc:48:2: error: expected '}' at end of input
   48 | }
      |  ^
a.cc:28:1: note: to match this '{'
   28 | {
      | ^
Language: Java

import java.util.*;

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

Compiler output:
Main.java:11: error: cannot find symbol
                System.out.printl(s);
                          ^
  symbol:   method printl(char)
  location: variable out of type PrintStream
Main.java:14: error: cannot find symbol
                System.out.printl(s);
                          ^
  symbol:   method printl(char)
  location: variable out of type PrintStream
2 errors
Language: C++

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

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

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

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: expected ';' before ':' token
   12 |       a.at(i)=1:
      |                ^
      |                ;
Language: C++

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

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:12:9: error: request for member 'at' in 'a', which is of non-class type 'int'
   12 |       a.at(i)=1:
      |         ^~
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
 char a[1],b[1],c[1];
  scanf("%s%s%s",a,b,c);
  if(a==1){
      a=9;
  }else {
  a=1;
  }
if(b==1){
      b=9;
  }else {
  b=1;
  }
  if(c==1){
      c=9;
  }else {
  c=1;
  }
  printf("%S%S%S",a,b,c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:7: warning: comparison between pointer and integer
    6 |   if(a==1){
      |       ^~
main.c:7:8: error: assignment to expression with array type
    7 |       a=9;
      |        ^
main.c:9:4: error: assignment to expression with array type
    9 |   a=1;
      |    ^
main.c:11:5: warning: comparison between pointer and integer
   11 | if(b==1){
      |     ^~
main.c:12:8: error: assignment to expression with array type
   12 |       b=9;
      |        ^
main.c:14:4: error: assignment to expression with array type
   14 |   b=1;
      |    ^
main.c:16:7: warning: comparison between pointer and integer
   16 |   if(c==1){
      |       ^~
main.c:17:8: error: assignment to expression with array type
   17 |       c=9;
      |        ^
main.c:19:4: error: assignment to expression with array type
   19 |   c=1;
      |    ^
Language: C

#include <stdio.h>
#include <string.h>
int main(void){
 char a[1]=0,b[1]=0,c[1]=0;
  scanf("%s%s%s",a,b,c);
  if(a==1){
      a=9;
  }else {
  a=1;
  }
if(b==1){
      b=9;
  }else {
  b=1;
  }
  if(c==1){
      c=9;
  }else {
  c=1;
  }
  printf("%S%S%S",a,b,c);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:12: error: invalid initializer
    4 |  char a[1]=0,b[1]=0,c[1]=0;
      |            ^
main.c:4:19: error: invalid initializer
    4 |  char a[1]=0,b[1]=0,c[1]=0;
      |                   ^
main.c:4:26: error: invalid initializer
    4 |  char a[1]=0,b[1]=0,c[1]=0;
      |                          ^
main.c:6:7: warning: comparison between pointer and integer
    6 |   if(a==1){
      |       ^~
main.c:7:8: error: assignment to expression with array type
    7 |       a=9;
      |        ^
main.c:9:4: error: assignment to expression with array type
    9 |   a=1;
      |    ^
main.c:11:5: warning: comparison between pointer and integer
   11 | if(b==1){
      |     ^~
main.c:12:8: error: assignment to expression with array type
   12 |       b=9;
      |        ^
main.c:14:4: error: assignment to expression with array type
   14 |   b=1;
      |    ^
main.c:16:7: warning: comparison between pointer and integer
   16 |   if(c==1){
      |       ^~
main.c:17:8: error: assignment to expression with array type
   17 |       c=9;
      |        ^
main.c:19:4: error: assignment to expression with array type
   19 |   c=1;
      |    ^
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:13:17: error: expected expression before ']' token
   13 |   printf("%s",a[]);
      |                 ^
Language: C

#include <stdio.h>

int main(void){
  int a=0;
  scanf("%d",&a);
  for(int i=1;i<=3;i++){
  if(a[i]==1){
    a[i]=9;
  }else {
    a[i]=1;
  }
  }
  printf("%d",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: subscripted value is neither array nor pointer nor vector
    7 |   if(a[i]==1){
      |       ^
main.c:8:6: error: subscripted value is neither array nor pointer nor vector
    8 |     a[i]=9;
      |      ^
main.c:10:6: error: subscripted value is neither array nor pointer nor vector
   10 |     a[i]=1;
      |      ^
Language: C

#include <stdio.h>

int main(void){
  int a;
  scanf("%d",&a);
  for(int i=1;i<=3;i++){
  if(a[i]==1){
    a[i]=9;
  }else {
    a[i]=1;
  }
  }
  printf("%d",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:7: error: subscripted value is neither array nor pointer nor vector
    7 |   if(a[i]==1){
      |       ^
main.c:8:6: error: subscripted value is neither array nor pointer nor vector
    8 |     a[i]=9;
      |      ^
main.c:10:6: error: subscripted value is neither array nor pointer nor vector
   10 |     a[i]=1;
      |      ^
Language: C

#include <stdio.h>

int main(void){
  int a[3]=000;
  for(int i=1;i<=3;i++){
  if(a[i]==1){
    a[i]=9;
  }else {
    a[i]=1;
  }
  }
  printf("%d",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:12: error: invalid initializer
    4 |   int a[3]=000;
      |            ^~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  int ans=0;
  int buff=0;
  for(int i=0; i<3; i++){
    buff = n%10;
    if(buff == 1){
      buff = 9; 
    }else{
      buff = 1;
    }
    ans += buff*(10**i);
  }
  
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:21: error: invalid type argument of unary '*' (have 'int')
   16 |     ans += buff*(10**i);
      |                     ^~
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)=='9')s.at(i)='1';
  cout << s <<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:21: error: expected ';' before 's'
    8 |   else(s.at(i)=='9')s.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[i]=='9')s[i]='1'
    else s[i]='9'
  }
  cout << s <<endl;
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before 'else'
    7 |   if(s[i]=='9')s[i]='1'
      |                        ^
      |                        ;
    8 |     else s[i]='9'
      |     ~~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:19: error: expected ';' before 's'
    9 |   else(s.at(i)==9)s.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)==9)s.at(i)=1;
  cout << s <<endl;
 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before 's'
    8 |   else(s.at(i)==9)s.at(i)=1;
      |                   ^
      |                   ;
Language: C++

    #include <iostream>
    #include <math.h>
    #include <vector>
    #include <string>
    using namespace std;
    int main() {
        string a;
        cin >> a;
        for(i=0;i<3;i++){
            if(a[i]=='1') a[i] = '9';
            else if(a[i]=='9') a[i]='1';
        } 
        cout << a << endl;
        return 0;
    }

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

    #include <iostream>
    #include <math.h>
    #include <vector>
    #include <string>
    using namespace std;
    int main() {
        string a;
        cin >> a;
        for(i=0;i<3;i+){
            if(a[i]=='1') a[i] = '9';
            else if(a[i]=='9') a[i]='1';
        } 
        cout << a << endl;
        return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'i' was not declared in this scope
    9 |         for(i=0;i<3;i+){
      |             ^
a.cc:9:23: error: expected primary-expression before ')' token
    9 |         for(i=0;i<3;i+){
      |                       ^
Language: C++

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

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


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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: 'strins' was not declared in this scope; did you mean 'stdin'?
    4 | int main(){strins s;cin>>s;for(int i=0; i<3; i++){if(s[i]=='1')cout<<'9';else cout<<'1';}cout<<endl;}
      |            ^~~~~~
      |            stdin
a.cc:4:26: error: 's' was not declared in this scope
    4 | int main(){strins s;cin>>s;for(int i=0; i<3; i++){if(s[i]=='1')cout<<'9';else cout<<'1';}cout<<endl;}
      |                          ^
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: 'strins' was not declared in this scope; did you mean 'stdin'?
    4 | int main(){strins s;cin>>s;for(int i=0; i<3; i++){if(s[i]=='1')cout<<'9';else cout<<'1';cout<<endl;}}
      |            ^~~~~~
      |            stdin
a.cc:4:26: error: 's' was not declared in this scope
    4 | int main(){strins s;cin>>s;for(int i=0; i<3; i++){if(s[i]=='1')cout<<'9';else cout<<'1';cout<<endl;}}
      |                          ^
Language: C

#include<stdio.h>
#include<math.h>

int main(void)
{
  int n;
  scanf("%d",&n);
  
 n=1110-n;
  
  printf("%d",x);
  
  return 0;
  
}

Compiler output:
main.c: In function 'main':
main.c:11:15: error: 'x' undeclared (first use in this function)
   11 |   printf("%d",x);
      |               ^
main.c:11:15: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#pragma GCC optimize "-O3"
#pragma GCC target ("avx")
#define _USE_MATH_DEFINES
#include<bits/stdc++.h>
#define int long long
#define rep(i,n) for(int i=0;i<n;++i)
#define vi vector<int>
#define vvi vector<vi>
#define pb push_back
#define pi pair<int,int>
#define vp vector<pair<int,int>>
#define mp make_pair
#define all(v) (v).begin(),(v).end()
#define fi first
#define se second
#define inf (1ll<<60)
#define SORT(v) sort(all(v))
#define RSORT(v) sort(all(v),greater<int>())
signed gcd(int a, int b){return b?gcd(b,a%b):a;}
signed lcm(int a,int b){return a*b/gcd(a,b);}
//priority_queue<int, vector<int>, greater<int> > que; //昇順

using namespace std;

const int mod=1e9+7;

void run();

void init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout<<fixed<<setprecision(12);
}

signed main(){
    init();
    run();
    return 0;
}

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

Compiler output:
a.cc: In function 'void run()':
a.cc:46:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   46 |         if(n[i]=="1")cout << "9";
Language: C++

#include<queue>
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;
	return 0;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:9: error: 'string' was not declared in this scope
    5 |         string s;
      |         ^~~~~~
a.cc:2:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
    1 | #include<queue>
  +++ |+#include <string>
    2 | using namespace std;
a.cc:6:9: error: 'cin' was not declared in this scope
    6 |         cin >> s;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<queue>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:16: error: 's' was not declared in this scope
    6 |         cin >> s;
      |                ^
a.cc:13:9: error: 'cout' was not declared in this scope
   13 |         cout << s;
      |         ^~~~
a.cc:13:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include "bits/stdc++.h"
#define ll long long
#define ALL(v) (v).begin(),(v).end()
#define MOD 1000000007
using namespace std;


}

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

}


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

#include<iostream>
#include<stdlib.h>
#include<vector>
#include<algorithm>
#include<stdio.h>
#include<string>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<limits.h>
#define rep(i,n) for(ll i = 0; i < (ll)n; i++)
#define swap(a,b) a^=b;b^=a;a^=b;
#define chmax(a,b) {if(a < b) a = b;}
#define chmin(a,b) {if(a > b) a = b;}
using namespace std;
typedef long long ll;
ll gcd(ll, ll);
vector<bool> to_binary(int);
int sum(vector<int>);
int min(vector<int>);
int max(vector<int>);
ll nCr(ll n, ll r);

const ll INF = 1LL << 60;

typedef tuple<ll, ll> mtupl;

bool mycomp(mtupl x, mtupl y) {
	return get<1>(x) < get<1>(y);
}

vector<vector<ll>> memo;

ll get(int x, int y) {
	if (memo[x][y] != -1)
		return memo[x][y];

	if (x == 0) return 1;
	if (y < x) return 0;

	memo[x][y] = get(x, y - 1) + get(x - 1, y - 1);
	return memo[x][y];
}

ll mpow(ll a, ll b) {
	ll ans = 1;
	for (ll i = 0; i < b; i++) {
		ans *= a;
		ans %= 1000000007;
	}
	return ans;
}

int main(void) {
	cin.tie(0);
	ios::sync_with_stdio(false);
	//Program Start	

	int A, B, C;
	scanf_s("%1d%1d%1d", &A, &B, &C);

	printf("%d", (A == 1) ? 9 : (A == 9) ? 1 : A);
	printf("%d", (B == 1) ? 9 : (B == 9) ? 1 : B);
	printf("%d", (C == 1) ? 9 : (C == 9) ? 1 : C);
	printf("\n");

ProgramEndPointLabel:;

	//Program End
	system("pause");

	return 0;
}

ll nCr(ll n, ll r) {
	ll res = 1;
	for (int i = 0; i < r; i++) {
		res *= (n - i);
	}
	for (int i = 1; i <= r; i++) {
		res /= i;
	}
	return res;
}

int vsum(vector<int> v) {
	int res = 0;
	for (auto it = v.begin(); it != v.end(); it++)
		res += *it;
	return res;
}
int vmin(vector<int> v) {
	int min = INT32_MAX;
	for (auto it = v.begin(); it != v.end(); it++)
		min = std::min(min, *it);
	return min;
}
int vmax(vector<int> v) {
	int max = 0;
	for (auto it = v.begin(); it != v.end(); it++)
		max = std::max(max, *it);
	return max;
}

ll gcd(ll A, ll B) {
	if (A == 0 || B == 0) return max(A, B);
	int r = A % B;
	while (r != 0) {
		A = B;
		B = r;
		r = A % B;
	}

	return B;
}

vector<bool> to_binary(int x) {
	vector<bool> res;
	while (x != 0) {
		res.push_back(x % 2);
		x /= 2;
	}
	return res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:61:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   61 |         scanf_s("%1d%1d%1d", &A, &B, &C);
      |         ^~~~~~~
      |         scanf
a.cc: In function 'int vmin(std::vector<int>)':
a.cc:94:19: error: 'INT32_MAX' was not declared in this scope
   94 |         int min = INT32_MAX;
      |                   ^~~~~~~~~
a.cc:12:1: note: 'INT32_MAX' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
   11 | #include<limits.h>
  +++ |+#include <cstdint>
   12 | #define rep(i,n) for(ll i = 0; i < (ll)n; i++)
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) cout << 9;
  else cout << 1;
}
}



Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin >> s;
      |   ^~~
a.cc:8:6: error: 's' was not declared in this scope
    8 |   if(s.at(i) == 1) cout << 9;
      |      ^
Language: C++

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;
int main(){
  int n;
  vector<int> even;
  vector<int> odd;
  for(int i = 0; n > i; i++){
    int tmp;cin>>tmp;
    if(i%2==0){
      even.push_back(tmp);
    }else{
      odd.push_back(tmp);
    }
  }
  sort(even.begin(),even.end());
  even.push_back(0);
  sort(odd.begin(),odd.end());
  odd.push_back(0);
  int mxev=0;
  int mxevp;
  int mxod=0;
  int mxodp;
  int nw = 1;
  vector<int> evnum;
  vector<int> odnum;
  for(int i = 1; even.size() > i; i++){
    if(even[i] == even[i-1])nw++;
    else{
      if(mxev < nw){
        mxev = nw;
        mxevp = even[i-1];
      }
      evnum.push_back(nw);
      nw = 1;
    }
  }
  for(int i = 1; odd.size() > i; i++){
    if(odd[i] == odd[i-1])nw++;
    else{
      if(mxod < nw){
        mxod = nw;
        mxodp = odd[i-1];
      }
      odnum.push_back(nw);
      nw = 1;
    }
  }
  sort(odnum.begin(),odnum.end(),greater<int>);
  sort(evnum.begin(),evnum.end(),greater<int>);
  if(mxodp == mxevp){
    cout << n - max(odnum[1]+evnum[0],odnum[0]+evnum[1]) << endl;
  }else{
    cout << n - mxodp+mxevp << endl;
  }
}
      
      
      
      
    
    

Compiler output:
a.cc: In function 'int main()':
a.cc:51:46: error: expected primary-expression before ')' token
   51 |   sort(odnum.begin(),odnum.end(),greater<int>);
      |                                              ^
a.cc:52:46: error: expected primary-expression before ')' token
   52 |   sort(evnum.begin(),evnum.end(),greater<int>);
      |                                              ^
Language: C++

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

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

}


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

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

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

}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: expected ';' before '}' token
    9 |   n.at(i)=9
      |            ^
      |            ;
   10 | }
      | ~           
a.cc:12:16: error: expected ';' before '}' token
   12 |       n.at(i)=1
      |                ^
      |                ;
   13 |     }
      |     ~           
a.cc:15:14: error: expected primary-expression before ';' token
   15 |   cout <<n <<;
      |              ^
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main() {
	string s;
	cin >> s;
	for (int i = 0; i < 3; i++) {
		if (s[i] == '9') {
			cout << '1';
		}
		else {
			cout << '9'119
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:36: error: expected ';' before numeric constant
   12 |                         cout << '9'119
      |                                    ^~~
      |                                    ;
Language: C++

#include <istream>
using namespace std;
int main(){
  char s[3];
  cin >> s;
  if(s[0] != 9) cout << 1;
  else cout << 9;
   if(s[1] != 9) cout << 1;
  else cout << 9;
   if(s[2] != 9) cout << 1;
  else cout << 9;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> s;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <istream>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:6:17: error: 'cout' was not declared in this scope
    6 |   if(s[0] != 9) cout << 1;
      |                 ^~~~
a.cc:6:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:8: error: 'cout' was not declared in this scope
    7 |   else cout << 9;
      |        ^~~~
a.cc:7:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:18: error: 'cout' was not declared in this scope
    8 |    if(s[1] != 9) cout << 1;
      |                  ^~~~
a.cc:8:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:8: error: 'cout' was not declared in this scope
    9 |   else cout << 9;
      |        ^~~~
a.cc:9:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:18: error: 'cout' was not declared in this scope
   10 |    if(s[2] != 9) cout << 1;
      |                  ^~~~
a.cc:10:18: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:8: error: 'cout' was not declared in this scope
   11 |   else cout << 9;
      |        ^~~~
a.cc:11:8: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include <stdio.h>
int main(){
  int a;
  scanf("%d",&a);
  (a/100==1)?a=a+800:a=a+800;
  ((a/10)%10==1)?a+=80:a-=80;
  (a%10==1)?a+=8:a-=8;
  printf("%d",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:23: error: lvalue required as left operand of assignment
    5 |   (a/100==1)?a=a+800:a=a+800;
      |                       ^
main.c:6:25: error: lvalue required as left operand of assignment
    6 |   ((a/10)%10==1)?a+=80:a-=80;
      |                         ^~
main.c:7:19: error: lvalue required as left operand of assignment
    7 |   (a%10==1)?a+=8:a-=8;
      |                   ^~
Language: C

#include <stdio.h>
int main(){
  int a;
  scanf("%d",&a);
  (a/100==1)?a+=800:a-=800;
  ((a/10)%10==1)?a+=80:a-=80;
  (a%10==1)?a+=8:a-=8;
  printf("%d",a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: lvalue required as left operand of assignment
    5 |   (a/100==1)?a+=800:a-=800;
      |                      ^~
main.c:6:25: error: lvalue required as left operand of assignment
    6 |   ((a/10)%10==1)?a+=80:a-=80;
      |                         ^~
main.c:7:19: error: lvalue required as left operand of assignment
    7 |   (a%10==1)?a+=8:a-=8;
      |                   ^~
Language: C

#include <stdio.h>
int main(){
  int a;
  scanf("%d",&a);
  (a/100==1)?a+=800:a-=800;
  ((a/10)%10==1)?a+=80:a-=80;
  (a%10==1)?a+=8:a-=8;
  printf("%d",&a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:22: error: lvalue required as left operand of assignment
    5 |   (a/100==1)?a+=800:a-=800;
      |                      ^~
main.c:6:25: error: lvalue required as left operand of assignment
    6 |   ((a/10)%10==1)?a+=80:a-=80;
      |                         ^~
main.c:7:19: error: lvalue required as left operand of assignment
    7 |   (a%10==1)?a+=8:a-=8;
      |                   ^~