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

#include<iostream>
#include<vector>

using namespace std;

const int MAX_V = 205;
vector<int> G[MAX_V];
int match[MAX_V];
bool used[MAX_V];

void add_edge(const int &u, const int &v) {
	G[u].emplace_back(v);
	G[v].emplace_back(u);
}

bool dfs(const int &v) {
	used[v] = true;
	for (int i = 0; i < G[v].size(); ++i) {
		int u = G[v][i], w = match[u];
		if (w < 0 || !used[w] && dfs(w)) {
			match[v] = u;
			match[u] = v;
			return true;
		}
	}
	return false;
}

//?????¨??????????????°????????§???????±?????????????
int bipartite_matching(const int &V) {
	int res = 0;
	memset(match, -1, sizeof(match));
	for (int v = 0; v < V; ++v) {
		if (match[v] < 0) {
			memset(used, 0, sizeof(used));
			if (dfs(v))++res;
		}
	}
	return res-1;
}

int main()
{
	cin.tie(0);
	ios::ios_base::sync_with_stdio(false);
	int X, Y, E, s, t; cin >> X >> Y >> E;
	for (int i = 0; i < E; ++i) {
		cin >> s >> t;
		add_edge(s, t);
	}
	int ans = bipartite_matching(X + Y);
	cout << ans << endl;
}

Compiler output:
a.cc: In function 'int bipartite_matching(const int&)':
a.cc:32:9: error: 'memset' was not declared in this scope
   32 |         memset(match, -1, sizeof(match));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 |
Language: C++

#include<iostream>
#include<vector>
using namespace std;
vector<int> list[100000];
int N, M, E;
int match[100000];
bool used[100000];
int x, y;

bool DFS(int V) {
	used[V] = true;
	for (int i = 0; i < list[V].size(); i++) {
		int u = list[V][i]; int w = match[u];
		if (w < 0 || !used[u] && DFS(w)) {
			match[V] = u;
			match[u] = V;
			return true;
		}
	}
	return false;
}

int supermatching() {
	int r = 0;
	memset(match, -1, sizeof(match));
	for (int j = 0; j < N + M; j++) {
		if (match[j] < 0) {
			memset(used, 0, sizeof(used));
			if (DFS(j)) { r++; }
		}
	}
	return r;
}

