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

#include<cstdio>
using namespace std;
inline int read(){
	char ch=getchar();
	int x=0;
	while(ch<'0'||ch>'9') ch=getchar();
	while(ch>='0'&&ch<='9') x=x*10+(ch^48),ch=getchar();
	return x;
}
int main(){
	bool f=0;
	int a=read();
	if(getchar();=='+') f=1;
	int b=read();
	if(f) printf("%d",a+b);
	else printf("%d",a-b);
	putchar('\n');
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:22: error: expected primary-expression before '==' token
   13 |         if(getchar();=='+') f=1;
      |                      ^~
Language: C++

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

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

    int ls[n];
    for (int i = 0; i < n; i++) {
        cin >> ls[i];
    }

    sort(ls, ls + n);

    if (n % 2 == 0) {
        int count = 1;
        for (int i = 0; i < n; i++) {
            if(ls[i] != count) {
                cout << 0;
                return 0;
            }
            if (i % 2 != 0) {
                count += 2;
            }
        }

        cout << fmod(pow(2, n / 2), 1000000000 + 7);
        return 0;
    } else {
        if (ls[0] != 0) {
            cout << 0;
            return 0;
        }

        int count = 2;
        for (int i = 1; i < n; i++) {
            if(ls[i] != count) {
                cout << 0;
                return 0;
            }
            if (i % 2 == 0) {
                count += 2;
            }
        }
        cout << fmod(pow(2, (n - 1) / 2), 1000000000 + 7);
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'sort' was not declared in this scope; did you mean 'sqrt'?
   15 |     sort(ls, ls + n);
      |     ^~~~
      |     sqrt
Language: C++

#include <iostream>

using namespace std;

int main() {
  int a, b, op;
  cin >> a >>op >> b;
  cout << (a op b) << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: expected ')' before 'op'
    8 |   cout << (a op b) << endl;
      |           ~ ^~~
      |             )
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
  int a,b;
  char s;
  cin>>a>>s>>b;
  
  if(s=='+'){
    cout<<a+b<<endl;
  }
  else{
    coiut<<a-b<<endl;
  }
}


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

#include <bits/stdc++.h>
int main(){
  int a,b;
  char s;
  cin>>a>>s>>b;
  
  if(s=='+'){
    cout<<a+b<<endl;
  }
  else{
    coiut<<a-b<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin>>a>>s>>b;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 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:8:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |     cout<<a+b<<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:8:16: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |     cout<<a+b<<endl;
      |                ^~~~
      |                std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:11:5: error: 'coiut' was not declared in this scope
   11 |     coiut<<a-b<<endl;
      |     ^~~~~
a.cc:11:17: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   11 |     coiut<<a-b<<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<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ld long double
#define pb push_back
#define boost ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0)
#define pii pair<ll,ll>
#define forn(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
int main()
{
      boost;
      ll a,b;
      char c;
      cin>>a>>c>>b;
      if(c=='+')
      cout<<(long long inr)a+b<<endl;
      else if(c=='-')
      {
            cout<<a-b<<endl;
      }
}



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

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#include <queue>
#include <set>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)

using namespace std;
typedef long long int lli;

int main(){
	int A,B;
	char op;
	cin>>A>>op>>B;
	if(op=='+')cout<<A+B;
	else cout A-B;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:18: error: expected ';' before 'A'
   19 |         else cout A-B;
      |                  ^~
      |                  ;
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main (){
int a,b;
string op;
cin>>a>>op>>b;
if(op=="-") {
cont<<a-b;}
else{
cout<<a+b;}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:1: error: 'cont' was not declared in this scope; did you mean 'const'?
    9 | cont<<a-b;}
      | ^~~~
      | const
Language: C

#include <stdio.h>
a;b;char c;
main{
scanf("%d%c%d",&a,&c,&b);
if(c-'-')printf("%d\n",a+b);
else printf("%d\n",a-b);
}

Compiler output:
main.c:2:1: warning: data definition has no type or storage class
    2 | a;b;char c;
      | ^
main.c:2:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:2:3: warning: data definition has no type or storage class
    2 | a;b;char c;
      |   ^
main.c:2:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:3:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    3 | main{
      |     ^
Language: C

a;b;char c;
main{
scanf("%d%c%d",&a,&c,&b);
if(c-'-')printf("%d\n",a+b);
else printf("%d\n",a-b);
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a;b;char c;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
    1 | a;b;char c;
      |   ^
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:2:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | main{
      |     ^
Language: C

int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}

Compiler output:
main.c: In function 'main':
main.c:1:12: error: 'a' undeclared (first use in this function)
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |            ^
main.c:1:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:14: error: 'b' undeclared (first use in this function)
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |              ^
main.c:1:23: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
main.c:1:23: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                       ^~~~~
main.c:1:23: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:57: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                                                         ^~~~~~
main.c:1:57: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:57: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:57: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:81: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | int main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                                                                                 ^~~~~~
main.c:1:81: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}

Compiler output:
main.c:1:1: error: return type defaults to 'int' [-Wimplicit-int]
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      | ^~~~
main.c: In function 'main':
main.c:1:8: error: 'a' undeclared (first use in this function)
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |        ^
main.c:1:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:1:10: error: 'b' undeclared (first use in this function)
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |          ^
main.c:1:19: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
main.c:1:19: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                   ^~~~~
main.c:1:19: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:1:53: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                                                     ^~~~~~
main.c:1:53: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:53: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:1:53: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:1:77: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
    1 | main(){a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |                                                                             ^~~~~~
main.c:1:77: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

main{
  a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    1 | main{
      |     ^
Language: C

main{a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    1 | main{a;b;char c;scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |     ^
Language: C

a;b;char c;
main{scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | a;b;char c;
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'a' [-Wimplicit-int]
main.c:1:3: warning: data definition has no type or storage class
    1 | a;b;char c;
      |   ^
main.c:1:3: error: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
main.c:2:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | main{scanf("%d%c%d",&a,&c,&b);if(c-'-')printf("%d\n",a+b);else printf("%d\n",a-b);}
      |     ^
Language: Java

import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
  int A = sc.nextInt();
  String op = sc.next();
  int B = sc.nextInt();
  if(op == "+")System.out.println(A+B);
  else System.out.pritnln(A-B);
}
}

Compiler output:
Main.java:9: error: cannot find symbol
  else System.out.pritnln(A-B);
                 ^
  symbol:   method pritnln(int)
  location: variable out of type PrintStream
1 error
Language: C

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

int main(int argc, char **argv)
{
	char a[100];
	char p[10];
	int b,c,d;
	strcpy(p,"+")
	scanf("%d %s %d",&b,a,&c);
	d = strcmp(p,a);
	if(d==0){
		printf("%d\n", b+c);
	}
	else{
		printf("%d\n", b-c);
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:22: error: expected ';' before 'scanf'
   10 |         strcpy(p,"+")
      |                      ^
      |                      ;
   11 |         scanf("%d %s %d",&b,a,&c);
      |         ~~~~~
Language: C

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int main()
{
	int a,b;
	char str;
	scanf("%d%c%d",&a,&str,&b);
	if(str=='-')
	printf("%d",a-b);
	else
	printf("%d",a+b);
	return 0;
}

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

import java.util.Scanner;

public class abc_A50 {
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		int a=sc.nextInt();
		String s = sc.next();
		int b=sc.nextInt();
		if(s.equals("+")){
			System.out.println(a+b);
		}else if(s.equals("-")){
			System.out.println(a-b);
		}
	}
}


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

#include<iostresm>
using namespace std;
int main(){
 long long int A,B;
 char op;
 cin>>A>>op>>B;
 if(op=='+') cout<<A+B<<endl;
 if(op=='-') cout<<A-B<<endl;
 return 0;
}

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

#include"stdio.h"
int main(){
int N;
scanf("%d",&N);
int po[N];
for(int i=0;i<N;i++){po[i]=(N-i)%2;
po[i]*=2;
if(po[0]==2)po[0]=1;}
for(int i=0;i<N;i++){
int kari;
scanf("%d",&kari);
po[kari]--;}
for(int i=0;i<N;i++)if(po[i]!=0){printf("0\n");return 0;}
int ans=1;
for(int i=0;i<N/2;i++)ans(ans*2)%1000000007;
printf("%d\n",ans);
return 0;}

Compiler output:
main.c: In function 'main':
main.c:15:23: error: called object 'ans' is not a function or function pointer
   15 | for(int i=0;i<N/2;i++)ans(ans*2)%1000000007;
      |                       ^~~
main.c:14:5: note: declared here
   14 | int ans=1;
      |     ^~~
Language: C

#include"stdio.h"
 int main(){int N;scanf("%d",&N);int po[N];for(int i=0;i<N;i++)po[i]=2*((N-i)%2);for(int i=0;i<N;i++){int kari;scanf("%d",&kari);po[kari]--;}for(int i=0;i<N;i++)if(po[i]!=0){printf("0\n");return 0;}int ans=1;for(int i=0;i<N/2;i++)ans=(ans*2)%1000000007;printf("%d\n",ans);return 0;}




Compiler output:
main.c:2:1: error: stray '\302' in program
    2 | <U+00A0>int main(){int N;scanf("%d",&N);int po[N];for(int i=0;i<N;i++)po[i]=2*((N-i)%2);for(int i=0;i<N;i++){int kari;scanf("%d",&kari);po[kari]--;}for(int i=0;i<N;i++)if(po[i]!=0){printf("0\n");return 0;}int ans=1;for(int i=0;i<N/2;i++)ans=(ans*2)%1000000007;printf("%d\n",ans);return 0;}
      | ^~~~~~~~
Language: C

#include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}




Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}
      |                  ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}



Compiler output:
main.c:1:18: warning: extra tokens at end of #include directive
    1 | #include"stdio.h" int main(){int a,b;char nari;scanf("%d %c %d",&a,&nari,&b);if(nari=='+')printf("%d\n",a+b);else printf("%d\n",a-b);return 0;}
      |                  ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C

#include"stdio.h"

int main()
{
int a,b;
char nari;
scanf("%d %c %d",&a,&nari,&b);
if(c=='+')printf("%d\n",a+b);
else printf("%d\n",a-b);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:4: error: 'c' undeclared (first use in this function)
    8 | if(c=='+')printf("%d\n",a+b);
      |    ^
main.c:8:4: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
#include <climits>
#include <string>
#include <string.h>
#include <stdlib.h>
#include <algorithm>
using namespace std;

long long int i,j,ans=1;
 
int ascSort(const void* v1, const void* v2) {
    const int _v1 = *((const int*)v1);
    const int _v2 = *((const int*)v2);
 
    if ( _v1 < _v2 ) {
        return 1;
    } else if ( _v1 > _v2 ) {
        return -1;
    } else {
        return 0;
    }
}
int INF = 1<<29;
const int mod = 1000000007;

int main(){
	long int a,b;
	char s[2];
	cin>>a>>s>>b;
	if(s[0]=='+'){
		cout << a+b<<endl;
	}else{
		cout << a-b<<endl;
	}
	return 0;
}

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

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    String s = sc.next();
    int m = sc.nextInt();
    if(s.equals("+")){
      System.out.println(n + m);
    }else{
      Syetem.out.println(n - m);
    }
  }
}

Compiler output:
Main.java:11: error: package Syetem does not exist
      Syetem.out.println(n - m);
            ^
1 error
Language: C++

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

int main(){
	int a,c;
	string b;
	cin >> a >> b >> c;
	if(b=="+"){
		cout << a+c << endl;
	}else if(b=="-"){a
		cout << a-c << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: expected ';' before 'cout'
   12 |         }else if(b=="-"){a
      |                           ^
      |                           ;
   13 |                 cout << a-c << endl;
      |                 ~~~~
Language: C++

#include <iostream> 
int main(){
int a,b;char c;
std::cin >>a>>c>>b;
std::cout<<(c=='+'?a+b:a-b<<std::endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    5 | std::cout<<(c=='+'?a+b:a-b<<std::endl;
      |                        ~~~^~~~~~~~~~~
a.cc:5:38: error: expected ')' before ';' token
    5 | std::cout<<(c=='+'?a+b:a-b<<std::endl;
      |            ~                         ^
      |                                      )
Language: C++

#include <iostream> 
int main(){
int a,b;char c;
std::cin >>a>>c>>b;
std::cout<<(c=='+'?a+b:a-b)<<std::endl;
resurn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: 'resurn' was not declared in this scope
    6 | resurn 0;
      | ^~~~~~
Language: C++

#include <iostream> 
int main(){
int a,b;char c;
std::cin >>a>>c>>b;
std::cout<<(c=='+'?a+b:a-b<<std::endl;
resurn 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    5 | std::cout<<(c=='+'?a+b:a-b<<std::endl;
      |                        ~~~^~~~~~~~~~~
a.cc:5:38: error: expected ')' before ';' token
    5 | std::cout<<(c=='+'?a+b:a-b<<std::endl;
      |            ~                         ^
      |                                      )
a.cc:6:1: error: 'resurn' was not declared in this scope
    6 | resurn 0;
      | ^~~~~~
Language: C++

main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}


Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}
      | ^~~~
a.cc: In function 'int main()':
a.cc:1:23: error: 'scanf' was not declared in this scope
    1 | main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}
      |                       ^~~~~
a.cc:1:45: error: 'printf' was not declared in this scope
    1 | main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}
      |                                             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(){int a,b;char o;scanf("%d%s%d",a,o,b);printf("%d",o=='+'?a+b:a-b);}
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using number = cpp_int;
//using number = int;
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/
 




number A, B; string op;
//---------------------------------------------------------------------------------------------------
void _main() {
    cin >> A >> op >> B;
    number ans;
    if (op == "+") ans = A + B;
    else ans = A - B;
    cout << ans << endl;
}

Compiler output:
a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    7 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
#define fore(i,a) for(auto &i:a)
#pragma GCC optimize ("-O3")
using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(false); _main(); }
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using number = cpp_int;
//using number = int;
//---------------------------------------------------------------------------------------------------
/*---------------------------------------------------------------------------------------------------
　　　　　　　　　　　 ∧＿∧  
　　　　　 ∧＿∧ 　（´<_｀ ）　 Welcome to My Coding Space!
　　　　 （ ´_ゝ`）　/　 ⌒i     
　　　　／　　　＼　 　  |　|     
　　　 /　　 /￣￣￣￣/　　|  
　 ＿_(__ﾆつ/　    ＿/ .| .|＿＿＿＿  
　 　　　＼/＿＿＿＿/　（u　⊃  
---------------------------------------------------------------------------------------------------*/
 




number A, B; string op;
//---------------------------------------------------------------------------------------------------
void _main() {
    int a, b; cin >> a >> op >> b;
    A = a;
    B = b;
    number ans;
    if (op == "+") ans = A + B;
    else ans = A - B;
    cout << ans << endl;
}

Compiler output:
a.cc:7:10: fatal error: boost/multiprecision/cpp_int.hpp: No such file or directory
    7 | #include <boost/multiprecision/cpp_int.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void) {
	int a, b;
	char op;

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

	printf("%d\n", op == '+' : a + b : a - b);

	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:9:33: error: expected ')' before ':' token
    9 |         printf("%d\n", op == '+' : a + b : a - b);
      |               ~                 ^~
      |                                 )
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    int a, b;
    char op;
    cin >> a >> op >> b;
    if( op == "+" ){
    cout << a+b << endl;
    }else{
    cout << a-b << endl;
    }
    return 0;
    }

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

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    int a, b;
    char op;
    cin >> a >> op >> b;
    if( op == + ){
    cout << a+b << endl;
    }else{
    cout << a-b << endl;
    }
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before ')' token
    7 |     if( op == + ){
      |                 ^
Language: C++

    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    int a, b;
    char op
    cin >> a >> op >> b;
    if( op == + ){
    cout << a+b << endl;
    }else{
    cout << a-b << endl;
    }
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected initializer before 'cin'
    6 |     cin >> a >> op >> b;
      |     ^~~
a.cc:7:9: error: 'op' was not declared in this scope
    7 |     if( op == + ){
      |         ^~
a.cc:7:17: error: expected primary-expression before ')' token
    7 |     if( op == + ){
      |                 ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a, op, b;
cin >> a >> op >> b;
if( op == + ){
cout << a+b << endl;
}else{
cout << a-b << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected primary-expression before ')' token
    6 | if( op == + ){
      |             ^
Language: C++

#include <iostream>
using namespace std;

int main(){
	int a,b;
	char c;

	cin >> a >> c >> b;

	if(c == "+")cout << a+b << endl;
	else if(c == "-")cout << a-b << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |         if(c == "+")cout << a+b << endl;
      |            ~~^~~~~~
a.cc:11:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |         else if(c == "-")cout << a-b << endl;
      |                 ~~^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
int a, op, b;
cin >> a >> op >> b;
if( op == "+" ){
cout << a+b << endl;
}else{
cout << a-b << endl;
}
return 0;
}

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

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

int main(){
	int a,b;
	char c;

	cin >> a >> c >> b;

	if(c == +)cout << a+b << endl;
	else if(c == -)cout << a-b << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:18: error: expected primary-expression before ')' token
   10 |         if(c == +)cout << a+b << endl;
      |                  ^
a.cc:11:23: error: expected primary-expression before ')' token
   11 |         else if(c == -)cout << a-b << endl;
      |                       ^
Language: C++

#include <iosteam>

using namespace std;

int main(){
int a,b;
char op;
cin >> a >> op >> b;
if(op=='+'){
cout << a+b << endl;
}else{
cout << a-b << endl;
}
return 0;
}

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

#define rep(i,n) FOR(i,0,n)
#define pb push_back
#define mp make_pair
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define rmsame(a) sort(all(a)),a.erase(unique(all(a)), a.end())
#define rmvector(a,b) rep(i,a.size())rep(j,b.size())if(a[i]==b[j]){a.erase(a.begin()+i);i--;break;}

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

  ll A,B;
  char op;
  cin >> A >> op >> B;
  if(op=='+') cout << A+B << endl;
  else cout << A-B << endl;
    
  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin.tie(0);
      |   ^~~
a.cc:11:3: error: 'ios' has not been declared
   11 |   ios::sync_with_stdio(false);
      |   ^~~
a.cc:13:3: error: 'll' was not declared in this scope; did you mean 'all'?
   13 |   ll A,B;
      |   ^~
      |   all
a.cc:15:10: error: 'A' was not declared in this scope
   15 |   cin >> A >> op >> B;
      |          ^
a.cc:15:21: error: 'B' was not declared in this scope
   15 |   cin >> A >> op >> B;
      |                     ^
a.cc:16:15: error: 'cout' was not declared in this scope
   16 |   if(op=='+') cout << A+B << endl;
      |               ^~~~
a.cc:16:30: error: 'endl' was not declared in this scope
   16 |   if(op=='+') cout << A+B << endl;
      |                              ^~~~
a.cc:17:8: error: 'cout' was not declared in this scope
   17 |   else cout << A-B << endl;
      |        ^~~~
a.cc:17:23: error: 'endl' was not declared in this scope
   17 |   else cout << A-B << endl;
      |                       ^~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
char s[100];
int ac,a,b,c,d;
int main(){
	gets(s);
	int len=strlen(s);
	d=0; a=b=0;
	for (int i=0; i<len; i++){
		if (s[i]>='0'&&s[i]<='9'){
			if (!d) a=a*10+s[i]-48;
			else b=b*10+s[i]-48;
		}
		else if (s[i]=='+') c=1,d=1;
		else if (s[i]=='-') c=-1,d=1;
	}
	printf("%d\n",a+c*b);
	return 0;
}

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

#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<string>
using namespace std;
char s[100];
int ac,a,b,c,d;
int main(){
	gets(s);
	int len=strlen(s);
	d=0; a=b=0;
	for (int i=0; i<len; i++){
		if (s[i]>='0'&&s[i]<='9'){
			if (!d) a=a*10+s[i]-48;
			else b=b*10+s[i]-48;
		}
		else if (s[i]=='+') c=1,d=1;
		else if (s[i]=='-') c=-1,d=1;
	}
	printf("%d\n",a+c*b);
	return 0;
}

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

#include<cstdio>
#include<cstring>
char s[100],len,i;
int ac,a,b,c,d;
int main(){
	gets(s);
	len=strlen(s);
	d=0; a=b=0;
	for (i=0; i<len; i++){
		if (s[i]>='0'&&s[i]<='9'){
			if (!d) a=a*10+s[i]-48;
			else b=b*10+s[i]-48;
		}
		else if (s[i]=='+') c=1,d=1;
		else if (s[i]=='-') c=-1,d=1;
	}
	printf("%d\n",a+c*b);
	return 0;
}

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

int main(){
	int A, B;
	string op;
	cin >> A >>op>> B;
	if (op == "+"){
		cout << A + B<< endl;
	}
	else{
		cout << A - B << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:9: error: 'string' was not declared in this scope
    3 |         string op;
      |         ^~~~~~
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> A >>op>> B;
      |         ^~~
a.cc:4:20: error: 'op' was not declared in this scope
    4 |         cin >> A >>op>> B;
      |                    ^~
a.cc:6:17: error: 'cout' was not declared in this scope
    6 |                 cout << A + B<< endl;
      |                 ^~~~
a.cc:6:33: error: 'endl' was not declared in this scope
    6 |                 cout << A + B<< endl;
      |                                 ^~~~
a.cc:9:17: error: 'cout' was not declared in this scope
    9 |                 cout << A - B << endl;
      |                 ^~~~
a.cc:9:34: error: 'endl' was not declared in this scope
    9 |                 cout << A - B << endl;
      |                                  ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	long long int a,b;
	char x;
	
	cin>>a;
	cin>>x;
	cin>>b;
	
	if(x == '+')
	    cout<<a+b<<:"\n";
	else
	    cout<<a-b<<"\n";
	return 0;
}


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

#include<stdio.h>
int main(void){
int a,b;
char c;
scanf("%d %c %d",&a,&c,&b);
if(c='+'){pritf("%d",a+b);}
else{printf("%d",a-b);}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:11: error: 'pritf' was not declared in this scope; did you mean 'printf'?
    6 | if(c='+'){pritf("%d",a+b);}
      |           ^~~~~
      |           printf
Language: C++

package main

import (
  "fmt"
)

func main(){
  var a,b int
  var o string
  fmt.Scan(&a, &o, &b)

  if o == "-" {
    fmt.Println(a-b)
  } else if o == "+" {
    fmt.Println(a+b)
  }
  
}

Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int a,b;
cin>>a>>b;
char t;
if(t=="+"){
cout<<a+b;
}
if(t=="-"){
cout<<a-b;
}





}

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

import java.util.*;

public class AdditionandSubtractionEasy {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner s=new Scanner(System.in);
		int A=s.nextInt();
		String op=s.next();
		int B=s.nextInt();
		
		if(op.charAt(0)=='+'){
			System.out.print(A+B);
		}else System.out.print(A-B);
		

	}

}


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

import java.util.Scanner;

public class joisino {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		String op = sc.next();
		int B = sc.nextInt();
		
		if(op.equals("+")){
			System.out.println("A+B");
		}else if(op.equals("-")){
			System.out.print(A - B);
		}
	}
}


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

import java.util.Scanner;

public class joisino {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		String op = sc.next();
		int B = sc.nextInt();
		
		if(op.equals("+")){
			System.out.println("A+B");
		}else if(op.equals("-")){
			System.out.print(A - B);
		}
	}
}

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

import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int A = sc.nextInt();
		char op = sc.next();
		int B = sc.nextInt();
		if(op.equals("+"))System.out.println(A + B);
		if(op.equals("-"))System.out.println(A - B);
	}
}

Compiler output:
Main.java:6: error: incompatible types: String cannot be converted to char
		char op = sc.next();
		                 ^
Main.java:8: error: char cannot be dereferenced
		if(op.equals("+"))System.out.println(A + B);
		     ^
Main.java:9: error: char cannot be dereferenced
		if(op.equals("-"))System.out.println(A - B);
		     ^
3 errors
Language: Java

public static void main (String args[]){
int A=3;
int B=5;
if(op == -){
A op B=answer;
System.out.print(answer);
}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main (String args[]){
              ^
  (use --enable-preview to enable unnamed classes)
Main.java:4: error: illegal start of expression
if(op == -){
          ^
Main.java:5: error: ';' expected
A op B=answer;
    ^
3 errors
Language: C++

(defun main ()
(setq a (read))
(setq or (read-line))
(setq b (read))
(cond ((= or +) (format t "~A~%" (+ a b)))
(= or -) (format " ~A~%" (- a b))))
(main)

Compiler output:
a.cc:1:7: error: expected ')' before 'main'
    1 | (defun main ()
      | ~     ^~~~~
      |       )
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>

using namespace std;

int stoi(std::string str){
  int ret;
  std::stringstream ss;
  ss<<str;
  ss>>ret;
  return ret;
}

vector<string> split(const string &s, char delim) {
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim)) {
    if (!item.empty()) {
            elems.push_back(item);
        }
    }
    return elems;
}


int main()
{
  string Str;
  vector<string> ans;
  int a,b;
  
  getline(cin, Str);


  ans = split(Str,' ');

  
  a = stoi(ans[0]);
  b = stoi(ans[2]);

  if(ans[1]=="+")
    printf("%d\n",a+b);
  else
    printf("%d\n",a-b);

  
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:42:11: error: call of overloaded 'stoi(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' is ambiguous
   42 |   a = stoi(ans[0]);
      |       ~~~~^~~~~~~~
a.cc:9:5: note: candidate: 'int stoi(std::string)'
    9 | int stoi(std::string str){
      |     ^~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
a.cc:43:11: error: call of overloaded 'stoi(__gnu_cxx::__alloc_traits<std::allocator<std::__cxx11::basic_string<char> >, std::__cxx11::basic_string<char> >::value_type&)' is ambiguous
   43 |   b = stoi(ans[2]);
      |       ~~~~^~~~~~~~
a.cc:9:5: note: candidate: 'int stoi(std::string)'
    9 | int stoi(std::string str){
      |     ^~~~
/usr/include/c++/14/bits/basic_string.h:4164:3: note: candidate: 'int std::__cxx11::stoi(const std::string&, std::size_t*, int)'
 4164 |   stoi(const string& __str, size_t* __idx = 0, int __base = 10)
      |   ^~~~
Language: C

#include <iostream>
#include <cstdio>
#include <string>
#include <sstream>
#include <vector>

using namespace std;

int stoi(std::string str){
  int ret;
  std::stringstream ss;
  ss<<str;
  ss>>ret;
  return ret;
}

vector<string> split(const string &s, char delim) {
    vector<string> elems;
    stringstream ss(s);
    string item;
    while (getline(ss, item, delim)) {
    if (!item.empty()) {
            elems.push_back(item);
        }
    }
    return elems;
}


int main()
{
  string Str;
  vector<string> ans;
  int a,b;
  
  getline(cin, Str);


  ans = split(Str,' ');

  
  a = stoi(ans[0]);
  b = stoi(ans[2]);

  if(ans[1]=="+")
    printf("%d\n",a+b);
  else
    printf("%d\n",a-b);

  
  return 0;
}


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

package main

import (
	"fmt"
)

func main() {
	var x, y int64
	var s string
	fmt.Scan(&x, &s, &y)
	var ans int64
	if s == "+" {
		ans = x + y
	} else {
		ans = x - y
	}
	fmt.Println(ans)
}

func Min(x, y int64) int64 {
	if x < y {
		return x
	}
	return y
}

func Max(x, y int64) int64 {
	if x > y {
		return x
	}
	return y
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
a.cc:20:1: error: 'func' does not name a type
   20 | func Min(x, y int64) int64 {
      | ^~~~
a.cc:27:1: error: 'func' does not name a type
   27 | func Max(x, y int64) int64 {
      | ^~~~
Language: Java

public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		System.out.print(" ");
		Scanner sc = new Scanner(System.in);

		//人数
		int N = sc.nextInt();
		int[] A = new int[N];
		//絶対値の入力
		int[] a = new int[N];
        double P;
		for(int i = 0; i < N ;i++){

			a[i] = sc.nextInt();
			A[i] = Math.abs((2 * i) - N + 1);
		}
		Arrays.sort(A);
		Arrays.sort(a);
		if(Arrays.equals(A,a)){
			 P = Math.floor(N/2)  *  Math.floor(N/2);
			 
		}else{
			 P = 0;
		}
		System.out.println(P / (Math.pow(10, 9) + 7));
	}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public static void main(String[] args) {
              ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: C++

#include<iostream>
#include<string>
using namespace std;
string S;int a,b;
int main(){
	cin>>a>>S>>b;
	if(S=="+")cout<a+b<<endl;
	else cout<<a-b<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:27: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
    7 |         if(S=="+")cout<a+b<<endl;
      |                        ~~~^~~~~~
Language: C++

#include <bits/stdc++.h>
#include <cstdio>
using namespace std;
typedef long long ll;
const int N=2e3;

int main()
{
	char s[N];
	while(gets(s))
	{
		int op=0;
		int a=0,b=0;
		for(int i=0;i<strlen(s);i++)
		{
			if(s[i]==' ')
			continue;
			if(s[i]=='+')
			{
				op=1;
				continue;
			}
			if(s[i]=='-')
			{
				op=2;
				continue;
			}
			if(op==0)
			a=a*10+s[i]-'0';
			else
			b=b*10+s[i]-'0';
		}
		if(op==1)
		cout<<ll(a+b)<<endl;
		else
		cout<<a-b<<endl;
	}
	return 0;	
} 

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

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=2e3;

int main()
{
	char s[N];
	while(gets(s))
	{
		int op=0;
		int a=0,b=0;
		for(int i=0;i<strlen(s);i++)
		{
			if(s[i]==' ')
			continue;
			if(s[i]=='+')
			{
				op=1;
				continue;
			}
			if(s[i]=='-')
			{
				op=2;
				continue;
			}
			if(op==0)
			a=a*10+s[i]-'0';
			else
			b=b*10+s[i]-'0';
		}
		if(op==1)
		cout<<ll(a+b)<<endl;
		else
		cout<<a-b<<endl;
	}
	return 0;	
} 

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

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
        // TODO code application logic here
        QuestionB a = new QuestionB();
        a.print();                
    }

public class QuestionA {

    private static int a;
    private static int b;
    String op;
    Scanner sc = new Scanner(System.in);

    public QuestionA() {
        this.a = sc.nextInt();
        this.op = sc.next();
        this.b = sc.nextInt();
    }
    
    public void print(){
        int c = 0;
        switch(op){
            case "+": c = a + b; break;
            case "-": c = a - b; break;
            case "*": c = a * b; break;
            case "/": c = a / b; break;                
        }
        System.out.println(c);
    }
}
}


Compiler output:
Main.java:6: error: cannot find symbol
        QuestionB a = new QuestionB();
        ^
  symbol:   class QuestionB
  location: class Main
Main.java:6: error: cannot find symbol
        QuestionB a = new QuestionB();
                          ^
  symbol:   class QuestionB
  location: class Main
2 errors
Language: C

#include<stdio.h>
int main(void)
{
 int A,B,result;
 char op;

 scanf("%d %c %d",&A,&op,&B);
 
if(op == '+');
 {
  result = A + B;
 }
 else
 {
  result = A - B;
 }

 printf("%d",result);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:13:2: error: 'else' without a previous 'if'
   13 |  else
      |  ^~~~
Language: C

#include<stdio.h>
int main(void)
{
 int A,B,result;
 char op;

 scanf("%d,%s,%d",&A,&op,&B);
 
if(op == "+");
 {
  result = A + B;
 }
 else
 {
  result = A - B;
 }

 printf("%d",result);
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: warning: comparison between pointer and integer
    9 | if(op == "+");
      |       ^~
main.c:13:2: error: 'else' without a previous 'if'
   13 |  else
      |  ^~~~
Language: C

#include<stdio.h>
int main(void)
{
 int A,B,result;
 char op;

 scanf("%d,%s,%d",&A,&op,&B);
 
if(op == "+");
 {
  result = A + B;
 }
 else
 {
  result = A - B;
 }
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:7: warning: comparison between pointer and integer
    9 | if(op == "+");
      |       ^~
main.c:13:2: error: 'else' without a previous 'if'
   13 |  else
      |  ^~~~
Language: Java

import java.util.*;
public class Main {
   public static void main(String[] args) {
      Scanner sc = new Scanner(System.in())
      int a = sc.nextInt();
      String op = sc.next();
      int b = sc.nextInt();
      if (op.equals("+")) {
         System.out.println(a + b);
      }else if (op.equals("-")) {
         System.out.println(a - b);
      }else {
      }
   }
}

Compiler output:
Main.java:4: error: ';' expected
      Scanner sc = new Scanner(System.in())
                                           ^
1 error
Language: Java

		

public class Test002 {

	public static void main(String[] args) {

Scanner sc = new Scanner(System.in);
		String line = sc.nextLine();
		String[] N = line.split(" ");
		int a=Integer.parseInt(N[0]);
	    int b=Integer.parseInt(N[2]);
		
		
		for(int i=0; i<3; i++){
			
			char T = N[i].charAt(0) ;
			
			if(N[1].equals("+")){
			
				System.out.println(a+b);
				break;
			}else if(N[1].equals("-")){
				
				System.out.println(a-b);
				break;
			}
		}
		
	}

}


Compiler output:
Main.java:3: error: class Test002 is public, should be declared in a file named Test002.java
public class Test002 {
       ^
Main.java:7: error: cannot find symbol
Scanner sc = new Scanner(System.in);
^
  symbol:   class Scanner
  location: class Test002
Main.java:7: error: cannot find symbol
Scanner sc = new Scanner(System.in);
                 ^
  symbol:   class Scanner
  location: class Test002
3 errors