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

#include <stdio.h>
 
int main()
{
  int n;
  int m;
  scanf("%d %d", &n, &m)
  int count = n * (n - 1) / 2 + m * (m - 1) / 2
  printf("%i\n", count);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:25: error: expected ';' before 'int'
    7 |   scanf("%d %d", &n, &m)
      |                         ^
      |                         ;
    8 |   int count = n * (n - 1) / 2 + m * (m - 1) / 2
      |   ~~~
Language: C

#include <stdio.h>
 
int main()
{
  int n;
  int m;
  if ((scanf("%d", &n) == 1) && (scanf("%d", &m) == 1))
  {
  	int count = (n * (n - 1) / 2) + (m * (m - 1) / 2);
  }
  else
  {
    return 1;
  }
  return count;
}


Compiler output:
main.c: In function 'main':
main.c:15:10: error: 'count' undeclared (first use in this function)
   15 |   return count;
      |          ^~~~~
main.c:15:10: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

int kaizyou(int k);

int main() {
	int N,M;
  	int even = 0, odd = 0;
  	int ans = 0;
	cin >> N >> M;
	rep(i,N){
		even = kaizyou(N)/(2*kaizyou(N-2))//nC2
        odd = kaizyou(M)/(2*kaizyou(M-2))//mC2
	}
  	ans = even + odd;
    cout << ans << endl;
}

int kaizyou(int k){
    int sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:51: error: expected ';' before 'odd'
   14 |                 even = kaizyou(N)/(2*kaizyou(N-2))//nC2
      |                                                   ^
      |                                                   ;
   15 |         odd = kaizyou(M)/(2*kaizyou(M-2))//mC2
      |         ~~~
Language: C++

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

main() {
	ios::sync_with_stdio(0);
	cin.tie(0);
	int n, m;
	cin >> n >> m;
	cout << n * (n - 1) / 2 + m * (m - 1) / 2 << '\n';d
}


Compiler output:
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:59: error: 'd' was not declared in this scope
   10 |         cout << n * (n - 1) / 2 + m * (m - 1) / 2 << '\n';d
      |                                                           ^
Language: C++

#include <iostream>
using namesapce std;
int main() {
  int a,b;
  cin >> a >> b;
  cout << (a*(a-1))/2 + (b*(b-1))/2 << endl;
  return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> a >> 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:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |   cout << (a*(a-1))/2 + (b*(b-1))/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:40: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << (a*(a-1))/2 + (b*(b-1))/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<iostream>
int main(){int n,m;cin>>n>>m;std::cout<<(n-1)*n/2+(m-1)*m/2;return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:20: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    2 | int main(){int n,m;cin>>n>>m;std::cout<<(n-1)*n/2+(m-1)*m/2;return 0;}
      |                    ^~~
      |                    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
      |                  ^~~
Language: C++

#include <bits/stdc++.h>

using namespace std;
using ll = long long;
using p = pair<int, int>

int main() {
  int n, m;
  cin >> n >> m;
  int ans = 0;
  ans += n*(n-1) / 2;
  ans += m*(m-1) / 2;
  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc:5:11: error: two or more data types in declaration of 'type name'
    5 | using p = pair<int, int>
      |           ^~~~~~~~~~~~~~
Language: C++

#include <iostream.h>
using namespace std;

int main()
{
	int n,m;
	int sum1, sum2;

	cin >> n >> m;
	
	if ( n > 1 ) {
		sum1 = n * ( n - 1) / 2;
	} 
	else {
        sum1 = 0;
	}	
	
	if ( m > 1) {
		sum2  = m * ( m - 1 ) / 2;
	}
	else {
		sum2 = 0;
	}
	
	cout << sum1 + sum2 << endl;
	
	return 0;
}

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

#include <iostream>
using namespace std;

int main()
{
    int N, M combination = 0;
    cin >> N >> M;

    if (N > 0) {
        combination += N * (N - 1) / 2;
    }
    if (M > 0) {
        combination += M * (M - 1) / 2;
    }

    cout << combination << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:14: error: expected initializer before 'combination'
    6 |     int N, M combination = 0;
      |              ^~~~~~~~~~~
a.cc:7:17: error: 'M' was not declared in this scope
    7 |     cin >> N >> M;
      |                 ^
a.cc:10:9: error: 'combination' was not declared in this scope
   10 |         combination += N * (N - 1) / 2;
      |         ^~~~~~~~~~~
a.cc:13:9: error: 'combination' was not declared in this scope
   13 |         combination += M * (M - 1) / 2;
      |         ^~~~~~~~~~~
a.cc:16:13: error: 'combination' was not declared in this scope
   16 |     cout << combination << endl;
      |             ^~~~~~~~~~~
Language: Java

import java.util.Scanner;

public class sumTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();
        int sum = 0;

        if (N == 0 || N == 2) {
            System.out.println(M);
            return;
        }

        while (N != 0) {
            sum += --N;
        }

        System.out.println(sum + M);
    }
}

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

 #include <bits/stdc++.h>
2 int main(){
3 int L;
4 scanf("%d",&L);
5 printf("%.12f\n",(double)L*L*L/27);
6 }

Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2 int main(){
      | ^
Language: Java

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


Compiler output:
Main.java:8: error: variable cnt is already defined in method main(String[])
    int cnt = X*(X-1)/2+Y*(Y-1)/2;
        ^
1 error
Language: Java

import java.util.Scanner;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int X = sc.nextInt();
    int Y = sc.nextInt();
    int cnt = 0;
    int cnt = X*(X-1)/2+Y*Y(Y-1)/2;
    System.out.peintln(cnt);
  }
}

Compiler output:
Main.java:8: error: variable cnt is already defined in method main(String[])
    int cnt = X*(X-1)/2+Y*Y(Y-1)/2;
        ^
Main.java:8: error: cannot find symbol
    int cnt = X*(X-1)/2+Y*Y(Y-1)/2;
                          ^
  symbol:   method Y(int)
  location: class Main
Main.java:9: error: cannot find symbol
    System.out.peintln(cnt);
              ^
  symbol:   method peintln(int)
  location: variable out of type PrintStream
3 errors
Language: Java


public class Test {
    public static void main(String[] args) {
       int N = 1 ,M=1 ,count=0;
       System.out.println( M*(M-1) + ((N-1+M)*(N-M))/ 2 );
    }
    
}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
    int n=0,inp=0;
    cin>>n;
    vector<int> A;
    vector<int> count(n+1,0);
    for(int i=0;i<n;i++){
        cin>>inp;
        A.push_back(inp);
        count[inp]++;
    }
    int total=0;
        for(int j=0;j<n;j++){
            total+=(count[i]*(count[i]-1))/2;
        }
        for(int i=0;i<n;i++){
            cout<<total-count[A[i]]+1<<endl;
        }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: 'i' was not declared in this scope
   15 |             total+=(count[i]*(count[i]-1))/2;
      |                           ^
Language: C++

#include<stdio.h>
#include<iostream>
using namespace std;

int main(){
  int N,M;
  cin>>N>>M;
  
  cout<<N*(N-1)/2+M*(M-1)/2<<end1;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:30: error: 'end1' was not declared in this scope
    9 |   cout<<N*(N-1)/2+M*(M-1)/2<<end1;
      |                              ^~~~
Language: C++

#include<stdio.h>
#include<iostream>

int main(){
  int N,M;
  cin>>N>>M;
  
  cout<<N*(N-1)/2+M*(M-1)/2<<end1;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    6 |   cin>>N>>M;
      |   ^~~
      |   std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<N*(N-1)/2+M*(M-1)/2<<end1;
      |   ^~~~
      |   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:30: error: 'end1' was not declared in this scope
    8 |   cout<<N*(N-1)/2+M*(M-1)/2<<end1;
      |                              ^~~~
Language: Java

import java.util.Scanner;

public class sumTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int M = sc.nextInt();

        int sum = 0;

        while (N != 0) {
            sum += --N;
        }

        System.out.println(sum + M);
    }
}

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

#include <stdio.h>
#include <iostream>
using namescape std;

int main(){
  int N,M;
  cin>>N>>M;
  cout<<N*(N-1)/2+M*(M-1)/2<<endl;
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namescape'
    3 | using namescape std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>N>>M;
      |   ^~~
      |   std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<N*(N-1)/2+M*(M-1)/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:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    8 |   cout<<N*(N-1)/2+M*(M-1)/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>
#include <iostream>
using namescape std;

int main(){
  int N,M;
  cin>>N>>M;
  cout<<N*(N-1)/2+M*(M-1)<<end1;
    return 0;
}

Compiler output:
a.cc:3:7: error: expected nested-name-specifier before 'namescape'
    3 | using namescape std;
      |       ^~~~~~~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    7 |   cin>>N>>M;
      |   ^~~
      |   std::cin
In file included from a.cc:2:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:8:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |   cout<<N*(N-1)/2+M*(M-1)<<end1;
      |   ^~~~
      |   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:28: error: 'end1' was not declared in this scope
    8 |   cout<<N*(N-1)/2+M*(M-1)<<end1;
      |                            ^~~~
Language: C++

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


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

    int N;
    cin >> N;

    map<int,int> A;
    int a[N];
    for(int i=0;i<N;i++){
        cin >> a[i];
        A[a[i]]++;
    }

    map<int,int>::iterator it;
    /*
    for(it=A.begin();it!=A.end();it++){
        cout<<it->first<<" "<<it->second<<endl;
    }
    */
    long long ans;
    for(int i=0;i<N;i++){
        ans = 0;
        A[a[i]]--;
        for(it=A.begin();it!=A.end();it++){
            if(it->second > 1)  ans += it->second * (it->second -1) /2;
        }
        A[a[i]]++;
        cout << ans << endl;
    }

    return 0;
}



Compiler output:
a.cc:1:10: warning: missing terminating " character
    1 | #include "bits/stdc++.h>
      |          ^
a.cc:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include "bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'ios' has not been declared
    6 |     ios::sync_with_stdio(0);
      |     ^~~
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin.tie(0);
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | #include "bits/stdc++.h>
a.cc:12:5: error: 'map' was not declared in this scope
   12 |     map<int,int> A;
      |     ^~~
a.cc:1:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
  +++ |+#include <map>
    1 | #include "bits/stdc++.h>
a.cc:12:9: error: expected primary-expression before 'int'
   12 |     map<int,int> A;
      |         ^~~
a.cc:16:9: error: 'A' was not declared in this scope
   16 |         A[a[i]]++;
      |         ^
a.cc:19:9: error: expected primary-expression before 'int'
   19 |     map<int,int>::iterator it;
      |         ^~~
a.cc:28:9: error: 'A' was not declared in this scope
   28 |         A[a[i]]--;
      |         ^
a.cc:29:13: error: 'it' was not declared in this scope; did you mean 'i'?
   29 |         for(it=A.begin();it!=A.end();it++){
      |             ^~
      |             i
a.cc:33:9: error: 'cout' was not declared in this scope
   33 |         cout << ans << endl;
      |         ^~~~
a.cc:33:9: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:33:24: error: 'endl' was not declared in this scope
   33 |         cout << ans << endl;
      |                        ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #include "bits/stdc++.h>
Language: Java

import java.io.*;
import java.util.*;
import java.lang.*;

class GFG{
  public static void main(String[] args){
    int n;
    Scanner sc=new Scanner(System.in);
    n=sc.nextInt();
    int[] arr=new int[n];
    HashMap<Integer,Integer>hm=new HashMap();
    
    for(int i=0;i<n;i++){
    	arr[i]=sc.nextInt();
        if(hm.containsKey(arr[i])==false){
          hm.put(arr[i],1);
        }
        else{
          hm.put(arr[i], hm.get(arr[i])+1);
        }
    }
        //System.out.println(hm);
    int total=0;
    HashMap<Integer,Integer>hm2 = new HashMap();
    for(int i=0;i<n;i++){
      if(hm2.containsKey(arr[i])==false){
       	 int val = hm.get(arr[i]);
        val = (val*(val-1))/2;
        total+=val;
        hm2.put(arr[i],val);
      }
      
    }
    //System.out.println(hm2);
    for(int i=0;i<n;i++){
       int c = hm.get(arr[i]);
       System.out.println(total-(c-1));
      
      
    }
    
      
    
    
  }
  
}

Compiler output:
Note: Main.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Language: C++

#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int main(){ 
  int N,M;
  int ans=0;
  cin >>N;
  cin >>M;
  ans = (M+N)(M+N-1)/2-M(M-1)/2;
  cout <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expression cannot be used as a function
   21 |   ans = (M+N)(M+N-1)/2-M(M-1)/2;
      |         ~~~~~^~~~~~~
a.cc:21:25: error: 'M' cannot be used as a function
   21 |   ans = (M+N)(M+N-1)/2-M(M-1)/2;
      |                        ~^~~~~
Language: C++

#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int main(){ 
  int N,M;
  int ans=0;
  cin >>N;
  cin >>M;
  ans =((M+N)(M+N-1)-M(M-1))/2;
  cout <<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:14: error: expression cannot be used as a function
   21 |   ans =((M+N)(M+N-1)-M(M-1))/2;
      |         ~~~~~^~~~~~~
a.cc:21:23: error: 'M' cannot be used as a function
   21 |   ans =((M+N)(M+N-1)-M(M-1))/2;
      |                      ~^~~~~
Language: C++

#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int main(){ 
  int N,M;
  cin >>N;
  cin >>M;
  cout <<((M+N)(M+N-1)-M(M-1))/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:20:16: error: expression cannot be used as a function
   20 |   cout <<((M+N)(M+N-1)-M(M-1))/2<<endl;
      |           ~~~~~^~~~~~~
a.cc:20:25: error: 'M' cannot be used as a function
   20 |   cout <<((M+N)(M+N-1)-M(M-1))/2<<endl;
      |                        ~^~~~~
Language: C++

#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int main(){ 
  int N,M
  cin >>N>>M;
  cout <<((M+N)(M+N-1)-M(M-1))/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:3: error: expected initializer before 'cin'
   18 |   cin >>N>>M;
      |   ^~~
a.cc:19:12: error: 'M' was not declared in this scope
   19 |   cout <<((M+N)(M+N-1)-M(M-1))/2<<endl;
      |            ^
Language: C++

#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int main(){ 
  int N, M;
  cin >>N>>M;
  cout <<{(M+N)(M+N-1)-M(M-1)}/2<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:10: error: expected primary-expression before '{' token
   19 |   cout <<{(M+N)(M+N-1)-M(M-1)}/2<<endl;
      |          ^
a.cc:19:31: error: expected primary-expression before '/' token
   19 |   cout <<{(M+N)(M+N-1)-M(M-1)}/2<<endl;
      |                               ^
Language: C++

#include<algorithm>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<set>
#include<map>
#include<string>
#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define ll long long
using namespace std;
int main(){ 
  
  cin >>N>>M;
  cout <<{(M+N)(M+N-1)-M(M-1)}/2<<endl;
}
  
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'N' was not declared in this scope
   18 |   cin >>N>>M;
      |         ^
a.cc:18:12: error: 'M' was not declared in this scope
   18 |   cin >>N>>M;
      |            ^
a.cc:19:10: error: expected primary-expression before '{' token
   19 |   cout <<{(M+N)(M+N-1)-M(M-1)}/2<<endl;
      |          ^
a.cc:19:31: error: expected primary-expression before '/' token
   19 |   cout <<{(M+N)(M+N-1)-M(M-1)}/2<<endl;
      |                               ^
Language: C++

#include<iostream>
#include<stdio.h>

int conbination(int n, int m);
int factrial(int n);

int main(void){
  int N,M;
  scanf("%d %d",&N,&M);
  printf("%d",conbination(N,2)+conbination(M,2));
}

int conbination(int n, int m){
  if(n = m) return 1;
  else if(m = 0 || m = 1)return n;
  else return conbination(n-1, m-1) + conbination(n, m-1);
}

Compiler output:
a.cc: In function 'int conbination(int, int)':
a.cc:15:17: error: lvalue required as left operand of assignment
   15 |   else if(m = 0 || m = 1)return n;
      |               ~~^~~~
a.cc:17:1: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      | ^
Language: Java

import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
    	Scanner console = new Scanner(System.in);
    	int N = console.nextInt();
      int M = console.nextInt();
      System.out.println(combination(N) + combination(M));
	}
	
	public static int combination(int num){
	   int comb = 0;
      int temp = 1;
      for(int i = num; i > num - 2; i--){
         temp *= i;
      }
      temp /= 2;
      if(temp != 0){
         comb = temp;
     	}
     	return comb;
	}
}

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

import java.util.Scanner;
public class Solution{
	public static void main(String[] args){
    	Scanner console = new Scanner(System.in);
    	int N = console.nextInt();
      	int M = console.nextInt();
      	System.out.println(combination(N) + combination(M));
	}
	
	public static int combination(int num){
	    int comb = 0;
      	int temp = 1;
      	for(int i = num; i > num - 2; i--){
      	    temp *= i;
      	}
        temp /= 2;
      	if(temp != 0){
      	    comb = temp;
      	}
      	return comb;
	}
}

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

#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int L
  cin>>L;
  cout<<pow(L/3,3)<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: expected initializer before 'cin'
    6 |   cin>>L;
      |   ^~~
a.cc:7:13: error: 'L' was not declared in this scope
    7 |   cout<<pow(L/3,3)<<endl;
      |             ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  cout<<pow(2,n)*pow(2,m-1):
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:28: error: expected ';' before ':' token
    6 |   cout<<pow(2,n)*pow(2,m-1):
      |                            ^
      |                            ;
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m;
  cin>>n>>m;
  cout<<pow(2,n)*powe(2,m-1):
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: 'powe' was not declared in this scope; did you mean 'powl'?
    6 |   cout<<pow(2,n)*powe(2,m-1):
      |                  ^~~~
      |                  powl
Language: C++

#include <bits/stdc++.h>
#define db long double
#define N 505
#define eps 1e-7
using namespace std;
void io() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); }
ll n, m;