int main() {
	cin >> N >> M >> E;
	for (int i = 0; i < E; i++) {
		cin >> x >> y;
		y += N;
		list[y].push_back(x);
		list[x].push_back(y);
	}
	cout << supermatching() << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int supermatching()':
a.cc:25:9: error: 'memset' was not declared in this scope
   25 |         memset(match, -1, sizeof(match));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<vector>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

#include <vector>
#include <iostream>

using namespace std;

// ------ Variable ------ //

#define MAX_V 100

int V; vector<int> G[MAX_V];

int match[MAX_V];

bool used[MAX_V];


// ------ Bipartite_Matching ------ //

bool search(int v)
{
	used[v] = true;

	for (int i = 0; i < G[v].size(); i++)
	{
		int u = G[v][i], w = match[u];

		if (w < 0 || !used[w] && search(w))
		{
			match[v] = u;
			match[u] = v;

			return true;
		}
	}

	return false;
}

int bipartite_matching()
{
	int res = 0;

	memset(match, -1, sizeof(match));

	for (int i = 0; i < V; i++)
	{
		if (match[i] < 0)
		{
			memset(used, 0, sizeof(used));

			if (search(i))
			{
				res++;
			}
		}
	}

	return res;
}

int main()
{
	int X, Y, E, A, B;

	cin >> X >> Y >> E; V = X + Y;

	for (int i = 0; i < E; i++)
	{
		cin >> A >> B;

		G[A].push_back(X + B);
		G[X + B].push_back(A);
	}

	cout << bipartite_matching() << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int bipartite_matching()':
a.cc:43:9: error: 'memset' was not declared in this scope
   43 |         memset(match, -1, sizeof(match));
      |         ^~~~~~
a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <iostream>
  +++ |+#include <cstring>
    3 |
Language: C++

#include <bits/stdc++.h>
#include "../max_flow.cpp"
#define MAX_N 1000
using namespace std;

int N,K;
bool can[MAX_N][MAX_N]; //can[i][j]:=???????????\??????i?????????j??????????????????

int solve(){
  //0??????N-1: ???????????\???????????????????????????
  //N??????N+K-1: ???????????????????????????
  int s = N+K, t = s+1;
  
  //s??¨???????????\??????????????¶
  for(int i=0; i<N; i++) add_edge(s,i,1);
  
  //????????¨t?????????
  for(int i=0; i<K; i++) add_edge(N+i,t,1);
  
  //???????????\????????¨??????????????¶
  for(int i=0;i<N;i++)
    for(int j=0;j<K;j++)
      if(can[i][j]) add_edge(i, N+j , 1);

  return max_flow(s,t);
}

Compiler output:
a.cc:2:10: fatal error: ../max_flow.cpp: No such file or directory
    2 | #include "../max_flow.cpp"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#include <stdio.h>
#include <utility>
#include <vector>
#include <queue>
#include <set>
#include <bitset>
using namespace std;
typedef vector<int> vi;
typedef vector<pair<int,int>>vpi;
typedef pair<int,int> pi;
#define R return
#define W while
#define FOR(i,a) for(int i=0;i<a;i++)
#define MP make_pair
#define PB push_back
#define F first
#define S second
#define I insert
#define P push
int main(){
    int x,y,k,l,r,ans=0,temp;
    pair<priority_queue<pi,vpi,greater<pi>>,priority_queue<pi,vpi,greater<pi>>>pq;
    pair<vi,vi>v[510];
    pi d[510];
    set<pi>s;
    pair<bitset<510>,bitset<510>>b;
    b.F.reset();
    b.S.reset();
    scanf("%d%d%d",&x,&y,&k);
    n=max(x,y)+1;
    W(k--){
        scanf("%d%d",&l,&r);
        if(s.count(MP(l,r)))continue;
        s.I(MP(l,r));
        v[l].F.PB(r);
        v[r].S.PB(l);
    }
    FOR(i,n){
        d[i].F=(int)v[i].F.size();
        d[i].S=(int)v[i].S.size();
        pq.F.P(MP(d[i].F,i));
        pq.S.P(MP(d[i].S,i));
    }
    W(!(pq.F.empty()||pq.S.empty())){
        if(pq.F.top().F<=pq.S.top().F){
            temp=pq.F.top().S;
            pq.F.pop();
            if(b.F[temp])continue;
            b.F[temp]=true;
            FOR(i,v[temp].F.size())if(!b.S[v[temp].F[i]]){
                b.S[v[temp].F[i]]=true;
                ans++;
                FOR(j,v[v[temp].F[i]].S.size())if(!b.F[v[v[temp].F[i]].S[j]]){
                    d[v[v[temp].F[i]].S[j]].F--;
                    pq.F.P(MP(d[v[v[temp].F[i]].S[j]].F,v[v[temp].F[i]].S[j]));
                }
            }
        }
        else{
            temp=pq.S.top().S;
            pq.S.pop();
            if(b.S[temp])continue;
            b.S[temp]=true;
            FOR(i,v[temp].S.size())if(!b.F[v[temp].S[i]]){
                b.F[v[temp].S[i]]=true;
                ans++;
                FOR(j,v[v[temp].S[i]].F.size())if(!b.S[v[v[temp].S[i]].F[j]]){
                    d[v[v[temp].S[i]].F[j]].S--;
                    pq.S.P(MP(d[v[v[temp].S[i]].F[j]].S,v[v[temp].S[i]].F[j]));
                }
            }
        }
    }
    printf("%d\n",ans);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:5: error: 'n' was not declared in this scope
   30 |     n=max(x,y)+1;
      |     ^
Language: C++

//#include "bits/stdc++.h"

#define _USE_MATH_DEFINES
#include <cmath>
#include <cstdlib>
#include <deque>
#include <algorithm>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#include <iterator>

using namespace std;

#define rep(i,a,b) for(int i=(a), i##_len=(b);i<i##_len;i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)

//#define int long long
#define SZ(x) ((int)(x).size())
#define pb push_back
#define mp make_pair

typedef long long ll;
//typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<double, double> pdd;
typedef vector<vector<int>> mat;

template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; }

const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;

struct edge
{
	int s, t, c, d,rev;
	edge(int s, int t, int c, int d,int rev) :s(s), t(t), c(c),d(d), rev(rev) {}
	edge() { s = -1, t = -1, c = -1, rev = -1; d = -1; }
};

vector<int> G[1002];
bool used[1002];
int match[1002];

bool dfs(int v)
{
	used[v] = true;
	rep(i, 0, SZ(G[v]))
	{
		int u = G[v][i], w = match[u];
		if (w < 0 || !used[w] && dfs(w))
		{
			match[v] = u;
			match[u] = v;
			return true;
		}
	}
	return false;
}

int bipartite_matching(int V)
{
	int res = 0;
	memset(match, -1, sizeof(match));
	rep(i, 0, V)
	{
		if (match[i] < 0)
		{
			memset(used, 0, sizeof(used));
			if (dfs(i))
			{
				res++;
			}
		}
	}
	return res;
}

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

	int X, Y,E, x, y;
	cin >> X >> Y >> E;
	rep(i, 0, E)
	{
		cin >> x >> y;
		G[x].push_back(X + y);
		G[X + y].push_back(x);
	}

	cout << bipartite_matching(X + Y) << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int bipartite_matching(int)':
a.cc:78:9: error: 'memset' was not declared in this scope
   78 |         memset(match, -1, sizeof(match));
      |         ^~~~~~
a.cc:21:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
   20 | #include <iterator>
  +++ |+#include <cstring>
   21 |
Language: C++

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <string>
#include <cstring>
#include <cctype>
#include <cmath>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <stdio.h>
#include <string.h>
#include <cstdlib>
#include <math.h>
#define INF 2000000000
using namespace std;
int dx[4]={1,0,-1,0},dy[4]={0,1,0,-1};
#define ll long long
#define PL pair<long long, long long>
#define P pair<int,int>
#define mk make_pair
#define en endl;
#define WHITE 0
#define BLACK 2
#define GRAY 1
#define repi(start,end) for(int i=start; i<end; i++)
#define repj(start,end) for(int j=start; j<end; j++)
#define repk(start,end) for(int k=start; k<end; k++)
#define repl(start,end) for(int l=start; l<end; l++)
#define RE return 0;

struct edge{int to,cap,rev;};

int n,k;
bool can[1000][1000];
int used[100];

vector<edge> G[2000000];

void add_edge(int from,int to,int cap){
  G[from].push_back((edge){to,cap,(int)G[to].size()});
  G[to].push_back((edge){from,0,(int)G[from].size()-1});
}

int dfs(int v,int t,int f){
  //cout<<"  v = "<<v<<en
  if(v==t) return f;
  used[v]=true;
  repi(0, G[v].size()){
    edge &e=G[v][i];
    if(!used[e.to]&&e.cap>0){
      int d=dfs(e.to,t,min(f,e.cap));
      if(d>0){
        e.cap-=d;
        G[e.to][e.rev].cap+=d;
        return d;
      }
    }
  }
  return 0;
}

int max_flow(int s,int t){
  int i=0;
  int flow=0;
  for(;;){
    memset(used, 0, sizeof(used));
    //cout<<"         "<<i++<<en
    int f=dfs(s, t, INF);
    if(f==0) return flow;
    flow+=f;
  }
}

void solve(){
  int s=n+k,t=s+1;
  
  repi(0, n){
    add_edge(s,i,1);
  }
  repi(0, k){
    add_edge(n+i, t, 1);
  }
  
  repi(0, n){
    repj(0, k){
      if(can[i][j]){
        add_edge(i, n+j, 1);
      }
    }
  }
  
  cout<<max_flow(s, t)<<en
}



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

#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
#include <string>
#include <cmath>
#include <map>

#define REP(i, n) for (int i = 0; i < (n); i++)
#define FOR(i, init, n) for(int i = init; i < (n); i++)
#define ALL(obj) (obj).begin(), (obj).end()
#define RALL(obj) (obj).rbegin(), (obj).rend()
#define Cout(obj) cout << obj << endl
#define Size(obj) (int)(obj).size()
#define fcout cout << fixed << setprecision(10)
#define fi first
#define se second

using namespace std;
using ll = long long int;
using P = pair<int, int>;
using T = tuple<int, int, int>;
using edge = struct
{
    int to, cap, rev;
};

const int MOD = 1e9 + 7;
const int iINF = 1e9;
const long long int llINF = 1e18;
const double PI = acos(-1.0);

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};

const int MaxV = 10000;

vector<edge> graph[MaxV];
bool used[MaxV];

void addEdge(int from, int to, int cap)
{
    graph[from].push_back({to, cap, Size(graph[to])});
    graph[to].push_back({from, 0, Size(graph[from]) - 1});
}

int dfs(int v, int t, int f)
{
    if(v == t) return f;
    used[v] = true;

    for(auto &e : graph[v])
    {
        if(!used[e.to] && e.cap > 0)
        {
            int d = dfs(e.to, t, min(f, e.cap));

            if(d > 0)
            {
                e.cap -= d;
                graph[e.to][e.rev].cap += d;
                return d;
            }
        }
    }

    return 0;
}

int maxFlow(int s, int t)
{
    int flow = 0;
    for(;;)
    {
        memset(used, false, sizeof(used));

        int f = dfs(s, t, iINF);

        if(f == 0) return flow;

        flow += f;
    }
}

int X, Y, E;

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

    int X, Y, E;
    cin >> X >> Y >> E;

    int S = X + Y, T = S + 1;

    REP(i, X)
    {
        addEdge(S, i, 1);
    }    

    REP(i, Y)
    {
        addEdge(T, i, 1);
    }

    REP(i, E)
    {
        int x, y;
        cin >> x >> y;
        addEdge(x, y + X, 1);
    }

    Cout(maxFlow(S, T));
    
    return 0;
}


