criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;
class Main{
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int X = scanner.nextInt();
        int Y = scanner.nextInt();
        int x = round(X + Y/2);
        System.out.println(x);
    }
}

Compiler output:
Main.java:7: error: cannot find symbol
        int x = round(X + Y/2);
                ^
  symbol:   method round(int)
  location: class Main
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main{
        Scanner scanner = new Scanner(System.in);
        int X = scanner.nextInt();
        int Y = scanner.nextInt();
        int x = round(X + Y/2);
        System.out.println(x);
    }
}

Compiler output:
Main.java:3: error: '(' expected
    public static void main{
                           ^
1 error
Language: Java

import java.util.Scanner;
class Main{
    public static void main{
        Scanner scanner = new Scanner(System.in);
        int X = scanner.nextInt();
        int Y = scanner.nextInt();
        int x = X + Y/2;
        System.out.println(x);
    }
}

Compiler output:
Main.java:3: error: '(' expected
    public static void main{
                           ^
1 error
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nectInt();
		System.out.println(a + (b/2));
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		int b = sc.nectInt();
		          ^
  symbol:   method nectInt()
  location: variable sc of type Scanner
1 error
Language: C++

#include<iostream>

int main(){
    int X,Y;
    cin >> X >> Y;
    cout << X+Y/2 <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> X >> Y;
      |     ^~~
      |     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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << X+Y/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:6:21: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout << X+Y/2 <<endl;
      |                     ^~~~
      |                     std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
int x,y;
  cin>>x>>y;
  cout<<x+(y/2);<<endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclucde; did you mean #include?
    1 | #inclucde<bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin>>x>>y;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #inclucde<bits/stdc++.h>
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout<<x+(y/2);<<endl;
      |   ^~~~
a.cc:7:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:7:17: error: expected primary-expression before '<<' token
    7 |   cout<<x+(y/2);<<endl;
      |                 ^~
a.cc:7:19: error: 'endl' was not declared in this scope
    7 |   cout<<x+(y/2);<<endl;
      |                   ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclucde<bits/stdc++.h>
Language: C++

#include <iostream>
using namespace std;
int main(){
  int x,y,s;
  cin>>X>>Y;
  s=X+Y/2;
  cout<<s;
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: 'X' was not declared in this scope
    5 |   cin>>X>>Y;
      |        ^
a.cc:5:11: error: 'Y' was not declared in this scope
    5 |   cin>>X>>Y;
      |           ^
Language: C++

#include<iostream>
using.namespace.std;

int main()
{
int x, y;
cin >> x;
cin >> y;
print("%d", x+y/2);
return 0;
}

Compiler output:
a.cc:2:6: error: expected nested-name-specifier before '.' token
    2 | using.namespace.std;
      |      ^
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin >> x;
      | ^~~
      | 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:9:1: error: 'print' was not declared in this scope; did you mean 'printf'?
    9 | print("%d", x+y/2);
      | ^~~~~
      | printf
Language: C++

#include<iostream>
using.namespace.std;

int main()
{
int x, y;
cin >> x;
cin >> y;
print("%d", x+y/2);
}

Compiler output:
a.cc:2:6: error: expected nested-name-specifier before '.' token
    2 | using.namespace.std;
      |      ^
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin >> x;
      | ^~~
      | 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:9:1: error: 'print' was not declared in this scope; did you mean 'printf'?
    9 | print("%d", x+y/2);
      | ^~~~~
      | printf
Language: Java

class Main{
    public static void main(String args){
    Scanner sc =new Scanner(System.in);
    int x = sc.read();
    int y = sc.read();

    System.out.print(x + (y /2));
    }
}

Compiler output:
Main.java:3: error: cannot find symbol
    Scanner sc =new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
    Scanner sc =new Scanner(System.in);
                    ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: C++

# -*- coding: utf-8 -*-
# スペース区切りの整数の入力
x, y = map(int, input().split())
z = x/2 + y
# 出力
print("{} {}".format(z))

Compiler output:
a.cc:1:3: error: invalid preprocessing directive #-
    1 | # -*- coding: utf-8 -*-
      |   ^
a.cc:2:3: error: invalid preprocessing directive #\U000030b9\U000030da\U000030fc\U000030b9\U0000533a\U00005207\U0000308a\U0000306e\U00006574\U00006570\U0000306e\U00005165\U0000529b
    2 | # スペース区切りの整数の入力
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:5:3: error: invalid preprocessing directive #\U000051fa\U0000529b
    5 | # 出力
      |   ^~~~
a.cc:3:1: error: 'x' does not name a type
    3 | x, y = map(int, input().split())
      | ^
Language: C++

#include<iostream>

int main(){
    int x,y;
    cin >> x;
    cin >> y;
    cout << (x+y)/2;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     cin >> x;
      |     ^~~
      |     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:7:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |     cout << (x+y)/2;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.Scanner;
public class BeginnerContest {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
       
        int X = sc.nextInt();
        int Y = sc.nextInt();
        System.out.println(X + (Y/2));
    }

}

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

#include<iostream> int main(){int X, Y;  std::cin >> X >> Y;std::cout << X + Y/ 2 << std::endl;return 0;}

Compiler output:
a.cc:1:20: warning: extra tokens at end of #include directive
    1 | #include<iostream> int main(){int X, Y;  std::cin >> X >> Y;std::cout << X + Y/ 2 << std::endl;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 "bits/stdc++.h"

using namespace std;

#define print(s) cout << (s) << endl;
#define sp(x) cout<<setprecision(x);
#define rep(i,n)  for (int i = 0; i < (n); i++)
#define all(a) a.begin(), (a).end()
#define gre(t) greater<t>()
 
int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n, t, a;
    cin >> n >> t >> a;
    vector<int> a(n);

    rep(i,n){
        cin >> a[i];
    }
    int ans;
    double best = inf;
    double tem = inf;
    rep(i,n){
        tem = abs(a - (a[i]*0.006));
        if(tem < best){
           best = tem; 
           ans = i+1;
        }
    }
    print(ans);


}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:17: error: conflicting declaration 'std::vector<int> a'
   16 |     vector<int> a(n);
      |                 ^
a.cc:14:15: note: previous declaration as 'int a'
   14 |     int n, t, a;
      |               ^
a.cc:19:17: error: invalid types 'int[int]' for array subscript
   19 |         cin >> a[i];
      |                 ^
a.cc:22:19: error: 'inf' was not declared in this scope; did you mean 'ynf'?
   22 |     double best = inf;
      |                   ^~~
      |                   ynf
a.cc:25:25: error: invalid types 'int[int]' for array subscript
   25 |         tem = abs(a - (a[i]*0.006));
      |                         ^
Language: C

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

int main() {
	int x = 0;
	int y = 0;
	scanf_s("%d", &x);
	scanf_s("%d", &y);
	printf_s("%d", (x + y / 2));
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:9: error: implicit declaration of function 'scanf_s'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    7 |         scanf_s("%d", &x);
      |         ^~~~~~~
      |         scanf
main.c:9:9: error: implicit declaration of function 'printf_s'; did you mean 'printf'? [-Wimplicit-function-declaration]
    9 |         printf_s("%d", (x + y / 2));
      |         ^~~~~~~~
      |         printf
Language: C++

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

int main() {
	int x = 0;
	int y = 0;
	scanf_s("%d", &x);
	scanf_s("%d", &y);
	printf_s("%d", (x + y / 2));
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
    7 |         scanf_s("%d", &x);
      |         ^~~~~~~
      |         scanf
a.cc:9:9: error: 'printf_s' was not declared in this scope; did you mean 'printf'?
    9 |         printf_s("%d", (x + y / 2));
      |         ^~~~~~~~
      |         printf
Language: C

#include <stdio.h>
int main()
{
    int x, y;
    scanf("%d %d", &x, &y);
    pritnf("%d\n", x + y / 2);
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:5: error: implicit declaration of function 'pritnf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |     pritnf("%d\n", x + y / 2);
      |     ^~~~~~
      |     printf
Language: Java

import java.util.Scanner;
class mondai{
  
 public static void main(String[] args){
   Scanner stdIn=new Scanner(System.in);
   System.out.print("電鉄の運賃は:");
   int X=stdIn.nextInt;
   System.out.print("バスの運賃は");
   int Y=stdIn.nextInt;
   
  System.out.println("合計運賃は"+(X+(Y/2))+"です。");
  }
  }
   


Compiler output:
Main.java:7: error: cannot find symbol
   int X=stdIn.nextInt;
              ^
  symbol:   variable nextInt
  location: variable stdIn of type Scanner
Main.java:9: error: cannot find symbol
   int Y=stdIn.nextInt;
              ^
  symbol:   variable nextInt
  location: variable stdIn of type Scanner
2 errors
Language: Java

import java util.Scanner
class mondai{
  
 public static void main(String[] args){
   Scanner stdIn=new Scanner(System.in);
   System.out.print("電鉄の運賃は："）；
   int X=stdIn.nextInt;
   System.out.print("バスの運賃は");
   int Y=stdIn.nextInt;
   
  System.out.println("合計運賃は"+(X+(Y/2))+"です。");
  }
  }
   

Compiler output:
Main.java:1: error: '.' expected
import java util.Scanner
           ^
Main.java:1: error: ';' expected
import java util.Scanner
                        ^
Main.java:6: error: illegal character: '\uff09'
   System.out.print("???????"??
                             ^
Main.java:6: error: illegal character: '\uff1b'
   System.out.print("???????"??
                              ^
4 errors
Language: C++

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


using namespace std;

float tem(int T0,int X0){

  return T0-X0*0.006;
}

float myabs(float a,float b){
if(a-b<=0) return b-a;
else return a-b;
  
}


int main(){
int mark=1;
int N;
float T;
float A;
cin>>N;
cin>>T>>A;
vector <float> H(N+1,0);
for (int input=1;input<=N;input++)
      {
        cin>>H[input];
      }

float gosamin=myabs(tem(T,H.at(1)-A));
for(int each=1;each<=N;each ++){
      gosamin=min(gosamin,myabs(tem(T,H.at(each))-A));
      if(gosamin==tem(T,H.at(each))) mark=each;
      
    }
    cout<<mark;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:33:20: error: too few arguments to function 'float myabs(float, float)'
   33 | float gosamin=myabs(tem(T,H.at(1)-A));
      |               ~~~~~^~~~~~~~~~~~~~~~~~
a.cc:13:7: note: declared here
   13 | float myabs(float a,float b){
      |       ^~~~~
a.cc:35:32: error: too few arguments to function 'float myabs(float, float)'
   35 |       gosamin=min(gosamin,myabs(tem(T,H.at(each))-A));
      |                           ~~~~~^~~~~~~~~~~~~~~~~~~~~
a.cc:13:7: note: declared here
   13 | float myabs(float a,float b){
      |       ^~~~~
Language: C

#include <stdio.h>

int main(void){
    int x,y;
   scannt("%d %d", &x,&y);

   printf("%d", x+y/2);
}

Compiler output:
main.c: In function 'main':
main.c:5:4: error: implicit declaration of function 'scannt'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    5 |    scannt("%d %d", &x,&y);
      |    ^~~~~~
      |    scanf
Language: C++

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

int main() {
  int x, int y;
  cin >> x >> y;
  cout << x + y/2 << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:10: error: expected unqualified-id before 'int'
    5 |   int x, int y;
      |          ^~~
a.cc:6:15: error: 'y' was not declared in this scope
    6 |   cin >> x >> y;
      |               ^
Language: C++

#include <iostream>
#incclude <cstdio>
#include <cstdlib>
using namespace std;

int main()
{
int x,y;
int res;
while(scanf("%d%d",&x,&y)==2)
{
res=x+y/2;
printf("%d\n",res);
}
return 0;
}

Compiler output:
a.cc:2:2: error: invalid preprocessing directive #incclude; did you mean #include?
    2 | #incclude <cstdio>
      |  ^~~~~~~~
      |  include
Language: C++

#include <iostream>

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


Compiler output:
a.cc: In function 'int main()':
a.cc:5:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     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:6:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |     cout << a + (b / 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:6:28: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |     cout << a + (b / 2) << endl;
      |                            ^~~~
      |                            std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C

#include <stdio.h>
int main(void){
  int a,b;
  scanf("%d"&a);
  scanf("%d"&b);
  printf("%d\n",a+b/2);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: invalid operands to binary & (have 'char *' and 'int')
    4 |   scanf("%d"&a);
      |         ~~~~^
      |         |
      |         char *
main.c:5:13: error: invalid operands to binary & (have 'char *' and 'int')
    5 |   scanf("%d"&b);
      |         ~~~~^
      |         |
      |         char *
Language: C

#include <stdio.h>
int main(void){
  int a,b;
  scanf("%d"&a);
  scanf("%d"&b);
  printf("%d\n"b/2+a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: invalid operands to binary & (have 'char *' and 'int')
    4 |   scanf("%d"&a);
      |         ~~~~^
      |         |
      |         char *
main.c:5:13: error: invalid operands to binary & (have 'char *' and 'int')
    5 |   scanf("%d"&b);
      |         ~~~~^
      |         |
      |         char *
main.c:6:16: error: expected ')' before 'b'
    6 |   printf("%d\n"b/2+a);
      |         ~      ^
      |                )
Language: C

#include <stdio.h>
int main(void){
  int a,b;
  scanf("%d"&a);
  scanf("%d"&b);
  printf("%d\n",b/2+a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: invalid operands to binary & (have 'char *' and 'int')
    4 |   scanf("%d"&a);
      |         ~~~~^
      |         |
      |         char *
main.c:5:13: error: invalid operands to binary & (have 'char *' and 'int')
    5 |   scanf("%d"&b);
      |         ~~~~^
      |         |
      |         char *
Language: C

#include <stdio.h>
int main(void){
  int a,b;
  scanf("%d"&a);
  scanf("%d"&b);
  printf("%d",b/2+a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:13: error: invalid operands to binary & (have 'char *' and 'int')
    4 |   scanf("%d"&a);
      |         ~~~~^
      |         |
      |         char *
main.c:5:13: error: invalid operands to binary & (have 'char *' and 'int')
    5 |   scanf("%d"&b);
      |         ~~~~^
      |         |
      |         char *
Language: C

#include <stdio.h>
int main(void){
  int a,b;
  scanf("%d",a);
  scanf("%d",b);
  printf("%d",b\2+a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:16: error: stray '\' in program
    6 |   printf("%d",b\2+a);
      |                ^
main.c:6:16: error: expected ')' before numeric constant
    6 |   printf("%d",b\2+a);
      |         ~      ^~
      |                )
Language: C

#include <stdio.h>
int main(void){
  int a,b;
  scanf("%d",a);
  scanf("%d",b);
  prrintf("%d",b\2+a);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: implicit declaration of function 'prrintf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    6 |   prrintf("%d",b\2+a);
      |   ^~~~~~~
      |   printf
main.c:6:17: error: stray '\' in program
    6 |   prrintf("%d",b\2+a);
      |                 ^
main.c:6:17: error: expected ')' before numeric constant
    6 |   prrintf("%d",b\2+a);
      |          ~      ^~
      |                 )
Language: C++

#include ＜stdio.h＞
#include ＜iostream＞
using namespace std;

int main()
{

  int a,b;
  while(cin＞＞a＞＞b)
    {
    cout＜＜a+b/2＜＜endl;
    }

  return 0;
}



Compiler output:
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include ＜stdio.h＞
      |          ^~~~~~~
a.cc:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include ＜iostream＞
      |          ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin\U0000ff1e\U0000ff1ea\U0000ff1e\U0000ff1eb' was not declared in this scope
    9 |   while(cin＞＞a＞＞b)
      |         ^~~~~~~~~~~~~
a.cc:11:5: error: 'cout\U0000ff1c\U0000ff1ca' was not declared in this scope
   11 |     cout＜＜a+b/2＜＜endl;
      |     ^~~~~~~~~
a.cc:11:17: error: unable to find numeric literal operator 'operator""\U0000ff1c\U0000ff1cendl'
   11 |     cout＜＜a+b/2＜＜endl;
      |                 ^~~~~~~~~
Language: C++

#include＜stdio.h＞
#include＜iostream＞
using namespace std;

int main()
{
  int a,b;
  while(cin＞＞a＞＞b)
    {
    cout＜＜a+b/2＜＜endl;
    }
  
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #include\U0000ff1cstdio
    1 | #include＜stdio.h＞
      |  ^~~~~~~~~~~~~~
a.cc:2:2: error: invalid preprocessing directive #include\U0000ff1ciostream\U0000ff1e
    2 | #include＜iostream＞
      |  ^~~~~~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin\U0000ff1e\U0000ff1ea\U0000ff1e\U0000ff1eb' was not declared in this scope
    8 |   while(cin＞＞a＞＞b)
      |         ^~~~~~~~~~~~~
a.cc:10:5: error: 'cout\U0000ff1c\U0000ff1ca' was not declared in this scope
   10 |     cout＜＜a+b/2＜＜endl;
      |     ^~~~~~~~~
a.cc:10:17: error: unable to find numeric literal operator 'operator""\U0000ff1c\U0000ff1cendl'
   10 |     cout＜＜a+b/2＜＜endl;
      |                 ^~~~~~~~~
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		System.out.println(sc.nextInt() + sc.nextInt()/2);
	}
}


Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> num = new ArrayList<Integer>();
		ArrayList<String> param = new ArrayList<String>();
		int system = 2; // 文字の空白区切り 0:ON 1:OFF 2:(※数字の場合)

		while (sc.hasNext()) {

			if (system == 0)
				param.add(sc.next());
			if (system == 1)
				param.add(sc.nextLine());
			if (system == 2)
				num.add(sc.nextInt());
		}
		//param.remove(0); //不要な文字削除用
		//num.remove(0);
		Method(num, param);
	}

	static void Method(ArrayList<Integer> num, ArrayList<String> param) {
		System.out.println(num.get(0) + (num.get(1) / 2));
	}
}

Compiler output:
Main.java:22: error: cannot find symbol
	static void Method(ArrayList<Integer> num, ArrayList<String> param) {
	                   ^
  symbol:   class ArrayList
  location: class Main
Main.java:22: error: cannot find symbol
	static void Method(ArrayList<Integer> num, ArrayList<String> param) {
	                                           ^
  symbol:   class ArrayList
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
		ArrayList<Integer> num = new ArrayList<Integer>();
		^
  symbol:   class ArrayList
  location: class Main
Main.java:4: error: cannot find symbol
		ArrayList<Integer> num = new ArrayList<Integer>();
		                             ^
  symbol:   class ArrayList
  location: class Main
Main.java:5: error: cannot find symbol
		ArrayList<String> param = new ArrayList<String>();
		^
  symbol:   class ArrayList
  location: class Main
Main.java:5: error: cannot find symbol
		ArrayList<String> param = new ArrayList<String>();
		                              ^
  symbol:   class ArrayList
  location: class Main
8 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    
    Scanner sc = new Scanner(System.In);
    
    int X = sc.nextInt();
    int Y = sc.neztInt();
    
    int out = X + Y / 2;
    System.out.println(out);
  }
}

    
    
  

Compiler output:
Main.java:6: error: cannot find symbol
    Scanner sc = new Scanner(System.In);
                                   ^
  symbol:   variable In
  location: class System
Main.java:9: error: cannot find symbol
    int Y = sc.neztInt();
              ^
  symbol:   method neztInt()
  location: variable sc of type Scanner
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		ex1();
	}
	
	public static void ex1() {
		int X=0;
		int Y=0;
		
        
        try{
            Scanner sc = new Scanner(System.in);
            //String  = br.readLine();
           X = sc.nextInt();
           Y = sc.nextInt();
        }catch(Exception e){
        }
        
        System.out.println(X+Y/2);
	}

Compiler output:
Main.java:26: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		ex1();
	}
	
	public static void ex1() {
		int X=0;
		int Y=0;
		
        
        try{
            Scanner sc = new Scanner(System.in);
            //String  = br.readLine();
           int X = sc.nextInt();
           int Y = sc.nextInt();
        }catch(Exception e){
        }
        
        System.out.println(X+Y/2);
	}

Compiler output:
Main.java:26: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{

	public static void main(String[] args) {
		
		ex1();
		ex2();
	}
	
	public static void ex1() {
		int X=0;
		int Y=0;
		
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
        try{
            //String  = br.readLine();
            X = Integer.parseInt(br.readLine());
            Y = Integer.parseInt(br.readLine());
        }catch(Exception e){
        }
        
        System.out.println(X+Y/2);
	}
}

Compiler output:
Main.java:9: error: cannot find symbol
		ex2();
		^
  symbol:   method ex2()
  location: class Main
1 error
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
int X;
int y;
cin>>X>>Y;
int a = X+Y/2;
cout<<a;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'Y' was not declared in this scope
    7 | cin>>X>>Y;
      |         ^
Language: C++

#include<stdio.h>
using namespace std;

int main(){
	int T;
	int B;
	cin>>T>>B;
	cout<<T+B/2;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'cin' was not declared in this scope
    7 |         cin>>T>>B;
      |         ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include<stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:8:9: error: 'cout' was not declared in this scope
    8 |         cout<<T+B/2;
      |         ^~~~
a.cc:8:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C

#include<stdio.h>
void main() {
  int X=0,Y=0;
  scanf(%d %d,X,Y);
  printf(%d,X+Y/2);
}


Compiler output:
main.c: In function 'main':
main.c:4:9: error: expected expression before '%' token
    4 |   scanf(%d %d,X,Y);
      |         ^
main.c:5:10: error: expected expression before '%' token
    5 |   printf(%d,X+Y/2);
      |          ^
Language: C

#include<studio.h>
void main() {
  int X=0,Y=0;
  scanf(%d %d,X,Y);
  printf(%d,X+Y/2);
}

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

# include <cstdio>
# include <vector>
# include <algorithm>
using namespace std ;
typedef long long ll ;
# define rep (i , n ) for ( int i =0; i < n ; i ++)
int N , M ;
int P [100000] , Y [100000];
vector < int > yd [100001];
int main ()
{
scanf ("%d%d" ,&N ,& M );

for(int i=0;i<M;i++){
    scanf ("% d % d " ,& P [ i ] ,& Y [ i ]) ;
     yd [ P [ i ]]. push_back ( Y [ i ]);
}
//yd 
rep (i , N ) sort ( yd [ i +1]. begin () , yd [ i +1]. end ());
for (int i=0; i< M;i++ ) {
    printf ("%012 lld \ n " , ll ( P [ i ])*1000000+ int ( lower_bound ( yd [ P [ i ]].begin () , yd [ P [ i ]]. end () , Y [ i ]) - yd [ P [ i ]]. begin ())+1);
//lower_bnd Y[i]以上のイテレータを返す

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'i' was not declared in this scope
    6 | # define rep (i , n ) for ( int i =0; i < n ; i ++)
      |               ^
a.cc:19:1: note: in expansion of macro 'rep'
   19 | rep (i , N ) sort ( yd [ i +1]. begin () , yd [ i +1]. end ());
      | ^~~
a.cc:6:19: error: 'n' was not declared in this scope
    6 | # define rep (i , n ) for ( int i =0; i < n ; i ++)
      |                   ^
a.cc:19:1: note: in expansion of macro 'rep'
   19 | rep (i , N ) sort ( yd [ i +1]. begin () , yd [ i +1]. end ());
      | ^~~
a.cc:21:13: warning: unknown escape sequence: '\040'
   21 |     printf ("%012 lld \ n " , ll ( P [ i ])*1000000+ int ( lower_bound ( yd [ P [ i ]].begin () , yd [ P [ i ]]. end () , Y [ i ]) - yd [ P [ i ]]. begin ())+1);
      |             ^~~~~~~~~~~~~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: C++

# include <cstdio>
# include <vector>
# include <algorithm>
using namespace std ;
typedef long long ll ;
# define rep (i , n ) for ( int i =0; i < n ; i ++)
int N , M ;
int P [100000] , Y [100000];
vector < int > yd [100001];
int main ()
{
scanf ("% d % d " ,&N ,& M );
rep (i , M ) 
for(int i=0;i<M;i++){
    scanf ("% d % d " ,& P [ i ] ,& Y [ i ]) ;
     yd [ P [ i ]]. push_back ( Y [ i ]);
}
//yd 
rep (i , N ) sort ( yd [ i +1]. begin () , yd [ i +1]. end ());
for (int i=0; i< M;i++ ) {
    printf ("%012 lld \ n " , ll ( P [ i ])*1000000+ int ( lower_bound ( yd [ P [ i ]].begin () , yd [ P [ i ]]. end () , Y [ i ]) - yd [ P [ i ]]. begin ())+1);
//lower_bnd Y[i]以上のイテレータを返す

}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'i' was not declared in this scope
    6 | # define rep (i , n ) for ( int i =0; i < n ; i ++)
      |               ^
a.cc:13:1: note: in expansion of macro 'rep'
   13 | rep (i , M )
      | ^~~
a.cc:6:19: error: 'n' was not declared in this scope
    6 | # define rep (i , n ) for ( int i =0; i < n ; i ++)
      |                   ^
a.cc:13:1: note: in expansion of macro 'rep'
   13 | rep (i , M )
      | ^~~
a.cc:21:13: warning: unknown escape sequence: '\040'
   21 |     printf ("%012 lld \ n " , ll ( P [ i ])*1000000+ int ( lower_bound ( yd [ P [ i ]].begin () , yd [ P [ i ]]. end () , Y [ i ]) - yd [ P [ i ]]. begin ())+1);
      |             ^~~~~~~~~~~~~~~
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: C++

#include <cstdio>
 
int N, T, A, X,z,c;
 
int main(){
    scanf("%d%d%d",&N,&T,&A);
    int zz = 300000000;
    for (int i=1;i <= N;i++){
       scanf("%d",&X);
       int d=(T*1000-X*6)-1000*A;
     
       if(zz >= abs(d)) zz=d, c=i;
 
    }
    printf("%d\n", c);
}
    

    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:17: error: 'abs' was not declared in this scope
   12 |        if(zz >= abs(d)) zz=d, c=i;
      |                 ^~~
Language: C++

# include < cstdio >
int N ,T ,A , X ;
int main ()
{
scanf ("% d % d % d " ,&N ,& T ,& A );
int res =0;
int cc =1 < <30;
for ( int i =1; i <= N ; i ++)
{
scanf ("% d " ,& X );
int d =( T *1000 - X *6) - A *1000;
if (d <0) d = - d ;
if ( cc > d ) cc =d , res = i ;
}
printf ("% d \ n " , res );
}


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

#include <cstdio>
#include <cstdlib>
#include <algorithm>

int N, T, A, X,z,c;

int main(){
    scanf("%d%d%d",&N,&T,&A);
    int zz = 300000000;
    for (int i=0;i <= N;i++){
       scanf("%d",&X);
       int d=(T*1000-X*6);
       if(zz <= (abs(d-1000*A)) ) c=i;

    }
    printf("%d\n", i);
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'i' was not declared in this scope
   16 |     printf("%d\n", i);
      |                    ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>

int N, T, A, X,z;

int main(){
    scanf("%d%d%d",&N,&T,&A);
    int zz = 300000000;
    for (int i=0;i <= N;i++){
       scanf("%d",&X);
       int d=(T*1000-X*6);
       if(zz <= (abs(d-1000*A)) ) int c=i;

    }
    printf("%d\n", c);
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'c' was not declared in this scope
   16 |     printf("%d\n", c);
      |                    ^
Language: C++

#include <cstdio>
#include <cstdlib>
#include <algorithm>

int N, T, A, X,z;

int main(){
    scanf("%d%d%d",&N,&T,&A);
    int zz = 300000000;
    for (int i=0;i <= N;i++){
       scanf("%d",&X);
       int d=(T*1000-X*6);
       if(zz <= (abs(d-1000*A)) ) int c=i;

    }
    printf("%d\n", i);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: 'i' was not declared in this scope
   16 |     printf("%d\n", i);
      |                    ^
Language: C++

#include <cstdio>
#include <cstdlib>

int N, T, A, H[N],X[N],z;

int main(){
    scanf("%d%d%d",&N,&T,&A);
    for (int i=0;i <= N;i++){
        X[i]=T-H[i]*0.006;
        z=min(abs(X[i]-A);
    }
    printf("%d\n", z);
}

    

Compiler output:
a.cc:4:16: error: size of array 'H' is not an integral constant-expression
    4 | int N, T, A, H[N],X[N],z;
      |                ^
a.cc:4:21: error: size of array 'X' is not an integral constant-expression
    4 | int N, T, A, H[N],X[N],z;
      |                     ^
a.cc: In function 'int main()':
a.cc:10:26: error: expected ')' before ';' token
   10 |         z=min(abs(X[i]-A);
      |              ~           ^
      |                          )
Language: C++

#include <cstdio>

int main(){
    int X,Y;
    int scanf("%d%d",&X,&Y);
    int Z=X+Y/2;
    printf("%d\n",Z);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:27: error: expression list treated as compound expression in initializer [-fpermissive]
    5 |     int scanf("%d%d",&X,&Y);
      |                           ^
a.cc:5:27: error: invalid conversion from 'int*' to 'int' [-fpermissive]
    5 |     int scanf("%d%d",&X,&Y);
      |                           ^
      |                           |
      |                           int*
Language: C++

#include <iostream>
using nameplace std;

int main()
{
int X,Y;
cin>>X>>Y;
cout<<X+Y/2<<endl;
return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'nameplace'
    2 | using nameplace std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:1: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 | cin>>X>>Y;
      | ^~~
      | 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:8:1: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 | cout<<X+Y/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:8:14: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 | cout<<X+Y/2<<endl;
      |              ^~~~
      |              std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

import java.util.Scanner;


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

		System.out.println(num1+num2/2);		
	}
}

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

import java.util.Scanner;
import java.io.*;

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

		System.out.println("hello, world");		
	}
}

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

#include <bits/std++.h>
using namespace std;
int x,y;
int main()
{
       cin>>x>>y;
       cout<<x+y/2<<endl;

}

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

import java.util.*;

 
class Main {
 
    private static Scanner sc = new Scanner(System.in);
 
    public static void main(String[] args) {
        String s = sc.next();
        String s2 = sc.next();

        //String s = String.valueOf(i);
        int i = Integer.parseInt(s);
        int i2 =Integer.parseInt(s2);
        //System.out.println((s + s).contains(s2) ? "Yes" : "No");
        System.out.println(i+i2/2);
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:12: error: expected ':' before 'static'
    6 |     private static Scanner sc = new Scanner(System.in);
      |            ^~~~~~~
      |            :
a.cc:6:20: error: 'Scanner' does not name a type
    6 |     private static Scanner sc = new Scanner(System.in);
      |                    ^~~~~~~
a.cc:8:11: error: expected ':' before 'static'
    8 |     public static void main(String[] args) {
      |           ^~~~~~~
      |           :
a.cc:8:29: error: 'String' has not been declared
    8 |     public static void main(String[] args) {
      |                             ^~~~~~
a.cc:8:38: error: expected ',' or '...' before 'args'
    8 |     public static void main(String[] args) {
      |                                      ^~~~
a.cc:18:2: error: expected ';' after class definition
   18 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:9:9: error: 'String' was not declared in this scope
    9 |         String s = sc.next();
      |         ^~~~~~
a.cc:10:16: error: expected ';' before 's2'
   10 |         String s2 = sc.next();
      |                ^~
a.cc:13:17: error: 'Integer' was not declared in this scope
   13 |         int i = Integer.parseInt(s);
      |                 ^~~~~~~
a.cc:13:34: error: 's' was not declared in this scope
   13 |         int i = Integer.parseInt(s);
      |                                  ^
a.cc:14:34: error: 's2' was not declared in this scope; did you mean 'i2'?
   14 |         int i2 =Integer.parseInt(s2);
      |                                  ^~
      |                                  i2
a.cc:16:9: error: 'System' was not declared in this scope
   16 |         System.out.println(i+i2/2);
      |         ^~~~~~
Language: C++

using System;

namespace atcoder_A___Discount_Fare
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int X = int.Parse(input[0]);
            int Y = int.Parse(input[1]);

            Console.WriteLine(X + (Y / 2));
        }
    }
}

Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:7:26: error: 'string' has not been declared
    7 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:7:35: error: expected ',' or '...' before 'args'
    7 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:15:6: error: expected ';' after class definition
   15 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void atcoder_A___Discount_Fare::Program::Main(int*)':
a.cc:9:13: error: 'string' was not declared in this scope
    9 |             string[] input = Console.ReadLine().Split(' ');
      |             ^~~~~~
a.cc:9:20: error: expected primary-expression before ']' token
    9 |             string[] input = Console.ReadLine().Split(' ');
      |                    ^
a.cc:10:21: error: expected primary-expression before 'int'
   10 |             int X = int.Parse(input[0]);
      |                     ^~~
a.cc:11:21: error: expected primary-expression before 'int'
   11 |             int Y = int.Parse(input[1]);
      |                     ^~~
a.cc:13:13: error: 'Console' was not declared in this scope
   13 |             Console.WriteLine(X + (Y / 2));
      |             ^~~~~~~
Language: C

#include <cmath>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <algorithm>
#include <map>
#include <set>
#include <unordered_map>
#include <unordered_set>
#include <vector>

using namespace std;

#define FOR(i,b,e) for(int i=(b);i<(e);++i)
#define FORQ(i,b,e) for(int i=(b);i<=(e);++i)
#define FORD(i,b,e) for(int i=(b)-1;i>=(e);--i)
#define REP(x, n) for(int x = 0; x < (n); ++x)

#define ST first
#define ND second
#define PB push_back
#define MP make_pair
#define LL long long
#define ULL unsigned LL
#define LD long double

int pref[100000];
int year[100000];
vector<int> sorted[100001];

void print(int v) {
}

int main() {
  int N, M;
  cin >> N >> M;
  REP(i, M) {
    int P, Y;
    cin >> P >> Y;
    pref[i] = P;
    year[i] = Y;
    sorted[P].push_back(Y);
  }
  FOR(i, 1, N) {
    sort(sorted[i].begin(), sorted[i].end());
  }
  REP(i, M) {
    auto& v = sorted[pref[i]];
    LL l = (LL)pref[i] * 1000000 + distance(v.begin(), find(v.begin(), v.end(), year[i])) + 1;
    printf("%012lld\n", l);
  }
}


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

#include <cstdio>
    #include <cstdlib>
     
    int N, T, A, H[10000000], TH[10000000];
    int main() {
      scanf("%d%d%d",&N,&T, &A);
      TH[0]=0;
      int a=0;
      
      for (int i=0;i<=N;i++){
        TH[i+1]=T+0.006*H[i];
        a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      }
          
      printf("%d\n",a);
     
   }
      

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'min' was not declared in this scope; did you mean 'main'?
   12 |         a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |           ^~~
      |           main
Language: C++

#include <cstdio>
    #include <cstdlib>
     
    int N, T, A, H[10000000], TH[10000000];
    int main() {
      scanf("%d%d%d",&N,&T, &A);
      TH[0]=0;
      int a=0;
      
      for (int i=0;i<=N;i++){
        TH[i+1]=T+0.006*H[i];
        a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      }
      printf("%d\n",a);

Compiler output:
a.cc: In function 'int main()':
a.cc:12:11: error: 'min' was not declared in this scope; did you mean 'main'?
   12 |         a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |           ^~~
      |           main
a.cc:14:24: error: expected '}' at end of input
   14 |       printf("%d\n",a);
      |                        ^
a.cc:5:16: note: to match this '{'
    5 |     int main() {
      |                ^
Language: C++

    #include <cstdio>
    #include <cstdlib>
     
    int N, T, A, H[10000000], TH[10000000];
    int main() {
      scanf("%d%d%d",&N,&T, &A);
      TH[0]=0;
      
      for (int i=0;i<=N;i++){
        TH[i+1]=T+0.006*H[i];
        a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      }
      printf("%d\n",a);

Compiler output:
a.cc: In function 'int main()':
a.cc:11:9: error: 'a' was not declared in this scope
   11 |         a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |         ^
a.cc:11:11: error: 'min' was not declared in this scope; did you mean 'main'?
   11 |         a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |           ^~~
      |           main
a.cc:13:21: error: 'a' was not declared in this scope
   13 |       printf("%d\n",a);
      |                     ^
a.cc:13:24: error: expected '}' at end of input
   13 |       printf("%d\n",a);
      |                        ^
a.cc:5:16: note: to match this '{'
    5 |     int main() {
      |                ^
Language: C++

    #include <cstdio>
     
    int N, T, A, H[10000000], TH[10000000];
    int main() {
      scanf("%d%d%d",&N,&T, &A);
      TH[0]=0;
      int a=0;
      for (int i=0;i<=N;i++){
        TH[i+1]=T+0.006*H[i];
        a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      }
      printf("%d\n",a);

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'abs' was not declared in this scope
   10 |         a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |               ^~~
a.cc:10:11: error: 'min' was not declared in this scope; did you mean 'main'?
   10 |         a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |           ^~~
      |           main
a.cc:12:24: error: expected '}' at end of input
   12 |       printf("%d\n",a);
      |                        ^
a.cc:4:16: note: to match this '{'
    4 |     int main() {
      |                ^
Language: C++

#include <cstdio>
 
int N, T, A, H[10000000], TH[10000000];
int main() {
  scanf("%d%d%d",&N,&T, &A);
  TH[0]=0;
  
  for (int i=0;i<=N;i++){
    TH[i+1]=T+0.006*H[i];
    a=min(abs(A-TH[i]),abs(A-TH[i+1]));
  }
  printf("%d\n",a);

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'a' was not declared in this scope
   10 |     a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |     ^
a.cc:10:11: error: 'abs' was not declared in this scope
   10 |     a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |           ^~~
a.cc:10:7: error: 'min' was not declared in this scope; did you mean 'main'?
   10 |     a=min(abs(A-TH[i]),abs(A-TH[i+1]));
      |       ^~~
      |       main
a.cc:12:17: error: 'a' was not declared in this scope
   12 |   printf("%d\n",a);
      |                 ^
a.cc:12:20: error: expected '}' at end of input
   12 |   printf("%d\n",a);
      |                    ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <cstdio>

int main() {
  int x, y, z;
  z=x+y/2;
  puts(z);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:8: error: invalid conversion from 'int' to 'const char*' [-fpermissive]
    6 |   puts(z);
      |        ^
      |        |
      |        int
In file included from /usr/include/c++/14/cstdio:42,
                 from a.cc:1:
/usr/include/stdio.h:714:30: note:   initializing argument 1 of 'int puts(const char*)'
  714 | extern int puts (const char *__s);
      |                  ~~~~~~~~~~~~^~~
Language: C++

int main(){
  int X, Y, Z:
  Z=X+Y/2;
  puts(Z);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:14: error: found ':' in nested-name-specifier, expected '::'
    2 |   int X, Y, Z:
      |              ^
      |              ::
a.cc:2:13: error: 'Z' has not been declared
    2 |   int X, Y, Z:
      |             ^
a.cc:3:4: error: qualified-id in declaration before '=' token
    3 |   Z=X+Y/2;
      |    ^
a.cc:4:8: error: 'Z' was not declared in this scope
    4 |   puts(Z);
      |        ^
a.cc:4:3: error: 'puts' was not declared in this scope
    4 |   puts(Z);
      |   ^~~~
Language: Java

package ABC113;

//Scannerクラスをimport
import java.util.Scanner;

public class DiscountFare {

	public static void main(String[] args) {
		//Scannerクラスのインスタンスを作成
		//標準入力はSystemクラスのinフィールドから取得できる
		Scanner sc = new Scanner(System.in);

		//nextIntにて整数を取得
		int a = sc.nextInt();
		int b = sc.nextInt();

		System.out.println(a + b/2);
	}

}


Compiler output:
Main.java:6: error: class DiscountFare is public, should be declared in a file named DiscountFare.java
public class DiscountFare {
       ^
1 error