int main() {
	io(); cin >> n >> m;
	cout << n + m / 2;
}

Compiler output:
a.cc:7:1: error: 'll' does not name a type
    7 | ll n, m;
      | ^~
a.cc: In function 'int main()':
a.cc:10:22: error: 'n' was not declared in this scope; did you mean 'yn'?
   10 |         io(); cin >> n >> m;
      |                      ^
      |                      yn
a.cc:10:27: error: 'm' was not declared in this scope; did you mean 'tm'?
   10 |         io(); cin >> n >> m;
      |                           ^
      |                           tm
Language: C

#include<stdio.h>
void main()
{ int N,M;
 int result;
 int i,j,;
 int count=0;
 scanf("%d%d",&N,&M);
 for(i=0;i<N;i++)
 { for(j=i+1;j<=N;j++);
  { count++;
  }
 } 
  for(i=0;i<M;i++)
 { for(j=i+1;j<=M;j++);
  { count++;
  }
 } 
 printf("%d",count);


Compiler output:
main.c: In function 'main':
main.c:5:10: error: expected identifier or '(' before ';' token
    5 |  int i,j,;
      |          ^
main.c:18:2: error: expected declaration or statement at end of input
   18 |  printf("%d",count);
      |  ^~~~~~
Language: C

#include<stdio.h>
void main()
{ int N,M;
 int result;
 int i,j,count=0;
 scanf("%d%d",&N,&M);
 for(i=0;i<N;i++)
 { for(j=i+1;j<=N;j++);
  { count++;
  }
 } 
  for(i=0;i<M;i++)
 { for(j=i+1;j<=M;j++);
  { count++;
  }
 } 
 printf("%d",count);

Compiler output:
main.c: In function 'main':
main.c:17:2: error: expected declaration or statement at end of input
   17 |  printf("%d",count);
      |  ^~~~~~
Language: C++


#include <cstdio>

using namespace std;

int main()
{

	int n, m, result;

	scanf_s("%d %d", &n, &m);

	result =
		n * (n - 1) + m * (m - 1);

	printf_s("%d", result);
	return 0;

}

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

#include <cstdio>

int main()
{

	int n, m, result;

	scanf_s("%d %d", &n, &m);

	result =
		n * (n - 1) + m * (m - 1);

	printf_s("%d", result);
	return 0;

}


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

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N,M;
  int ans=0;
  ans+=N*(N-1)/2;
  ans+=M*(M-1)/2;
  cout<<ans<<endl;
return0
 
}


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

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n1,n2;
  n1 = (s.length()-1)/2;
  n2 = (s.length()+3)/2;
  bool b1;
  b1= IsP(s);
  bool b2;
  b2= IsP(s.substr(0,n1-1));
  bool b3;
  b3= IsP(s.substr(n2-1,s.length()-1));
  if (b1 && b2 && b3) {
    cout << "Yes"+ '\n';
  }else {
    cout << "No" + '\n'; }
}
 