Compiler output:
a.cc: In function 'int maxFlow(int, int)':
a.cc:75:9: error: 'memset' was not declared in this scope
   75 |         memset(used, false, sizeof(used));
      |         ^~~~~~
a.cc:8:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    7 | #include <map>
  +++ |+#include <cstring>
    8 |
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		double x1 = sc.nextDouble();
		double y1 = sc.nextDouble();
		double x2 = sc.nextDouble();
		double y2 = sc.nextDouble();

		System.out.println(Math.sqrt((x1-y1)*(x1-y1)+(x2-y2)*(x2-y2));
	}
}

Compiler output:
Main.java:10: error: ')' or ',' expected
		System.out.println(Math.sqrt((x1-y1)*(x1-y1)+(x2-y2)*(x2-y2));
		                                                             ^
1 error
Language: Java

/

//スキャナつかうため

import java.util.Scanner;

public class Main {
	// プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成

		Scanner sc = new Scanner(System.in);
		// 4つの数字を受け取る
		double dbX1 = sc.nextDouble();
		double dbX2 = sc.nextDouble();
		double dbY1 = sc.nextDouble();
		double dbY2 = sc.nextDouble();
		double dbKekka = ((dbX1 - dbX2) * (dbX1 - dbX2) + (dbY1 - dbY2)
				* (dbY1 - dbY2));
		System.out.println(dbKekka);
	}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
/
^
1 error
Language: Java

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

public class Distance {
	public static void main(String[] args) throws IOException {
		double x1, y1, x2, y2;
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String[] coor = in.readLine().split(" ");
		x1 = Double.parseDouble(coor[0]);
		y1 = Double.parseDouble(coor[1]);
		x2 = Double.parseDouble(coor[2]);
		y2 = Double.parseDouble(coor[3]);
		System.out.println(Math.sqrt(Math.pow(Math.abs(x2 - x1), 2)
				+ Math.pow(Math.abs(y2 - y1), 2)));
	}
}

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

import java.util.*;

public class Main5 {
	public static void main(String args[]){
		int[] r = new int[4];
		
		Scanner scn = new Scanner(System.in);
		String inl = scn.nextLine();
		String[] part = inl.split(" ");
		for(int i = 0 ; i < 4 ; i++){
			r[i] = Integer.parseInt(part[i]);
		}
		System.out.println(Math.sqrt(Math.pow( (r[0] - r[2]) , 2) + Math.pow( (r[1] - r[3]) , 2)));
	}
}

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

import java.util.Scanner;

public class test00 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		double x1 = scan.nextDouble();
		double y1 = scan.nextDouble();
		double x2 = scan.nextDouble();
		double y2 = scan.nextDouble();
		scan.close();
		double dbX = Math.pow(x2 - x1, 2);
		double dbY = Math.pow(y2 - y1, 2);
		double dbAns = Math.sqrt(dbX + dbY);
		System.out.println(dbAns);
	}
}

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

