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

#include <bits/stdc++.h>
using namespace std;
int main()
{
  int A,B;
  cin>>A>>B;
  if(A==1){if(B==2){cout<<3<<endl;}else{cout<<2<<endl;}}
  else if{(A==2){if(B==3){cout<<1<<endl;}else{cout<<3<<endl;}}
  else{if(B==1){cout<<2<<endl;}else{cout<<1<<endl;}}
  return 0
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:10: error: expected '(' before '{' token
    8 |   else if{(A==2){if(B==3){cout<<1<<endl;}else{cout<<3<<endl;}}
      |          ^
      |          (
a.cc:11:2: error: expected '}' at end of input
   11 | }
      |  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

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

int main() {
  int A,B;
  cin>>A>>B;
  if(A+B)==3{
    cout<<3;
  }
  elif(A+B)==4{
    cout<<2;
  }
  elif(A+B)==5{
    cout<<1
  }
     
      
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: expected primary-expression before '==' token
    7 |   if(A+B)==3{
      |          ^~
a.cc:10:3: error: 'elif' was not declared in this scope
   10 |   elif(A+B)==4{
      |   ^~~~
Language: C

#include <stdio.h>

void main()
{
  	int a,b,c;
  
  	scanf("%d",a);
    scanf("%d",b);
  
      	if(a==1)
        {if(a==2)
              printf("3");
        }
  			else
            {  printf("2");
            }
       	else if(a==2)
        {if(a==3)
             printf("1");
        }
  			else
            { printf("3");
            }
 			 else
               
       else(a==3)
       {
        	if(a==1)
            { printf("2");
            }
  			else
            { printf("1");
            }
       }
}


Compiler output:
main.c: In function 'main':
main.c:17:9: error: 'else' without a previous 'if'
   17 |         else if(a==2)
      |         ^~~~
main.c:24:26: error: 'else' without a previous 'if'
   24 |                          else
      |                          ^~~~
main.c:26:8: error: 'else' without a previous 'if'
   26 |        else(a==3)
      |        ^~~~
main.c:26:18: error: expected ';' before '{' token
   26 |        else(a==3)
      |                  ^
      |                  ;
   27 |        {
      |        ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int A=1,2,3
    
  sin>>"A">>endl;
  
  int B=1,2,3
    
    sin>>"B">>endl;
  
  cout <<"A"<<"B"<< endl;
    
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: expected unqualified-id before numeric constant
    5 |   int A=1,2,3
      |           ^
a.cc:9:11: error: expected unqualified-id before numeric constant
    9 |   int B=1,2,3
      |           ^
Language: C++

#include<stdio.h>
main()
{ 
  int A,B;
  scanf("%d",&A);
  scanf("%d",&B);
  
  if((A==1&&B==2)||(A==2&&B==1)){
    printf("%d",3);
  }
  if((A==2&&B==3)||(A==3&&B==2){
    printf("%d",1);
  }
  else{
    printf("%d",2);
  }
     }


Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:11:32: error: expected ')' before '{' token
   11 |   if((A==2&&B==3)||(A==3&&B==2){
      |     ~                          ^
      |                                )
a.cc:17:6: error: expected primary-expression before '}' token
   17 |      }
      |      ^
Language: C++

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

int main()
{
  int a,b,c;
    
    cin >> a;
    cin >> b;
    if(a==1)
    {
      if(b==2)
      {
        c=3;
      }
      else
      {
        c=2;
      }
    }
  
  if(a==3)
    {
      if(b==2)
      {
        c=1;
      }
      else
      {
        c=3;
      }
    
    }
  
  cout << c;
  
  return 0
}
  

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

#include <iostream.h>
using namespace std;
int main(){
	int a,b;
  cin>>a;
  cin>>b;
  if( a!= 1 && b!= 1){
  cout<<"1"<<endl;
  }
  else if( a!= 2 && b!= 2){
  cout<<"2"<<endl;
  }
  else if( a!= 3 && b!= 3){
  cout<<"3"<<endl;
  }
  return 0;
}
  

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

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

int main()
{
  int a,b,c
    
    cin >> a;
    cin >> b;
    if(a==1)
    {
      if(b==2)
      {
        c=3;
      }
      else
      {
        c=2;
      }
    }
  
  if(a==3)
    {
      if(b==2)
      {
        c=1;
      }
      else
      {
        c=3;
      }
    
    }
  
  cout << c;
  
  return 0
}
  

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: expected initializer before 'cin'
    8 |     cin >> a;
      |     ^~~
a.cc:14:9: error: 'c' was not declared in this scope
   14 |         c=3;
      |         ^
a.cc:18:9: error: 'c' was not declared in this scope
   18 |         c=2;
      |         ^
a.cc:26:9: error: 'c' was not declared in this scope
   26 |         c=1;
      |         ^
a.cc:30:9: error: 'c' was not declared in this scope
   30 |         c=3;
      |         ^
a.cc:35:11: error: 'c' was not declared in this scope
   35 |   cout << c;
      |           ^
a.cc:37:11: error: expected ';' before '}' token
   37 |   return 0
      |           ^
      |           ;
   38 | }
      | ~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:12:34: error: expected ')' before 'n'
   12 |         if(n[i]==0) printf("%d\n"n[i]+1);
      |                           ~      ^
      |                                  )
Language: C++

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

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(vec) vec.begin(),vec.end()
typedef long long ll;
const int MAX=2e5;
const ll MOD=1e9+7;
const int INF=1<<30;

int main(){
  int a,b;
  cin >> a >> b;
  set<int> S;
  S.insert(1);S.insert(2);S.insert(3);
  S.erace(a);S.erace(b);
  for(auto c:S){
    cout << c << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:18:5: error: 'class std::set<int>' has no member named 'erace'; did you mean 'erase'?
   18 |   S.erace(a);S.erace(b);
      |     ^~~~~
      |     erase
a.cc:18:16: error: 'class std::set<int>' has no member named 'erace'; did you mean 'erase'?
   18 |   S.erace(a);S.erace(b);
      |                ^~~~~
      |                erase
Language: C++

#include<stdio.h>
main()
{ 
  int A,B;
  scanf("%d",&A);
  scanf("%d",&B);
  
  if((A==1&&B==2)||(A==2&&B==1)){
    printf("%d",3);
  }
  if((A==2&&B==3)||(A==3&&B==2){
    printf("%d",1);
  }
  else{
    printf("%d",2);
  }
     }

Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:11:32: error: expected ')' before '{' token
   11 |   if((A==2&&B==3)||(A==3&&B==2){
      |     ~                          ^
      |                                )
a.cc:17:6: error: expected primary-expression before '}' token
   17 |      }
      |      ^
Language: C++

#include<bits/sdtc++.h>
using namespace std;
int main(){
  int a,b;
  cin>>a>>b;
  if(a==1){
    if(b==2){
      cout<<3;
      return 0;
    }else if(b==3){
      cout<<2;
      return 0;
    }
  }else if(a==2){
    if(b==1){
      cout<<3;
      return 0;
    }else if(b==3){
      cout<<1;
      return 0;
    }
  }else {
    if(b==2){
      cout<<1;
      return 0;
    }else if(b==1){
      cout<<2;
      return 0;
    }
  }
} 

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

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

int main(){
  int a,b;
  cin>>a>>b;
  cout<<a^b;
  return 0;
}

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

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

int main()

{
int a,b,c;

cin >> a>>b;

if(a == 1 && b==2)
{
c=3;
}

if else(a == 1 && b==3)
{
c=2;
}

if else(a == 2 && b==1)
{
c=3;
}

if else(a == 2 && b==3)
{
c=1;
}

if else(a == 3 && b==1)
{
c=2;
}

if else(a == 3 && b==2)
{
c=1;
}

cout <<c;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:4: error: expected '(' before 'else'
   18 | if else(a == 1 && b==3)
      |    ^~~~
      |    (
a.cc:23:4: error: expected '(' before 'else'
   23 | if else(a == 2 && b==1)
      |    ^~~~
      |    (
a.cc:28:4: error: expected '(' before 'else'
   28 | if else(a == 2 && b==3)
      |    ^~~~
      |    (
a.cc:33:4: error: expected '(' before 'else'
   33 | if else(a == 3 && b==1)
      |    ^~~~
      |    (
a.cc:38:4: error: expected '(' before 'else'
   38 | if else(a == 3 && b==2)
      |    ^~~~
      |    (
Language: C++

int main()
{
    int n,k;
    std::cin >> n >> k;
    int ans = 0;
    switch (n+k) {
        case 5: ans = 1; break;
        case 4: ans = 2; break;
        case 3: ans = 3; break;
    }

    std::cout << ans << std::endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:10: error: 'cin' is not a member of 'std'
    4 |     std::cin >> n >> k;
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:12:10: error: 'cout' is not a member of 'std'
   12 |     std::cout << ans << std::endl;
      |          ^~~~
a.cc:12:10: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:30: error: 'endl' is not a member of 'std'
   12 |     std::cout << ans << std::endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
Language: C

import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		int A,B;
		do {
			A = stdIn.nextInt();
			B = stdIn.nextInt();
	}while((A<1||A>3)&&(B<1||B>3));
		int x = 0;
		switch(A) {
		case 1: if(B==2) {
			x = 3;
			break;
		}else {
			x = 2;
			break;
		}
		case 2 : if(B == 1) {
			x = 3;
			break;
		}else {
			x = 1;
			break;
		}
		case 3 : if(B==1) {
			x = 2;
			break;
		}else {
			x = 1;
			break;
		}
		}
		System.out.println(x);
	}
}


Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.Scanner;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.Scanner;
      |            ^
main.c:2:1: error: unknown type name 'public'
    2 | public class Main {
      | ^~~~~~
main.c:2:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    2 | public class Main {
      |              ^~~~
Language: C++

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

int main(){
    int a,b;
    cin >> a >> b;
    set<int>st = {1,2,3};
    st.erase(a);
    st.erase(b);
    int *ans = st.begin();
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:24: error: cannot convert 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'int*' in initialization
   10 |     int *ans = st.begin();
      |                ~~~~~~~~^~
      |                        |
      |                        std::set<int>::iterator {aka std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator}
Language: C++

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

int main(){
  int A, B, Ans;
  
  cin >> A >> B;
  
  if(A+B == 3) Ans = 3;
  else if(A+B == 5) Ans = 1;
  else if(A+B == 4) Ans = 2;
  
  cout << Ans << endl;
  
  return 0;
}

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

import java.util.Scanner;

public class RO{
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    int b = scan.nextInt();

    System.out.println(String.valueOf(6 - a -b));
  }
}


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

// inputに入力データ全体が入る
function Main(input) {
	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
	tmp = input[1].split(" ");
	//文字列から10進数に変換するときはparseIntを使います
	var a = parseInt(input[0], 10);
	var b = parseInt(input[1], 10);
    if(a == 1 && b == 2){
        console.log(3);
    }else if(a == 1 && b == 3){
        console.log(2);
    }else{
        console.log(1);
    }
}
//*この行以降は編集しないでください（標準入出力から一度に読み込み、Mainを呼び出します）
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

Compiler output:
a.cc:2:1: error: 'function' does not name a type; did you mean 'union'?
    2 | function Main(input) {
      | ^~~~~~~~
      | union
a.cc:18:5: error: expected constructor, destructor, or type conversion before '(' token
   18 | Main(require("fs").readFileSync("/dev/stdin", "utf8"));
      |     ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main
{
	int a,b;
    cin >> a >> b;
    if(a+b == 5)
    {
    	cout << 1;
    }
    if(a+b == 4)
    {
    	cout << 2;
    }
    if(a+b == 3)
    {
     	cout << 3;
    }
    return 0;
}

Compiler output:
a.cc:3:5: error: cannot declare '::main' to be a global variable
    3 | int main
      |     ^~~~
a.cc:5:9: error: expected primary-expression before 'int'
    5 |         int a,b;
      |         ^~~
a.cc:5:9: error: expected '}' before 'int'
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
a.cc:6:5: error: 'cin' does not name a type
    6 |     cin >> a >> b;
      |     ^~~
a.cc:7:5: error: expected unqualified-id before 'if'
    7 |     if(a+b == 5)
      |     ^~
a.cc:11:5: error: expected unqualified-id before 'if'
   11 |     if(a+b == 4)
      |     ^~
a.cc:15:5: error: expected unqualified-id before 'if'
   15 |     if(a+b == 3)
      |     ^~
a.cc:19:5: error: expected unqualified-id before 'return'
   19 |     return 0;
      |     ^~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

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

int main(){
    int a,b;
    cin >> a >> b;
    set<int>st = {1,2,3};
    st.erase(a);
    st.erase(b);
    int ans = st.begin();
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:23: error: cannot convert 'std::set<int>::iterator' {aka 'std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator'} to 'int' in initialization
   10 |     int ans = st.begin();
      |               ~~~~~~~~^~
      |                       |
      |                       std::set<int>::iterator {aka std::_Rb_tree<int, int, std::_Identity<int>, std::less<int>, std::allocator<int> >::const_iterator}
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    int b = scan.nextInt()

    System.out.println(String.valueOf(6 - a -b));
  }
}


Compiler output:
Main.java:7: error: ';' expected
    int b = scan.nextInt()
                          ^
1 error
Language: C++

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

int main()
{
  int a,b,c;
  cin>>a>>b;
  if(a==1&&b==2)
    cout<<3;
   elseif(a==1&&b==3)
    cout<<2;  
   elseif(a==2&&b==1)
	cout<<3;
   elseif(a==2&&b==3)
     cout<<1;
   elseif(a==3&&b==2)
     cout<<1;
  elseif(a==3&&b==1)
    cout<<2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:4: error: 'elseif' was not declared in this scope
   10 |    elseif(a==1&&b==3)
      |    ^~~~~~
Language: C++

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		int B = sc.nextInt();
		sc.close();
		if (A == 1 && B == 2) {
			System.out.println(3);
		} else if (A == 2 && B == 1) {
			System.out.println(3);
		} else if (A == 2 && B == 3) {
			System.out.println(1);
		} else if (A == 3 && B == 2) {
			System.out.println(1);
		} else if (A == 1 && B == 3) {
			System.out.println(2);
		} else if (A == 3 && B == 1) {
			System.out.println(2);
		}
	}

}


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

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;

typedef pair<ll,ll> pairs;
vector<pairs> p;
bool pairCompare(const pair<double,ll>& firstElof, const pair<double,ll>& secondElof){
    return firstElof.first < secondElof.first;
}
#define MAX_N 1000100
bool x[MAX_N];
ll num[MAX_N];
ll fibl[MAX_N]={0};
 
ll fib(ll a){
    if (fibl[a]!=0)return fibl[a];
    if (a==0){
        return 0;
    }else if (a==1){
        return 1;
    }
    return fibl[a]=fib(a-1)+fib(a-2);
}
 
ll eratosthenes(ll n) {
    int p = 0;
    for (ll i=0; i<=n; ++i) x[i] = true;
    x[0] = x[1] = false;
    for(int i=2; i<=n; ++i) {
        if(x[i]) {
            p++;
            for(int j=2*i; j<=n; j+=i) x[j] = false;
        }
        
        num[i] = p;
    }
    return p;
}

ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}

ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

int main(){
    ll a,b;
    cin >> a >> b;
    for (ll i=1;i<4;i++){
        if (a!+i && b!=i)cout << i << endl;
    }
}





Compiler output:
a.cc: In function 'int main()':
a.cc:63:14: error: expected ')' before '!' token
   63 |         if (a!+i && b!=i)cout << i << endl;
      |            ~ ^
      |              )
Language: C++

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

int main(){
    int a,b;
    cin >> a >> b;
    set<int>st = {1,2,3};
    st.erase(a);
    st.erase(b);
    int ans = st[0];
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: no match for 'operator[]' (operand types are 'std::set<int>' and 'int')
   10 |     int ans = st[0];
      |                 ^
Language: C

#include <stdio.h>

int a = scanf("%d", &a);
int b = scanf("%d", &b);

if(a != 1 && b != 2) printf("3\n");
if(a != 2 && b != 3) printf("1\n");
if(a != 3 && b != 1) printf("2\n");

return 0;

Compiler output:
main.c:3:9: error: initializer element is not constant
    3 | int a = scanf("%d", &a);
      |         ^~~~~
main.c:4:9: error: initializer element is not constant
    4 | int b = scanf("%d", &b);
      |         ^~~~~
main.c:6:1: error: expected identifier or '(' before 'if'
    6 | if(a != 1 && b != 2) printf("3\n");
      | ^~
main.c:7:1: error: expected identifier or '(' before 'if'
    7 | if(a != 2 && b != 3) printf("1\n");
      | ^~
main.c:8:1: error: expected identifier or '(' before 'if'
    8 | if(a != 3 && b != 1) printf("2\n");
      | ^~
main.c:10:1: error: expected identifier or '(' before 'return'
   10 | return 0;
      | ^~~~~~
Language: C++

#include<iostream>

using namespace;

int main(void)
{
  int a,b;
  
  cin>>a;
  cin>>b;
  
  if(a==1 && b==2 || a==2 && b==1)
    cout<<3<<endl;
  else if(a==1 && b==3 || a==3 && b==1)
    cout<<2<<endl;
  else
    cout<<1<<endl;
}


Compiler output:
a.cc:3:16: error: expected identifier before ';' token
    3 | using namespace;
      |                ^
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin>>a;
      |   ^~~
      |   std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |     cout<<3<<endl;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   13 |     cout<<3<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |     cout<<2<<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:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   15 |     cout<<2<<endl;
      |              ^~~~
      |              std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   17 |     cout<<1<<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:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   17 |     cout<<1<<endl;
      |              ^~~~
      |              std::endl
/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>
#include <vector>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <algorithm>
#include <iomanip>
#include <math.h>
#include <string.h>
using namespace std; using ll = long long; using pll = pair<ll, ll>;
using vl = vector<ll>; using vll = vector<vl>; using vpll = vector<pll>;
int ctoi(char c) {
	switch (c) {
	case '0': return 0; case '1': return 1; case '2': return 2;
	case '3': return 3; case '4': return 4; case '5': return 5;
	case '6': return 6; case '7': return 7; case '8': return 8;
	case '9': return 9;  default: return 0; }
}
bool pairCompare(const pll firstElof, pll secondElof)
{
	return firstElof.first > secondElof.first;
}
ll nod(ll F) { return log10(F) + 1; }
//**定義場所**//
//gcd, isPrime, eratos, modinv, bitSearch, dfs, bfs, dijkstra, UnionFind//
ll i, j, k, l, m, n; ll N, M, K, H, W, L; string S, T;
ll MOD = 1000000007; ll ans = 0; ll INF = LLONG_MAX;
vl flag, color; vll path;
//***********//
int main() {
	ll A, B;
	cin >> A >> B;
	vl C = { 0,1,1,1 };
	C[A] = 0;
	C[B] = 0;
	for (i = 0; i < 4; i++) {
		if (C[i] == 1) {
			cout << i;
			exit(0);
		}
	}
}

Compiler output:
a.cc:29:43: error: 'LLONG_MAX' was not declared in this scope
   29 | ll MOD = 1000000007; ll ans = 0; ll INF = LLONG_MAX;
      |                                           ^~~~~~~~~
a.cc:12:1: note: 'LLONG_MAX' is defined in header '<climits>'; this is probably fixable by adding '#include <climits>'
   11 | #include <string.h>
  +++ |+#include <climits>
   12 | using namespace std; using ll = long long; using pll = pair<ll, ll>;
Language: C++

#include<iostream>
#include <vector>
#include<string.h>
#include<cmath>
using namespace std;


int main(){
   int a,b;
   cin>>a>>b;
    if(a*b==3)
      cout<< 2 <<endl;
    else if(a*b==6)
       cout<< 1 <<endl;
    else
      cout<< 3 <<endl;
   
    cout<< count <<endl;
    
   return 0;
}

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

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

int main(){
    int a,b;
    cin >> a >> b;
    set<int>st = {1,2,3};
    st.erase(a);
    st.erase(b);
    int ans = set[0];
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: missing template arguments before '[' token
   10 |     int ans = set[0];
      |                  ^
Language: C++

include<iostream>

using namespace std;

int main(void)
{
  int a,b;
  
  cin>>a;
  cin>>b;
  
  if(a==1 && b==2 || a==2 && b==1)
    cout<<3<<endl;
  else if(a==1 && b==3 || a==3 && b==1)
    cout<<2<<endl;
  else
    cout<<1<<endl;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>>a;
      |   ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<3<<endl;
      |     ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |     cout<<3<<endl;
      |              ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<2<<endl;
      |     ^~~~
a.cc:15:14: error: 'endl' was not declared in this scope
   15 |     cout<<2<<endl;
      |              ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<1<<endl;
      |     ^~~~
a.cc:17:14: error: 'endl' was not declared in this scope
   17 |     cout<<1<<endl;
      |              ^~~~
Language: C++

#include"stdio.h"
#include"iostream"
using namespace std;
void main() {
	int a, b;
		cin >> a;
	cin >> b;

	if (a == 1 && b == 2) cout << "3";
	else if (a == 1 && b == 3) cout << "2";
	else if (a == 2 && b == 3) cout << "1";
	else if (a == 2 && b == 1) cout << "3";
	else if (a == 3 && b == 1) cout << "2";
	else if (a == 3 && b == 2) cout << "1";

}

Compiler output:
a.cc:4:1: error: '::main' must return 'int'
    4 | void main() {
      | ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
ll kiriage(ll a,ll b){return a%b==0?a/b:a/b+1;}
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(vec) vec.begin(),vec.end()
typedef long long ll;
const int MAX=2e5;
const ll MOD=1e9+7;
const int INF=1<<30;

int main(){
  int a,b;
  cin >> a >> b;
  set<int> S;
  S.insert(1);S.insert(2);S.insert(3);
  S.erace(a);S.erace(b);
  for(auto c:S){
    cout << c << endl;
  }
}

Compiler output:
a.cc:3:1: error: 'll' does not name a type; did you mean 'all'?
    3 | ll kiriage(ll a,ll b){return a%b==0?a/b:a/b+1;}
      | ^~
      | all
a.cc: In function 'int main()':
a.cc:18:5: error: 'class std::set<int>' has no member named 'erace'; did you mean 'erase'?
   18 |   S.erace(a);S.erace(b);
      |     ^~~~~
      |     erase
a.cc:18:16: error: 'class std::set<int>' has no member named 'erace'; did you mean 'erase'?
   18 |   S.erace(a);S.erace(b);
      |                ^~~~~
      |                erase
Language: C++

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

int main(void){
    int a = 0, b = 0;
    int ans = 0;

    scanf("%d%d", &a, &b);

    if(a == 1 && b == 2){
        ans = 3;
    }else if(a == 2 && b == 1){
        ans = 3;
    }else if(a == 2 && b == 3){
        ans = 1;
    }else if(a == 3 && b == 2){
        ans = 1;
    }else if(a == 3 && b == 1){
        ans = 2;
    }else if(a == 1 && b == 3){
        ans = 2;
    }å

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


    return 0;

} 


Compiler output:
a.cc: In function 'int main()':
a.cc:23:6: error: '\U000000e5' was not declared in this scope
   23 |     }å
      |      ^
Language: Java

import java.util.*;

public class Main
{
  public static void main(String[] args)
  {
	Scanner sc=new Scanner(System.in);
    int a=sc.nextInt();
    int b=sc.nextInt();
    if((a+b)==3)
    {
		System.out.println(3);
    }
    else if((a+b)==4)
    {
		System.out.printltn(2);
    }
    else
    {
      	System.out.println(1);
    }
  }
}

Compiler output:
Main.java:16: error: cannot find symbol
		System.out.printltn(2);
		          ^
  symbol:   method printltn(int)
  location: variable out of type PrintStream
1 error
Language: C++

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

int main(){
    int a,b;
    cin >> a >> b;
    set<int>st = [1,2,3];
    st.erase(a);
    st.erase(b);
    int ans = set[0];
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected identifier before numeric constant
    7 |     set<int>st = [1,2,3];
      |                   ^
a.cc:7:20: error: expected ']' before ',' token
    7 |     set<int>st = [1,2,3];
      |                    ^
      |                    ]
a.cc: In lambda function:
a.cc:7:20: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:7:18: error: conversion from 'main()::<lambda()>' to non-scalar type 'std::set<int>' requested
    7 |     set<int>st = [1,2,3];
      |                  ^~
a.cc:7:21: error: expected unqualified-id before numeric constant
    7 |     set<int>st = [1,2,3];
      |                     ^
a.cc:10:18: error: missing template arguments before '[' token
   10 |     int ans = set[0];
      |                  ^
Language: C++

#include <cmath>
#include<iostream>
#include <functional>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <iomanip>
using namespace std;
 
int main(){    
  long long A,B;
  cin >> A, B;

  if((A=1 || B=1) &&( A=2 || B=2)){
  cout << "3" << endl ;
  }
  if((A=1 || B=1) &&( A=3 || B=3)){
  cout << "2" << endl ;
  }
  if((A=2 || B=2) &&( A=3 || B=3)){
  cout << "1" << endl ;
  }
  
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:11: error: lvalue required as left operand of assignment
   16 |   if((A=1 || B=1) &&( A=2 || B=2)){
      |         ~~^~~~
a.cc:16:27: error: lvalue required as left operand of assignment
   16 |   if((A=1 || B=1) &&( A=2 || B=2)){
      |                         ~~^~~~
a.cc:19:11: error: lvalue required as left operand of assignment
   19 |   if((A=1 || B=1) &&( A=3 || B=3)){
      |         ~~^~~~
a.cc:19:27: error: lvalue required as left operand of assignment
   19 |   if((A=1 || B=1) &&( A=3 || B=3)){
      |                         ~~^~~~
a.cc:22:11: error: lvalue required as left operand of assignment
   22 |   if((A=2 || B=2) &&( A=3 || B=3)){
      |         ~~^~~~
a.cc:22:27: error: lvalue required as left operand of assignment
   22 |   if((A=2 || B=2) &&( A=3 || B=3)){
      |                         ~~^~~~
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b >>;

  if(a==1 && b==2){
    cout << 3 << endl;
  }

  if(a==1 && b==3){
    cout << 2 << endl;
  }

  if(a==2 && b==1){
    cout << 3 << endl;
  }  

  if(a==2 && b==3){
    cout << 1 << endl;
  }

  if(a==3 && b==1){
    cout << 2 << endl;
  }

  if(a==3 && b==2){
    cout << 1 << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:19: error: expected primary-expression before ';' token
    6 |   cin >> a >> b >>;
      |                   ^
Language: C++

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

int main(){
  int a,b;
  cin >> a >> b;
  cout << 6-(a+b) << endl;
}#include<bits/stdc++.h>
using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  cout << 6-(a+b) << endl;
}

Compiler output:
a.cc:8:2: error: stray '#' in program
    8 | }#include<bits/stdc++.h>
      |  ^
a.cc:8:3: error: 'include' does not name a type
    8 | }#include<bits/stdc++.h>
      |   ^~~~~~~
a.cc:11:5: error: redefinition of 'int main()'
   11 | int main(){
      |     ^~~~
a.cc:4:5: note: 'int main()' previously defined here
    4 | int main(){
      |     ^~~~
Language: C++

#include <iostream>
using namespace std;

int main(){

    int a, b;
    cin >> a >> b;


    vector<bool> nums(3);

    for (int i = 0; i < 2; i++) {
        int num;
        cin >> num;
        nums[num] = true;
    }
        

    for (int i = 0; i < 3; i++)
        if (!nums[i])
            cout << i+1 << endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'vector' was not declared in this scope
   10 |     vector<bool> nums(3);
      |     ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include <iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:10:12: error: expected primary-expression before 'bool'
   10 |     vector<bool> nums(3);
      |            ^~~~
a.cc:15:9: error: 'nums' was not declared in this scope; did you mean 'num'?
   15 |         nums[num] = true;
      |         ^~~~
      |         num
a.cc:20:14: error: 'nums' was not declared in this scope
   20 |         if (!nums[i])
      |              ^~~~
Language: Java

import java.util.Scanner;

public class Main {
  public static void main(String[] args) {
    Scanner scan = new Scanner(System.in);
    int a = scan.nextInt();
    int b = scan.nextInt()
    if (a != b) {
      System.out.println(6 - a -b);
    }
  }
}


Compiler output:
Main.java:7: error: ';' expected
    int b = scan.nextInt()
                          ^
1 error
Language: C++

using System;
class abc148_a{
  public static void Main(){
	int a = int.Parse(Console.ReadLine());
    int b = int.Parse(Console.ReadLine());
    if(a==0){
      if(b==1){
        Console.WriteLine(2);
      }
      else{
        Console.WriteLine(1);
      }
    }
    if(a==1){
      if(b==0){
        Console.WriteLine(2);
      }
      else{
        Console.WriteLine(0);
      }
    }
    if(a==2){
      if(b==0){
        Console.WriteLine(1);
      }
      else{
        Console.WriteLine(0);
      }
    }
  }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:3:9: error: expected ':' before 'static'
    3 |   public static void Main(){
      |         ^~~~~~~
      |         :
a.cc:31:2: error: expected ';' after class definition
   31 | }
      |  ^
      |  ;
a.cc: In static member function 'static void abc148_a::Main()':
a.cc:4:17: error: expected primary-expression before 'int'
    4 |         int a = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:5:13: error: expected primary-expression before 'int'
    5 |     int b = int.Parse(Console.ReadLine());
      |             ^~~
a.cc:8:9: error: 'Console' was not declared in this scope
    8 |         Console.WriteLine(2);
      |         ^~~~~~~
a.cc:11:9: error: 'Console' was not declared in this scope
   11 |         Console.WriteLine(1);
      |         ^~~~~~~
a.cc:16:9: error: 'Console' was not declared in this scope
   16 |         Console.WriteLine(2);
      |         ^~~~~~~
a.cc:19:9: error: 'Console' was not declared in this scope
   19 |         Console.WriteLine(0);
      |         ^~~~~~~
a.cc:24:9: error: 'Console' was not declared in this scope
   24 |         Console.WriteLine(1);
      |         ^~~~~~~
a.cc:27:9: error: 'Console' was not declared in this scope
   27 |         Console.WriteLine(0);
      |         ^~~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef long double ld;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long long INF = 1LL << 60;
 
typedef pair<ll,ll> pairs;
vector<pairs> p;
bool pairCompare(const pair<double,ll>& firstElof, const pair<double,ll>& secondElof){
    return firstElof.first < secondElof.first;
}
#define MAX_N 1000100
bool x[MAX_N];
ll num[MAX_N];
ll fibl[MAX_N]={0};
 
ll fib(ll a){
    if (fibl[a]!=0)return fibl[a];
    if (a==0){
        return 0;
    }else if (a==1){
        return 1;
    }
    return fibl[a]=fib(a-1)+fib(a-2);
}
 
ll eratosthenes(ll n) {
    int p = 0;
    for (ll i=0; i<=n; ++i) x[i] = true;
    x[0] = x[1] = false;
    for(int i=2; i<=n; ++i) {
        if(x[i]) {
            p++;
            for(int j=2*i; j<=n; j+=i) x[j] = false;
        }
        
        num[i] = p;
    }
    return p;
}
 
ll gcd(ll a,ll b){
    if (a%b==0)return(b);
    else return(gcd(b,a%b));
}
 
ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

int main(){
    ll a,b;
    cin>>a>>b;
    
    if(a == 1 && b == 2)cout << 3 << endl;
    else if (a == 1 && b == 3)cout << 2 << endl;
    else if (a == 2 && b == 1)cout << 3 << endl;
    else if (a == 3 && b == 1)cout << 2 << endl;
    else if (a == 2 && b == 3)cout << 1 << endl;
    else if (a == 3 && b == 2)cout << 1 << endl;
    else cout << 1 << endl;
    
    return 0;
}


 
ll keta(ll N){
    int tmp{};
    while( N > 0 ){
        tmp += ( N % 10 );
        N /= 10;
    }
    N = tmp;
    return N;
}

int main(){
    ll a,b;
    cin>>a>>b;
    
    if(a == 1 && b == 2)cout << 3 << endl;
    else if (a == 1 && b == 3)cout << 2 << endl;
    else cout << 1 << endl;
    
    return 0;
}



Compiler output:
a.cc:76:4: error: redefinition of 'll keta(ll)'
   76 | ll keta(ll N){
      |    ^~~~
a.cc:49:4: note: 'll keta(ll)' previously defined here
   49 | ll keta(ll N){
      |    ^~~~
a.cc:86:5: error: redefinition of 'int main()'
   86 | int main(){
      |     ^~~~
a.cc:59:5: note: 'int main()' previously defined here
   59 | int main(){
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main(void)
{
    int x,y;
    cin>>x>>y;
    if(x != 3 && y != 3)
        cout<<3<<endl;
    else
    if(x == != 1 && y != 1)
        cout<<1<<endl;
    else
    if(x != 2 && y != 2)
        cout<<2<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:13: error: expected primary-expression before '!=' token
   11 |     if(x == != 1 && y != 1)
      |             ^~
Language: C++

#include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
#include <ctime>
#include <bitset>
#include <complex>
#include <random>

using namespace std;

#define int long long

signed main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    
    int a, b;
    cin >> a >> b;
    cout << __lcm(a, b) << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:13: error: '__lcm' was not declared in this scope
   32 |     cout << __lcm(a, b) << endl;
      |             ^~~~~
Language: C++

include<iostream>

using namespace;

int main(void)
{
  int a,b;
  
  cin>>a;
  cin>>b;
  
  if(a==1 && b==2 || a==2 && b==1)
    cout<<3<<endl;
  else if(a==1 && b==3 || a==3 && b==1)
    cout<<2<<endl;
  else
    cout<<1<<endl;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>>a;
      |   ^~~
a.cc:13:5: error: 'cout' was not declared in this scope
   13 |     cout<<3<<endl;
      |     ^~~~
a.cc:13:14: error: 'endl' was not declared in this scope
   13 |     cout<<3<<endl;
      |              ^~~~
a.cc:15:5: error: 'cout' was not declared in this scope
   15 |     cout<<2<<endl;
      |     ^~~~
a.cc:15:14: error: 'endl' was not declared in this scope
   15 |     cout<<2<<endl;
      |              ^~~~
a.cc:17:5: error: 'cout' was not declared in this scope
   17 |     cout<<1<<endl;
      |     ^~~~
a.cc:17:14: error: 'endl' was not declared in this scope
   17 |     cout<<1<<endl;
      |              ^~~~
Language: C++

A=int(input())
B=int(input())
ans=[1,2,3]
if A>B:
    ans.pop(A-1)
    ans.pop(B-1)
else:
    ans.pop(B-1)
    ans.pop(A-1)

print(ans[0])    

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

#include<bits/stdc++.h>

using namespace std;

int main(){
	int a,b;
	cin>>a>>b;
	if((a==1&&b==2)||(a==2&&b==1)){
		cout<<3;
	}
	else if((a==1&&b==3)||(a==3&&b==1)){
		cout<<2;
	}
	else if((a==2&&b==3)||(a==3&&b==2)){
		cout<<1;
	}
}

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

#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
#define md 1000000007
int main()
{
    int n,m; cin >> n >> m;
    if(n == 1 && m == 2) cout << 3 
         if(n == 1 && m == 3) cout << 2 ;
     if(n == 2 && m == 3) cout << 1 ;
      if(n == 2 && m == 1) cout << 3 ;
      if(n == 3 && m == 2) cout << 1 ;
      if(n == 3 && m == 1) cout << 2 ;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:35: error: expected ';' before 'if'
    8 |     if(n == 1 && m == 2) cout << 3
      |                                   ^
      |                                   ;
    9 |          if(n == 1 && m == 3) cout << 2 ;
      |          ~~
Language: C++

#include <iostream>
int main(){
  int a, int b;
  std::cin >> a >> b;
  std::cout << 6-a-b;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:10: error: expected unqualified-id before 'int'
    3 |   int a, int b;
      |          ^~~
a.cc:4:20: error: 'b' was not declared in this scope
    4 |   std::cin >> a >> b;
      |                    ^
Language: C++

#include<iostream>

using namespace std;

int main(){
  int A,B;
      cin>>A>>B;              //外部入力読み込み方法

  if (A+B==3){
    cout <<3 ;
     } 
   else if(A+B==4){
    cout << 2;
   }
   else {
  cout<<1
   } 
 return 0;
}


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

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

int main(){
	// sengen
	int a,b;
	cin >> a >> b;
	int answer;
	// nyuryoku

	// keisan
	for(int i=1,i<=3,i++){
		if(i != a && i != b){
			answer = i;
		}
	}
	cout << answer << endl;
}

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

int main(){
  int A,B;
  cin >> A >> B;
  if(A==1){
    if(B==2){
      cout << "3" << endl;
    }
    else if(B==3){
      cout << "2" << endl;
    }
  }else if(A==2){
    if(B==1){
      cout << "3" << endl;
    }
    else if(B==3){
      cout << "1" << endl;
    }
  }else if(A==3){
    if(B==1){
      cout << "2" << endl;
    }
    else if(B==2){
      cout << "1" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> A >> B;
      |   ^~~
a.cc:6:7: error: 'cout' was not declared in this scope
    6 |       cout << "3" << endl;
      |       ^~~~
a.cc:6:22: error: 'endl' was not declared in this scope
    6 |       cout << "3" << endl;
      |                      ^~~~
a.cc:9:7: error: 'cout' was not declared in this scope
    9 |       cout << "2" << endl;
      |       ^~~~
a.cc:9:22: error: 'endl' was not declared in this scope
    9 |       cout << "2" << endl;
      |                      ^~~~
a.cc:13:7: error: 'cout' was not declared in this scope
   13 |       cout << "3" << endl;
      |       ^~~~
a.cc:13:22: error: 'endl' was not declared in this scope
   13 |       cout << "3" << endl;
      |                      ^~~~
a.cc:16:7: error: 'cout' was not declared in this scope
   16 |       cout << "1" << endl;
      |       ^~~~
a.cc:16:22: error: 'endl' was not declared in this scope
   16 |       cout << "1" << endl;
      |                      ^~~~
a.cc:20:7: error: 'cout' was not declared in this scope
   20 |       cout << "2" << endl;
      |       ^~~~
a.cc:20:22: error: 'endl' was not declared in this scope
   20 |       cout << "2" << endl;
      |                      ^~~~
a.cc:23:7: error: 'cout' was not declared in this scope
   23 |       cout << "1" << endl;
      |       ^~~~
a.cc:23:22: error: 'endl' was not declared in this scope
   23 |       cout << "1" << endl;
      |                      ^~~~
Language: C++

#include<iostream>

int main()
{
    int a, b;
    cin >> a >> b;
    switch (a)
    {
    case 1:
        switch (b)
        {
        case 2:
            cout << 3;
            break;
        case 3:
            cout << 2;
            break;
        }
        break;
    case 2:
        switch (b)
        {
        case 1:
            cout << 3;
            break;
        case 3:
            cout << 2;
            break;
        }
        break;
    case 3:
        switch (b)
        {
        case 1:
            cout << 2;
            break;
        case 2:
            cout << 1;
            break;
        }
        break;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |     cin >> a >> b;
      |     ^~~
      |     std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   13 |             cout << 3;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:24:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   24 |             cout << 3;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:35:13: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   35 |             cout << 2;
      |             ^~~~
      |             std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~