bool IsP(string str)
{
    if (str.empty())
        return false;
 
    int i = 0;                // first characters
    int j = str.length() - 1; // last character
 
    while (i < j)
    {
        if (str[i] != str[j])
        {
            return false;
        }
        i++;
        j--;
    }
    return true;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:7: error: 'IsP' was not declared in this scope
   10 |   b1= IsP(s);
      |       ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n1,n2;
  n1 = (s.length()-1)/2;
  n2 = (s.length()+3)/2;
  bool b1 = IsP(s);
  bool b2 = IsP(s.substr(0,n1-1));
  bool b3 = IsP(s.substr(n2-1,s.length()-1));
  if (b1 && b2 && b3) {
    cout << 'Yes' + '\n';
  }else {
    cout << 'No' + '\n'; }
}
 
public bool IsP(string str)
{
    if (str.empty())
        return false;
 
    int i = 0;                // first characters
    int j = str.length() - 1; // last character
 
    while (i < j)
    {
        if (str[i] != str[j])
        {
            return false;
        }
        i++;
        j--;
    }
    return true;
}

Compiler output:
a.cc:13:13: warning: multi-character character constant [-Wmultichar]
   13 |     cout << 'Yes' + '\n';
      |             ^~~~~
a.cc:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     cout << 'No' + '\n'; }
      |             ^~~~