import java.util.*;

public class Main {
    public static void main(String[] args) {
        try(Scanner scn = new Scanner()) {
            double x1 = scn.nextDouble();
            double y1 = scn.nextDouble();
            double x2 = scn.nextDouble();
            double y2 = scn.nextDouble();
            double ans = Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
            System.out.println(ans);
        }
    }
}

Compiler output:
Main.java:5: error: no suitable constructor found for Scanner(no arguments)
        try(Scanner scn = new Scanner()) {
                          ^
    constructor Scanner.Scanner(Readable,Pattern) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Readable) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(InputStream,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(File,CharsetDecoder) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(Path,Charset) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,String) is not applicable
      (actual and formal argument lists differ in length)
    constructor Scanner.Scanner(ReadableByteChannel,Charset) is not applicable
      (actual and formal argument lists differ in length)
1 error
Language: Java

public class main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		int x1 = scan.nextInt();
		int y1 = scan.nextInt();
		int x2 = scan.nextInt();
		int y2 = scan.nextInt();
		double ans =Math.sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		System.out.println(ans);

	}

}

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

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		java.util.Scanner scan = new java.util.Scanner(System.in);

		long x1 = scan.nextLong();
		long y1 = scan.nextLng();

		long x2 = scan.nextLong();
		long y2 = scan.nextLong();

		long kyoriX2 = (x1 - x2) * (x1 - x2);
		long kyoriY2 = (y1 - y2) * (y1 - y2);

		System.out.println(Math.sqrt(kyoriX2 + kyoriY2));
	}

}

Compiler output:
Main.java:8: error: cannot find symbol
		long y1 = scan.nextLng();
		              ^
  symbol:   method nextLng()
  location: variable scan of type Scanner
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		double x1 = scan.nextDouble();
		double y1 = scan.nextDouble();
		double x2 = scan.nextDouble();
		double y2 = scan.nextDouble();
		double dis = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2));
		System.out.printf("%f\n", dis);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		double dis = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2));
		                  ^
  symbol:   method pow(double,int)
  location: class Main
Main.java:11: error: cannot find symbol
		double dis = sqrt(pow((x2 - x1), 2) + pow((y2 - y1), 2));
		                                      ^
  symbol:   method pow(double,int)
  location: class Main
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		double x1 = scan.nextDouble();
		double y1 = scan.nextDouble();
		double x2 = scan.nextDouble();
		double y2 = scan.nextDouble();
		double dis = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
		System.out.printf("%f\n", dis);
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		double dis = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
		                  ^
  symbol:   method pow(double,int)
  location: class Main
Main.java:11: error: cannot find symbol
		double dis = sqrt(pow(x2 - x1, 2) + pow(y2 - y1, 2));
		                                    ^
  symbol:   method pow(double,int)
  location: class Main
2 errors
Language: Java

import java.io.*;

public class Main1{
	public static void main(String[] arsg) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		String str[] = new String[4];
		str = br.readLine().split(" ");
		
		double x1 = Double.parseDouble(str[0]);
		double y1 = Double.parseDouble(str[1]);
		double x2 = Double.parseDouble(str[2]);
		double y2 = Double.parseDouble(str[3]);
		