a.cc: In function 'int main()':
a.cc:9:13: error: 'IsP' was not declared in this scope
    9 |   bool b1 = IsP(s);
      |             ^~~
a.cc: At global scope:
a.cc:18:1: error: expected unqualified-id before 'public'
   18 | public bool IsP(string str)
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n1,n2;
  n1 = (s.length()-1)/2;
  n2 = (s.length()+3)/2;
  bool b1 = IsP(s);
  bool b2 = IsP(s.substr(0,n1-1));
  bool b3 = IsP(s.substr(n2-1,s.length()-1));
  if (b1 && b2 && b3) {
    cout << "Yes" << '\n';
  }else {
    cout << 'No' << '\n'; }
}
 
bool IsP(string str)
{
    if (str.empty())
        return false;
 
    int i = 0;                // first characters
    int j = str.length() - 1; // last character
 
    while (i < j)
    {
        if (str[i] != str[j])
        {
            return false;
        }
        i++;
        j--;
    }
    return true;
}

Compiler output:
a.cc:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     cout << 'No' << '\n'; }
      |             ^~~~
a.cc: In function 'int main()':
a.cc:9:13: error: 'IsP' was not declared in this scope
    9 |   bool b1 = IsP(s);
      |             ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n1,n2;
  n1 = (s.length()-1)/2;
  n2 = (s.length()+3)/2;
  bool b1 = IsP(s*);
  bool b2 = IsP(s.substr(0,n1-1));
  bool b3 = IsP(s.substr(n2-1,s.length()-1));
  if (b1 && b2 && b3) {
    cout << "Yes" << '\n';
  }else {
    cout << 'No' << '\n'; }
}
 