		System.out.println(Math.sqrt(Math.pow(x1-x2,2)+Math.pow(y1-y2,2)));
	}
} 

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Math.*;
public class Distance {
	static int[] x= new int[2];
	static int[] y = new int[2]; 
	static double dis = 0;
	public static void main(String[] args) throws NumberFormatException, IOException {
		BufferedReader read = new BufferedReader (new InputStreamReader(System.in));
		int a = Integer.parseInt(read.readLine());
		int b = Integer.parseInt(read.readLine());
		setX(a,b);
		int a1 = Integer.parseInt(read.readLine());
		int b1 = Integer.parseInt(read.readLine());
		setY(a1,b1);
		calDistance(x,y);
		System.out.println(dis);
	}
	private static double calDistance(int[] x2, int[] y2) {
		double x = x2[0] - y2[0] ; //????????¨????????¢
		double y = x2[1] - y2[1] ;
		
		dis = Math.sqrt(x*x + y*y);
		
		return dis ;
	}
	private static void setY(int a1, int b1) {
		y[0] = a1 ;
		y[1] = b1 ;
	}
	private static void setX(int a, int b) {
		x[0] = a ;
		x[1] = b ;
	}
	

}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.lang.Math.*;
import java.util.Scanner;
public class Distance {
	static int[] x= new int[2];
	static int[] y = new int[2]; 
	static double dis = 0;
	public static void main(String[] args) throws NumberFormatException, IOException {
	/*	BufferedReader read = new BufferedReader (new InputStreamReader(System.in));
		int a = Integer.parseInt(read.readLine());
		int b = Integer.parseInt(read.readLine());
		*/
		Scanner scan = new Scanner(System.in);
		int a = scan.nextInt();
		int b = scan.nextInt();
		setX(a,b);
		/*int a1 = Integer.parseInt(read.readLine());
		int b1 = Integer.parseInt(read.readLine());
		*/
		int a1 = scan.nextInt();
		int b1 = scan.nextInt();
		setY(a1,b1);
		calDistance(x,y);
		System.out.println(dis);
	}
	private static double calDistance(int[] x2, int[] y2) {
		double x = x2[0] - y2[0] ; //????????¨????????¢
		double y = x2[1] - y2[1] ;
		
		dis = Math.sqrt(x*x + y*y);
		
		return dis ;
	}
	private static void setY(int a1, int b1) {
		y[0] = a1 ;
		y[1] = b1 ;
	}
	private static void setX(int a, int b) {
		x[0] = a ;
		x[1] = b ;
	}
	

}

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




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

class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));


   String[] xy = br.readLine().split(" ");

   double distance = Math.pow( Integer.parseInt(xy[0])-Integer.parseInt(xy[2]), 2 ) +Math.pow(Integer.parseInt(xy[1])-Integer.parseInt(xy[3]) , 2);

   distance = Math.sqrt(distance);
   System.out.println(distance);


  }
}
}

Compiler output:
Main.java:23: error: class, interface, enum, or record expected
}
^
1 error
Language: Java

import java.io.IOException;
import java.util.Scanner;
class Main{
	public static void main(String[] args)throws NumberFormatException, IOException{
		//System.out.println(" ");
		Scanner scan = new Scanner(System.in);
		double x1 =scan.nextInt();
		double y1 =scan.nextInt();
		double x2 =scan.nextInt();
		double y2 =scan.nextInt();
		//double keisan =0.0;
		//keisan = Math.sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1));
		System.out.println(keisan);
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
		System.out.println(keisan);
		                   ^
  symbol:   variable keisan
  location: class Main
1 error
Language: Java

import static java.lang.System.out;
import java.util.Scanner;

class Main{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        float x = scan.nextInt();
        float y = scan.nextInt();
        float x2 = scan.nextInt();
        float y2 = scan.nextInt();
        float ans = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));       
        out.println(String.format("%.7s", String.valueOf(ans)));
    }
}

Compiler output:
Main.java:11: error: incompatible types: possible lossy conversion from double to float
        float ans = Math.sqrt((x2 - x) * (x2 - x) + (y2 - y) * (y2 - y));       
                             ^
1 error
Language: Java

import java.io.*;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] line = br.readLine().split(" ");
        double x1 = Integer.parseInt(line[0]);
        double y1 = Integer.parseInt(line[1]);
        double x2 = Integer.parseInt(line[2]);
        double y2 = Integer.parseInt(line[3]);
        double dis = Math.sqrt((x1-x2)*(x1-x2) + (y1-y2)*(y1-y2));

        System.out.printlf("%.5f", dis);
    }
}

Compiler output:
Main.java:13: error: cannot find symbol
        System.out.printlf("%.5f", dis);
                  ^
  symbol:   method printlf(String,double)
  location: variable out of type PrintStream
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.Math.pow;
import java.Math.sqrt;
import java.text.Format;
/*Question
/?????? P1(x1, y1), P2(x2, y2) ????????¢????±???????????????°???????????????????????? 
*/
/*Input
/x1, y1, x2, y2 ????????°???????????????????????§????????????????????? 
*/