bool IsP(const string& str)
{
    if (str.empty())
        return false;
 
    int i = 0;                // first characters
    int j = str.length() - 1; // last character
 
    while (i < j)
    {
        if (str[i] != str[j])
        {
            return false;
        }
        i++;
        j--;
    }
    return true;
}

Compiler output:
a.cc:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     cout << 'No' << '\n'; }
      |             ^~~~
a.cc: In function 'int main()':
a.cc:9:19: error: expected primary-expression before ')' token
    9 |   bool b1 = IsP(s*);
      |                   ^
a.cc:9:13: error: 'IsP' was not declared in this scope
    9 |   bool b1 = IsP(s*);
      |             ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n1,n2;
  n1 = (s.length()-1)/2;
  n2 = (s.length()+3)/2;
  bool b1 = IsP(s);
  bool b2 = IsP(s.substr(0,n1-1));
  bool b3 = IsP(s.substr(n2-1,s.length()-1));
  if (b1 && b2 && b3) {
    cout << "Yes" << '\n';
  }else {
    cout << 'No' << '\n'; }
}
 
bool IsP(const string& str)
{
    if (str.empty())
        return false;
 
    int i = 0;                // first characters
    int j = str.length() - 1; // last character
 
    while (i < j)
    {
        if (str[i] != str[j])
        {
            return false;
        }
        i++;
        j--;
    }
    return true;
}

Compiler output:
a.cc:15:13: warning: multi-character character constant [-Wmultichar]
   15 |     cout << 'No' << '\n'; }
      |             ^~~~