public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		/*??\?????¨
		/??????????????§????????????String[]???????????????int?????????
		*/
		String[] s = sc.readLine().split(" ");
		int[] z = new int[s.length];
		for(int i = 0;i < s.length;i++){
			z[i] = Integer.parseInt(s[i]);
		}
		//?¨????
		//?????°???????????????????????????????????????????????????
		System.out.pritnln(Math.sqrt(Math.pow(z[0]-z[2], 2) + Math.pow(z[1]-z[3], 2));
	}
}

Compiler output:
Main.java:26: error: ')' or ',' expected
		System.out.pritnln(Math.sqrt(Math.pow(z[0]-z[2], 2) + Math.pow(z[1]-z[3], 2));
		                                                                             ^
1 error
Language: Java

import java.util.*;

calss Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double x1=(double)sc.nextInt();
		double y1=(double)sc.nextInt();
		double x2=(double)sc.nextInt();
		double y2=(double)sc.nextInt();
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		System.out.printf("%.5f",answer);
		System.out.pritnln();
	}
}

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
calss Main{
^
Main.java:4: 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:14: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double x1=(double)sc.nextInt();
		double y1=(double)sc.nextInt();
		double x2=(double)sc.nextInt();
		double y2=(double)sc.nextInt();
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		System.out.printf("%.5f",answer);
		System.out.pritnln();
	}
}

Compiler output:
Main.java:10: error: cannot find symbol
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		                    ^
  symbol:   method sprt(double)
  location: class Math
Main.java:12: error: cannot find symbol
		System.out.pritnln();
		          ^
  symbol:   method pritnln()
  location: variable out of type PrintStream
2 errors
Language: Java

import java.util.*;
import java.Math.*;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double x1=(double)sc.nextInt();
		double y1=(double)sc.nextInt();
		double x2=(double)sc.nextInt();
		double y2=(double)sc.nextInt();
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		System.out.printf("%.5f",answer);
		System.out.pritnln();
	}
}

Compiler output:
Main.java:2: error: package java.Math does not exist
import java.Math.*;
^
Main.java:11: error: cannot find symbol
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		                    ^
  symbol:   method sprt(double)
  location: class Math
Main.java:13: error: cannot find symbol
		System.out.pritnln();
		          ^
  symbol:   method pritnln()
  location: variable out of type PrintStream
3 errors
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double x1=(double)sc.nextInt();
		double y1=(double)sc.nextInt();
		double x2=(double)sc.nextInt();
		double y2=(double)sc.nextInt();
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		System.out.printf("%.5f",answer);
		System.out.pritnln();
	}
}

Compiler output:
Main.java:11: error: cannot find symbol
		double answer = Math.sprt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
		                    ^
  symbol:   method sprt(double)
  location: class Math
Main.java:13: error: cannot find symbol
		System.out.pritnln();
		          ^
  symbol:   method pritnln()
  location: variable out of type PrintStream
2 errors
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double x1=(double)sc.nextInt();
		double y1=(double)sc.nextInt();
		double x2=(double)sc.nextInt();
		double y2=(double)sc.nextInt();
		double n=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)
		double answer = Math.sprt(n);
		System.out.printf("%.5f",answer);
		System.out.pritnln("");
	}
}

Compiler output:
Main.java:11: error: ';' expected
		double n=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)
		                                        ^
1 error
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		double x1=(double)sc.nextInt();
		double y1=(double)sc.nextInt();
		double x2=(double)sc.nextInt();
		double y2=(double)sc.nextInt();
		double n=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
		double answer = Math.sprt(n);
		System.out.printf("%.5f",answer);
		System.out.pritnln("");
	}
}

Compiler output:
Main.java:12: error: cannot find symbol
		double answer = Math.sprt(n);
		                    ^
  symbol:   method sprt(double)
  location: class Math
Main.java:14: error: cannot find symbol
		System.out.pritnln("");
		          ^
  symbol:   method pritnln(String)
  location: variable out of type PrintStream
2 errors
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine.().split("");
		double x1=double.parseDouble(line[0]);
		double y1=double.parseDouble(line[1]);
		double x2=double.parseDouble(line[2]);
		double y2=double.parseDouble(line[3]);
		double n=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
		double answer = Math.sqrt(n);
		System.out.printf("%.5f",answer);
		System.out.println();
	}
}

Compiler output:
Main.java:7: error: <identifier> expected
		String[] line = sc.nextLine.().split("");
		                            ^
Main.java:8: error: class expected
		double x1=double.parseDouble(line[0]);
		                 ^
Main.java:8: error: ';' expected
		double x1=double.parseDouble(line[0]);
		                            ^
Main.java:8: error: not a statement
		double x1=double.parseDouble(line[0]);
		                                 ^
Main.java:8: error: ';' expected
		double x1=double.parseDouble(line[0]);
		                                    ^
Main.java:9: error: class expected
		double y1=double.parseDouble(line[1]);
		                 ^
Main.java:9: error: ';' expected
		double y1=double.parseDouble(line[1]);
		                            ^
Main.java:9: error: not a statement
		double y1=double.parseDouble(line[1]);
		                                 ^
Main.java:9: error: ';' expected
		double y1=double.parseDouble(line[1]);
		                                    ^