a.cc: In function 'int main()':
a.cc:9:13: error: 'IsP' was not declared in this scope
    9 |   bool b1 = IsP(s);
      |             ^~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int m;
  cin >> n;
  cin >> m;
  int res;
  res = (n*(n-1))/(m*(m-1))
  cout << res << '\n';
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before 'cout'
    9 |   res = (n*(n-1))/(m*(m-1))
      |                            ^
      |                            ;
   10 |   cout << res << '\n';
      |   ~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int m;
  cin >> n;
  cin >> m;
  int res;
  res = (n*(n-1))/(m*(m-1))
  cout << res;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before 'cout'
    9 |   res = (n*(n-1))/(m*(m-1))
      |                            ^
      |                            ;
   10 |   cout << res;
      |   ~~~~
Language: C++

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

int main() {
  long long n,n;
  cin >> n >> m;
  cout << (n*(n-1))/(m*(m-1))
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:15: error: redeclaration of 'long long int n'
    5 |   long long n,n;
      |               ^
a.cc:5:13: note: 'long long int n' previously declared here
    5 |   long long n,n;
      |             ^
a.cc:6:15: error: 'm' was not declared in this scope
    6 |   cin >> n >> m;
      |               ^
Language: C

#include <stdio.h>
int main(){
  
int N;
int M;
int sum;
  
scanf("%d", &N);
scanf("%d", &M);
  
sum = (N*(N-1)+M*(M-1))/2;
  print("%d",sum);
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:3: error: implicit declaration of function 'print'; did you mean 'printf'? [-Wimplicit-function-declaration]
   12 |   print("%d",sum);
      |   ^~~~~
      |   printf
Language: C

#include<stdio.h>
int fact(int n)
{
  if n==0
    return 1;
  else 
    return n*fact(n-1);
}
int main()
{
  int n,m,s1,s2,s3,s4,s5;
  scanf("%d %d",&n,&m);
  s1=fact(n);
  s2=fact(n-2);
  s3=fact(m);
  s4=fact(m-2);
  s5=(s1/(s2*2))+(s3/(s4*2));
  printf("%d",s5);
}

Compiler output:
main.c: In function 'fact':
main.c:4:6: error: expected '(' before 'n'
    4 |   if n==0
      |      ^
      |      (
Language: C++

#include <iostream>
#include <vector>
using namespace std;
int main()
{
	int N;
	cin >> N;

	vector <int> A(N);
	vector <int> ans(N,0);

	for(int i = 0; N > i; i++){
		cin >> A[i];
	}

	int num,j;

	for(int k = 0; N > k; k++){
		vector <int> B(N);
		for(int i = 0; N > i; i++){
			B[i] = A[i];
		}
		B.erase(B.begin()+k);

		sort(B.begin(), B.end());

		j = 0;

		while(N-2 > j){
			num = 1;
			while(B[j] == B[j+1]){
				num++;
				j++;
				if(j+1 > N-2){
					break;
				}
			}
			ans[k] = ans[k] + num*(num - 1)/2;
			j++;
		}

/*
		cout << "\n";
		for(int i = 0; N-1 > i; i++){
			cout << B[i] << "\n";
		}
*/
	}

	for(int k = 0; N > k; k++){
		cout << ans[k] <<"\n";
	}




	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |                 sort(B.begin(), B.end());
      |                 ^~~~
      |                 short
Language: Java

import java.util.Scanner;

public class hef {
	

	public static void main(String[] args) {

		Scanner s = new Scanner(System.in);
		int n = s.nextInt();
		int m = s.nextInt();
		System.out.println(((n)*(n-1))/2 + ((m)*(m-1))/2);
	}
}

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

#include<iostream>
#include<vector>

int main(){
    int N, M;
    std::cin >> N >> M;
 
    std::vector<int> balls;

    for( int i = 1; i <= N; i++ ){
        int even = 2*i;
        balls.push_back(even);
        //std::cout << even << ", ";
    }

    for( int i = 1; i <= M; i++ ){
        int odd = 2*i - 1;
        balls.push_back(odd);
        //std::cout << odd << ", ";
    }

    //std::vector<int> pair;
    std::vector< std::vector<int> > pairs;

    for( int i = 0; i < balls.size(); i++ ){
        for( int j = 0; j < balls.size(); j++ ){
            // std::cout << balls[i] << " + " << balls[j] << " = " << balls[i]+balls[j] << std::endl;
            if( i != j ){
                if( (balls[i]+balls[j])%2 == 0 ){
                    std::vector<int> pair;
                    pair.push_back(balls[i]);
                    pair.push_back(balls[j]);
                    pairs.push_back(pair);
                }
            }
        }
    }

    std::vector< std::vector<int> > unique_pairs;
    unique_pairs.push_back(pairs[0]);

    for( int i = 0; i < pairs.size(); i++ ){
        bool is_unique = true;
        for( int j = 0; j < unique_pairs.size(); j++ ){
            if( pairs[i] == unique_pairs[j] ){ is_unique = false; }
            else if( pairs[i][0] == unique_pairs[j][1] && pairs[i][1] == unique_pairs[j][0] ){ is_unique = false; }
        }
        if( is_unique == true ){
            unique_pairs.push_back(pairs[i]);
        }

    std::cout << unique_pairs.size();

    return 0;
}

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

#include<bits/stdc++.h>
//#include <iomanip>
using namespace std;
int main()
{
  int L;
  double ans;
  cin>>L;
  ans=(L*L*L)/27);
  printf("%.12f\n",ans;
  //cout<<fixed<<setprecision(12)<<ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: expected ';' before ')' token
    9 |   ans=(L*L*L)/27);
      |                 ^
      |                 ;
a.cc:10:23: error: expected ')' before ';' token
   10 |   printf("%.12f\n",ans;
      |         ~             ^
      |                       )
Language: C++

#include <iostream>

using namespace std;

long long factorial(int n);

int main () { 
    long long N, M, res;
    cin >> N >> M;
    
    res = factorial(N)/(factorial(2) * factorial(N - 2));
    res = res + factorial(M)/(factorial(2) * factorial(M - 2));
    cout << res;
    return 0;
}

long long factorial(long long n) {
    if(n > 1) {
        return n * factorial(n - 1);
    } else {
        return 1;
    }
}

Compiler output:
/usr/bin/ld: /tmp/ccCyy7wy.o: in function `main':
a.cc:(.text+0x3a): undefined reference to `factorial(int)'
/usr/bin/ld: a.cc:(.text+0x47): undefined reference to `factorial(int)'
/usr/bin/ld: a.cc:(.text+0x58): undefined reference to `factorial(int)'
/usr/bin/ld: a.cc:(.text+0x79): undefined reference to `factorial(int)'
/usr/bin/ld: a.cc:(.text+0x86): undefined reference to `factorial(int)'
/usr/bin/ld: /tmp/ccCyy7wy.o:a.cc:(.text+0x97): more undefined references to `factorial(int)' follow
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>

using namespace std;

long long factorial(int n);

int main () { 
    long long N, M, res;
    cin >> N >> M;
    
    res = factorial(N)/(factorial(2) * factorial(N - 2));
    res = res + factorial(K)/(factorial(2) * factorial(K - 2));
    cout << res;
    return 0;
}

long long factorial(long long n) {
    if(n > 1) {
        return n * factorial(n - 1);
    } else {
        return 1;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:27: error: 'K' was not declared in this scope
   12 |     res = res + factorial(K)/(factorial(2) * factorial(K - 2));
      |                           ^
Language: Java

import java.util.*;
public class solution{
	public static void main(String args[]){
      	Scanner sc  = new Scanner(System.in);
 		int n = sc.nextInt();
      	int m = sc.nextInt();
      	int ans = (n * (n - 1) )+ (m * (m - 1)) / 2;
        System.out.println(ans);
      
    }
}

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

#include<bits/stdc++.h>
using namespace std;
  
int main()
{
    duble n;
    cin>>n;
    n = n/3;
    n = n*n*n;
    cout<<n;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: 'duble' was not declared in this scope; did you mean 'double'?
    6 |     duble n;
      |     ^~~~~
      |     double
a.cc:7:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |     cin>>n;
      |          ^
      |          yn
Language: C

#include<stdio.h>
int main(){
	COMinit;
	int N,M;
	scanf("%d",&N);
	scanf("%d",&M);
	printf("%lld",N*(N-1)/2+M*(M-1)/2);
}

Compiler output:
main.c: In function 'main':
main.c:3:9: error: 'COMinit' undeclared (first use in this function)
    3 |         COMinit;
      |         ^~~~~~~
main.c:3:9: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<iostream>
using namespace std;
int main(){
int N,M;
cin>>N>>M;
cout<<N*(N-1)/2+M*(M-1)/2<<endl;
return0;
}

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

#include<stdio.h>
int fact(int n);
int nCr(int n,int r);
int main()
{
  long int n,m,s1=0,s2=0;
  scanf("%d %d",&n,&m);
  if(n==0||n==1)
    s1=0;
  else
    s1=nCr(n,2);
  
  if(m==0||m==1)
    s2=0;
  else
    s2=nCr(m,2);
  
  printf("%ld",s1+s2);
  
  return0;
}
  
  

  
int nCr(int n, int r) 
{ 
    return fact(n) / (fact(r) * fact(n - r)); 
} 
  

int fact(int n) 
{ 
    int res = 1; 
    for (int i = 2; i <= n; i++) 
        res = res * i; 
    return res; 
}

Compiler output:
main.c: In function 'main':
main.c:20:3: error: 'return0' undeclared (first use in this function)
   20 |   return0;
      |   ^~~~~~~
main.c:20:3: note: each undeclared identifier is reported only once for each function it appears in
Language: Java

import java.util.*;

public class Main{
{
public static void main(String[] arg)
{
Scanner s=new Scanner(System.in);
int N=s.nextInt();
int M=s.nextInt();
System.out.println(N*(N+1)/2+M*(M+1)/2);
}
}
} 

Compiler output:
Main.java:5: error: illegal start of expression
public static void main(String[] arg)
^
Main.java:13: error: class, interface, enum, or record expected
} 
^
2 errors
Language: C++

#include <bit/stdc++.h>
using namespace std;
int N, M;
int main () {
	cin >> N >> M;
  	cout << (N-1)*N/2 + (M-1)*M/2;
}

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

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int M = sc.nextInt();
		// スペース区切りの整数の入力
		int N = sc.nextInt();
//		int c = sc.nextInt();
	
		// 文字列の入力
//		String s = sc.next();
		// 出力
//		System.out.println((a+b+c) + " " + s);
		
		System.out.println(M*(M-1)/2 + N*(N-1)/2);

	}
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args){
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:17: error: class, interface, enum, or record expected
}
^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long[] a=new long[n];
		long[] g=new long[n+1];
      	int al=0;
		for(int i=0;i<n;i++){
			a[i]= sc.nextInt();
          	al+=g[a[i]];
          	g[a[i]]++;
		}
      	long all=0;
      	for(int i=0;i<n;i++){
          all+=g[i]*(g[i]-1)/2;
          //System.out.println(x);
        }  
      	//System.out.println(all);
		//System.out.println(al);

		for(int i=0;i<n;i++){
			System.out.println(all-g[a[i]]+1);
		}
		
	}
}


Compiler output:
Main.java:11: error: incompatible types: possible lossy conversion from long to int
          	al+=g[a[i]];
          	       ^
Main.java:12: error: incompatible types: possible lossy conversion from long to int
          	g[a[i]]++;
          	   ^
Main.java:23: error: incompatible types: possible lossy conversion from long to int
			System.out.println(all-g[a[i]]+1);
			                          ^
3 errors
Language: C

#include<stdio.h>
const int MAX = 510000;
const int MOD = 1000000007;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
	fac[0] = fac[1] = 1;
	finv[0] = finv[1] = 1;
	inv[1] = 1;
	for (int i = 2; i < MAX; i++){
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
		finv[i] = finv[i - 1] * inv[i] % MOD;
	}
}

// 二項係数計算
long long COM(int n, int k){
	if (n < k) return 0;
	if (n < 0 || k < 0) return 0;
	return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
int main(){
	COMinit;
	int N,M;
	scanf("%d",N);
	scanf("%d",M);
	printf("%d",COM(N,2)+COM(M,2));
}


Compiler output:
main.c:5:11: error: variably modified 'fac' at file scope
    5 | long long fac[MAX], finv[MAX], inv[MAX];
      |           ^~~
main.c:5:21: error: variably modified 'finv' at file scope
    5 | long long fac[MAX], finv[MAX], inv[MAX];
      |                     ^~~~
main.c:5:32: error: variably modified 'inv' at file scope
    5 | long long fac[MAX], finv[MAX], inv[MAX];
      |                                ^~~
Language: C++

#include <bits/stdc++.h> 
using namespace std; 
  
void volume(double s) 
{  
    double length = s / 3; 
  	int l=length;
  	length-=l;
  float y=3*length*l*s/3;
  
  	l=l*l*l;
  
  	length=length*length*length;w
  	y+=length;
  int y1=y;
  float y2=y-y1
    l+=y1;
  	int x=y2*1000000;
  cout<<l<<"."<<x;
    
} 
int main() 
{ 
    double s ;
	cin>>s; 
    volume(s); 
    return 0; 
} 

Compiler output:
a.cc: In function 'void volume(double)':
a.cc:13:37: error: 'w' was not declared in this scope
   13 |         length=length*length*length;w
      |                                     ^
a.cc:17:5: error: expected ',' or ';' before 'l'
   17 |     l+=y1;
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N, M, A, n, m;
  cin >> N >> M;
  
  n = N - 1
  m = M - 1
  A = N*n/2 + M*m/2
    
  cout << A << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: expected ';' before 'm'
    8 |   n = N - 1
      |            ^
      |            ;
    9 |   m = M - 1
      |   ~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N, M, A;
  cin >> N >> M;
  
  A = N*(N-1)/2 + M*(M-1)/2
    
  cout << A << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before 'cout'
    8 |   A = N*(N-1)/2 + M*(M-1)/2
      |                            ^
      |                            ;
    9 | 
   10 |   cout << A << endl;
      |   ~~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  int N, M, A;
  cin >> N >> M;
  
  A = N*(N-1)/2 + M*(M-1)/2
    
  cout << A <<endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:28: error: expected ';' before 'cout'
    8 |   A = N*(N-1)/2 + M*(M-1)/2
      |                            ^
      |                            ;
    9 | 
   10 |   cout << A <<endl;
      |   ~~~~
Language: C

    #include <stdio.h>
    int main ()
    {long long int a=1,b=1,c=1,d=1,n,i,e,o,j;
    scanf("%lld%lld",&e,&o);

    for(i=1;i<=e;i++)
    {
        a=a*i;
    }
    for(i=1;i<=o;i++)
    {
        b=b*i;
    }
    for(i=1;i<=(e-2);i++)
    {
        c=c*i;
    }
    for(i=1;i<=(o-2);i++)
    {
        d=d*i;
    }
    e=a/(2*c);
    o=b/(2*d);
    printf("%lld\n"(o+e));
        return 0;
    }


Compiler output:
main.c: In function 'main':
main.c:24:12: error: called object is not a function or function pointer
   24 |     printf("%lld\n"(o+e));
      |            ^~~~~~~~