Main.java:10: error: class expected
		double x2=double.parseDouble(line[2]);
		                 ^
Main.java:10: error: ';' expected
		double x2=double.parseDouble(line[2]);
		                            ^
Main.java:10: error: not a statement
		double x2=double.parseDouble(line[2]);
		                                 ^
Main.java:10: error: ';' expected
		double x2=double.parseDouble(line[2]);
		                                    ^
Main.java:11: error: class expected
		double y2=double.parseDouble(line[3]);
		                 ^
Main.java:11: error: ';' expected
		double y2=double.parseDouble(line[3]);
		                            ^
Main.java:11: error: not a statement
		double y2=double.parseDouble(line[3]);
		                                 ^
Main.java:11: error: ';' expected
		double y2=double.parseDouble(line[3]);
		                                    ^
17 errors
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine.().split(" ");
		double x1= double.parseDouble(line[0]);
		double y1= double.parseDouble(line[1]);
		double x2= double.parseDouble(line[2]);
		double y2= double.parseDouble(line[3]);
		double n=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
		double answer = Math.sqrt(n);
		System.out.printf("%.5f",answer);
		System.out.println();
	}
}

Compiler output:
Main.java:7: error: <identifier> expected
		String[] line = sc.nextLine.().split(" ");
		                            ^
Main.java:8: error: class expected
		double x1= double.parseDouble(line[0]);
		                  ^
Main.java:8: error: ';' expected
		double x1= double.parseDouble(line[0]);
		                             ^
Main.java:8: error: not a statement
		double x1= double.parseDouble(line[0]);
		                                  ^
Main.java:8: error: ';' expected
		double x1= double.parseDouble(line[0]);
		                                     ^
Main.java:9: error: class expected
		double y1= double.parseDouble(line[1]);
		                  ^
Main.java:9: error: ';' expected
		double y1= double.parseDouble(line[1]);
		                             ^
Main.java:9: error: not a statement
		double y1= double.parseDouble(line[1]);
		                                  ^
Main.java:9: error: ';' expected
		double y1= double.parseDouble(line[1]);
		                                     ^
Main.java:10: error: class expected
		double x2= double.parseDouble(line[2]);
		                  ^
Main.java:10: error: ';' expected
		double x2= double.parseDouble(line[2]);
		                             ^
Main.java:10: error: not a statement
		double x2= double.parseDouble(line[2]);
		                                  ^
Main.java:10: error: ';' expected
		double x2= double.parseDouble(line[2]);
		                                     ^
Main.java:11: error: class expected
		double y2= double.parseDouble(line[3]);
		                  ^
Main.java:11: error: ';' expected
		double y2= double.parseDouble(line[3]);
		                             ^
Main.java:11: error: not a statement
		double y2= double.parseDouble(line[3]);
		                                  ^
Main.java:11: error: ';' expected
		double y2= double.parseDouble(line[3]);
		                                     ^
17 errors
Language: Java

import java.util.*;
import java.lang.Math;

class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String[] line = sc.nextLine().split(" ");
		double x1= double.parseDouble(line[0]);
		double y1= double.parseDouble(line[1]);
		double x2= double.parseDouble(line[2]);
		double y2= double.parseDouble(line[3]);
		double n=(x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
		double answer = Math.sqrt(n);
		System.out.printf("%.5f",answer);
		System.out.println();
	}
}

Compiler output:
Main.java:8: error: class expected
		double x1= double.parseDouble(line[0]);
		                  ^
Main.java:8: error: ';' expected
		double x1= double.parseDouble(line[0]);
		                             ^
Main.java:8: error: not a statement
		double x1= double.parseDouble(line[0]);
		                                  ^
Main.java:8: error: ';' expected
		double x1= double.parseDouble(line[0]);
		                                     ^
Main.java:9: error: class expected
		double y1= double.parseDouble(line[1]);
		                  ^
Main.java:9: error: ';' expected
		double y1= double.parseDouble(line[1]);
		                             ^
Main.java:9: error: not a statement
		double y1= double.parseDouble(line[1]);
		                                  ^
Main.java:9: error: ';' expected
		double y1= double.parseDouble(line[1]);
		                                     ^
Main.java:10: error: class expected
		double x2= double.parseDouble(line[2]);
		                  ^
Main.java:10: error: ';' expected
		double x2= double.parseDouble(line[2]);
		                             ^
Main.java:10: error: not a statement
		double x2= double.parseDouble(line[2]);
		                                  ^
Main.java:10: error: ';' expected
		double x2= double.parseDouble(line[2]);
		                                     ^
Main.java:11: error: class expected
		double y2= double.parseDouble(line[3]);
		                  ^
Main.java:11: error: ';' expected
		double y2= double.parseDouble(line[3]);
		                             ^
Main.java:11: error: not a statement
		double y2= double.parseDouble(line[3]);
		                                  ^
Main.java:11: error: ';' expected
		double y2= double.parseDouble(line[3]);
		                                     ^
16 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int x1 = sc.nextInt();
        int y1 = sc.nextInt();
        int x2 = sc.nextInt();
        int y2 = sc.nextInt();
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
    }
}


Compiler output:
Main.java:10: error: ')' or ',' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                              ^
Main.java:10: error: not a statement
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                  ^
Main.java:10: error: ';' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                      ^
Main.java:10: error: not a statement
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                              ^
Main.java:10: error: ';' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                                  ^
Main.java:10: error: not a statement
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                                       ^
Main.java:10: error: ';' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                                           ^
7 errors
Language: Java

import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        double x1 = sc.nextDouble();
        double y1 = sc.nextDouble();
        double x2 = sc.nextDouble();
        double y2 = sc.nextDouble();
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
    }
}


Compiler output:
Main.java:10: error: ')' or ',' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                              ^
Main.java:10: error: not a statement
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                  ^
Main.java:10: error: ';' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                      ^
Main.java:10: error: not a statement
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                              ^
Main.java:10: error: ';' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                                  ^
Main.java:10: error: not a statement
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                                       ^
Main.java:10: error: ';' expected
        System.out.println(Math.sqrt((x2 - x1)(x2 - x1) + (y2 - y1)(y2 - y1)));
                                                                           ^
7 errors
Language: Java

import java.math.BigDecimal;
import java.util.Scanner;
public class Main1{
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        double x = scan.nextDouble();
        double y = scan.nextDouble();
        double x2 = scan.nextDouble();
        double y2 =  scan.nextDouble();
        double result = Math.sqrt(((x - x2) *(x - x2)) + ((y - y2) * (y - y2)));
        if(BigDecimal.valueOf(result).scale() > 8) {
            System.out.printf("%.8f", result);
        }
        else{
            System.out.print(result);
        }
        System.out.println();
    }
}


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

import math
def main():
    p = map(float, raw_input().split())
    print "%.8f" % math.sqrt((p[2] - p[0]) ** 2.0 + (p[3] - p[1]) ** 2.0)

if __name__ == '__main__':
    main()


Compiler output:
Main.java:1: error: '.' expected
import math
           ^
Main.java:2: error: ';' expected
def main():
   ^
Main.java:6: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:6: error: unclosed character literal
if __name__ == '__main__':
                        ^
4 errors
Language: Java

import math
def main():
    (a, b, c) = map(int, raw_input().split())
    print "%.8f" % (a * b * math.sin(math.radians(c)) / 2.0)
    print "%.8f" % (a + b + math.sqrt(a ** 2.0 + b ** 2.0 - (2.0 * a * b * math.cos(math.radians(c)))))
    print "%.8f" % (b * math.sin(math.radians(c)))

if __name__ == '__main__':
    main()


Compiler output:
Main.java:1: error: '.' expected
import math
           ^
Main.java:2: error: ';' expected
def main():
   ^
Main.java:8: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:8: error: unclosed character literal
if __name__ == '__main__':
                        ^
4 errors
Language: Java

import math
def main():
    while True:
        n = float(raw_input().strip())
        if n == 0.0:
            break
        s = [float(x) for x in raw_input().split()]
        mean = float(sum(s) / n)
        print "%.8f" % (math.sqrt(sum([(x -mean) * (x - mean) for x in s]) / n))

if __name__ == '__main__':
    main()


Compiler output:
Main.java:1: error: '.' expected
import math
           ^
Main.java:2: error: ';' expected
def main():
   ^
Main.java:11: error: unclosed character literal
if __name__ == '__main__':
               ^
Main.java:11: error: unclosed character literal
if __name__ == '__main__':
                        ^
4 errors
Language: Java

import java.util.Scanner;
    public static void main(String[] args){
        Scanner scan=new Scanner(System.in);
        double x1=scan.nextInt();
        double y1=scan.nextInt();
        double x2=scan.nextInt();
        double y2=scan.nextInt();
        double a=x1-x2;
        double b=y1-y2;
        double c=0;
        if(Math.abs(a)==0||Math.abs(b)==0){
        	c=Math.abs(a)+Math.abs(b);
        }else{
        	c=Math.sqrt(Math.abs(a-b));
        }
        System.out.println(c);
            scan.close();
        }
}


Compiler output:
Main.java:2: 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:19: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double[] pt = new double[4];

		for (int i = 0; i < 4; i++) {
			pt[i] = sc.nextDouble();
		}

		double distance = Math.pow(pt[2] - pt[0], 2) + Math.pow(pt[3] - pt[1], 2);
		distance = Math.sqrt(distance);

		System.out.println(distance);

		sc.close();

	}

}



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

package icpc;

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		double x1 = sc.nextInt();
		double y1 = sc.nextInt();
		double x2 = sc.nextInt();
		double y2 = sc.nextInt();
		double a =  x1-x2;
		double b =  y1-y2;
		System.out.printf(Math.sqrt(a*a + b*b));
	}
}



Compiler output:
Main.java:14: error: no suitable method found for printf(double)
		System.out.printf(Math.sqrt(a*a + b*b));
		          ^
    method PrintStream.printf(String,Object...) is not applicable
      (argument mismatch; double cannot be converted to String)
    method PrintStream.printf(Locale,String,Object...) is not applicable
      (argument mismatch; double cannot be converted to Locale)
1 error