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

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

public class ABC139 {
    public static void main(String[] args) {
        MyScanner sc = new MyScanner();

        int n = sc.nextInt();

        System.out.println(n * (n-1) / 2);
    }

    static class MyScanner {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in), 1 << 15);
        StringTokenizer tokenizer;

        String next() {
            try {
                while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                    tokenizer = new StringTokenizer(reader.readLine());
                }
            } catch (IOException ignored) {
            }
            return tokenizer.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
    }
}

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

#include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for(ll i=(begin);i<(end);i++)
#define REP(i, n) FOR(i,0,n)
#define IFOR(i, begin, end) for(ll i=(begin)-1;i>=(end);i--)
#define IREP(i, n) IFOR(i,n,0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.end(),greater<ll>())
#define REVERSE(a) reverse(a.begin(), a.end())
#define debug(x) cout << #x << "=" << x << endl;
#define vdebug(v) cout << #v << "=(" << v[0]; FOR(i_debug, 1, v.size()){ cout << "," << v[i_debug]; } cout << ")" << endl;
#define mdebug(m) cout << #m << "=" << endl; REP(i_debug, m.size()){ REP(j_debug, m[i_debug].size()){ cout << m[i_debug][j_debug] << ","; } cout << endl;}
#define Lower_bound(v, x) distance(v.begin(), lower_bound(v.begin(), v.end(), x))
#define Upper_bound(v, x) distance(v.begin(), upper_bound(v.begin(), v.end(), x))
#define Max(a, b) a = max(a, b)
#define Min(a, b) a = min(a, b)

#define ll long long
#define f first
#define s second
#define mp make_pair
#define pb push_back
#define INF 1000000000000000000

using vec = vector<ll>;
using mat = vector<vec>;
using Pii = pair<ll, ll>;
using PiP = pair<ll, Pii>;
using PPi = pair<Pii, ll>;
using bvec = vector<bool>;
using Pvec = vector<Pii>;


template<typename T> void readv(vector<T> &a) { REP(i, a.size()) cin >> a[i]; }
void readv_m1(vector<int> &a) { REP(i, a.size()) {cin >> a[i]; a[i]--;} }

ll mod = 1000000007;

int main()
{
	// 入力
	ll N;
	cin >> N;

	ans = N * (N - 1) / 2;

	cout << ans << endl;

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:45:9: error: 'ans' was not declared in this scope; did you mean 'abs'?
   45 |         ans = N * (N - 1) / 2;
      |         ^~~
      |         abs
Language: Java

import java.util.*;

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

      long n = sc.nextLong();

      long ans = n*(n-1)/2;

      System.out.println(ans);

    }
}


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

#include<stdio.h>

int main(){
  lnog long n;
  scanf("%lld",&n);
  printf("%lld\n",n*(n+1)/2);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: 'lnog' undeclared (first use in this function)
    4 |   lnog long n;
      |   ^~~~
main.c:4:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:4:7: error: expected ';' before 'long'
    4 |   lnog long n;
      |       ^~~~~
      |       ;
main.c:5:17: error: 'n' undeclared (first use in this function)
    5 |   scanf("%lld",&n);
      |                 ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'll' was not declared in this scope
    2 |   ll n;
      |   ^~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> n;
      |   ^~~
a.cc:3:10: error: 'n' was not declared in this scope
    3 |   cin >> n;
      |          ^
a.cc:4:5: error: expected ';' before 'ans'
    4 |   ll ans = n*(n-1)/2;
      |     ^~~~
      |     ;
a.cc:5:3: error: 'cout' was not declared in this scope
    5 |   cout << ans << endl;
      |   ^~~~
a.cc:5:11: error: 'ans' was not declared in this scope
    5 |   cout << ans << endl;
      |           ^~~
a.cc:5:18: error: 'endl' was not declared in this scope
    5 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include <bits/stdc++.h>
2.using namespace std;
3. 
4.int main() {
5.  long long n;
6.  cin >> n;
7.  long long ans = n*(n-1)/2;
8.  cout << ans << endl;
9.}


Compiler output:
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.using namespace std;
      | ^~~~~~~
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 3.
      | ^~
Language: C++

#include <queue>
#include <set>
#include <map>
#include <functional>
#include <numeric>
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
int main() {
    int n;
    unsigned long long ans = 0, temp = 0;
 
    cin >> n;
 
    ans = ((ll)(n) * (ll)(n-1)) / 2;
 
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'cin' was not declared in this scope
   15 |     cin >> n;
      |     ^~~
a.cc:6:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    5 | #include <numeric>
  +++ |+#include <iostream>
    6 | 
a.cc:19:5: error: 'cout' was not declared in this scope
   19 |     cout << ans << endl;
      |     ^~~~
a.cc:19:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:20: error: 'endl' was not declared in this scope
   19 |     cout << ans << endl;
      |                    ^~~~
a.cc:6:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    5 | #include <numeric>
  +++ |+#include <ostream>
    6 |
Language: C++

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <set>
#include <map>
#include <functional>
#include <numeric>
 
using namespace std;
typedef long long int ll;
typedef pair <int,int> P;
 
int main() {
    int n;
    unsigned long long ans = 0, temp = 0;
 
    cin >> n;
 
    ans = (ll)(n) * (ll)(n-1)) / 2;
 
    cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:30: error: expected ';' before ')' token
   21 |     ans = (ll)(n) * (ll)(n-1)) / 2;
      |                              ^
      |                              ;
Language: Java

import java.util.Scanner;

public class ABC139D {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		long n = Long.parseLong(sc.next());
		sc.close();
		System.out.println(n * (n-1) / 2);
	}

}

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

#include <iostream>

int main() {
  long long n;
  cin >> n;
  std::cout << n * (n - 1) / 2 << std::endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   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 <iostream>

int main() {
  long long n;
  cin >> n;
  cout << n * (n - 1) / 2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   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 << n * (n - 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:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << n * (n - 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>
using namespace std;

int main(){
  long long n,ans;
  cin >> n;
  ans = n*(n-1)/2
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected ';' before 'cout'
    7 |   ans = n*(n-1)/2
      |                  ^
      |                  ;
    8 |   cout << ans;
      |   ~~~~
Language: C++

#include <iostream>

int main() {
  long long n;
  cin >> n;
  cout << n * (n - 1) / 2 << endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |   cin >> n;
      |   ^~~
      |   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 << n * (n - 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:30: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
    6 |   cout << n * (n - 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)
      |     ^~~~
a.cc:6:35: error: expected '}' at end of input
    6 |   cout << n * (n - 1) / 2 << endl;
      |                                   ^
a.cc:3:12: note: to match this '{'
    3 | int main() {
      |            ^
Language: C++

#include<iostream>
using namespace std;

int main(){
  longlong n,ans;
  cin >> n;
  ans = n*(n-1)/2
  cout << ans;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'longlong' was not declared in this scope
    5 |   longlong n,ans;
      |   ^~~~~~~~
a.cc:6:10: error: 'n' was not declared in this scope
    6 |   cin >> n;
      |          ^
a.cc:7:3: error: 'ans' was not declared in this scope; did you mean 'abs'?
    7 |   ans = n*(n-1)/2
      |   ^~~
      |   abs
Language: C++

#include<bits/stdc++.h>
 
using namespace std;
 
int main()
{
  
    int n;
    cin>>n;
    int a[n];
    COUT<<n*(n-1)/2;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'COUT' was not declared in this scope
   11 |     COUT<<n*(n-1)/2;
      |     ^~~~
Language: C++

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stdio.h>
#include <map>
#include <set>
#include <utility>
#include <queue>
#include <bitset>
#include <math.h>
#include <numeric>
#include <stack>

using namespace std;
 
#define rep(i,m,n) for(int i=m;i<(int)(n);i++)
#define endl '\n'
typedef long long ll;

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin>>n;
    cout<<n*(n-1)/2<<endl;

//1~n-1の総和の式がn*(n-1)/2

Compiler output:
a.cc: In function 'int main()':
a.cc:26:27: error: expected '}' at end of input
   26 |     cout<<n*(n-1)/2<<endl;
      |                           ^
a.cc:21:11: note: to match this '{'
   21 | int main(){
      |           ^
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 main(){
  ll n;
  cin >> n;
  ll ans = n * (n-1)/2;
  cout << ans << endl;
  return 0
}


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

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

int main(void){
    ll n;
    cin >> n;
    cout << (n-1)*(n-2)/2 << endl;
    return 0;
}


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

#include "bits/stdc++.h"
using namespace  std;
int main()
  {
  
  long long a;
  cin>>a

  
cout<<(a*(a-1))/2;

    return 0;
       
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ';' before 'cout'
    7 |   cin>>a
      |         ^
      |         ;
......
   10 | cout<<(a*(a-1))/2;
      | ~~~~
Language: C++

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

int main(){
  int n;
  cin >> n;
  vector<int> f(n);
  rep(i,n) f[i]=i;
  int dai,sum; sum=0 dai=0;
  f[n-1]=1;
  for(int i=0;i<n-1;i++){
    f[n]=n+1;
  }
  for(int i=0;i<n;i++){
    sum=sum+f[i]%(i+1);
  }
  cout << sum << endl;
}
    
      

Compiler output:
a.cc: In function 'int main()':
a.cc:10:21: error: expected ';' before 'dai'
   10 |   int dai,sum; sum=0 dai=0;
      |                     ^~~~
      |                     ;
Language: Java

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

public class ClassName {
    public static void main(String[] args) throws IOException {
        FastScanner sc = new FastScanner(System.in);
        PrintWriter pw = new PrintWriter(System.out);
        
        int n = sc.nextInt();
      pw.println(n*(n-1)/2);
        
        pw.close();
    }
    static class FastScanner {
    	private InputStream stream;
    	private byte[] buf = new byte[1024];
    	private int curChar;
    	private int numChars;
    	private FastScanner.SpaceCharFilter filter;
    	
    	public FastScanner(InputStream stream) {
    		this.stream = stream;
    	}
    	
    	public int read() {
    		if (numChars == -1) {
    			throw new InputMismatchException();
    		}
    		if (curChar >= numChars) {
    			curChar = 0;
    			try {
    				numChars = stream.read(buf);
    			} catch (IOException e) {
    				throw new InputMismatchException();
    			}
    			if (numChars <= 0) {
    				return -1;
    			}
    		}
    	return buf[curChar++];
    	}
    	
    	public int nextInt() {
    		int c = read();
    		while (isSpaceChar(c)) {
    			c = read();
    		}
    		int sgn = 1;
    		if (c == '-') {
    			sgn = -1;
    			c = read();
    		}
    		int res = 0;
    		do {
    			if (c < '0' || c > '9') {
    				throw new InputMismatchException();
    			}
    			res *= 10;
    			res += c - '0';
    			c = read();
    		} while (!isSpaceChar(c));
    		return res * sgn;
    	}
    	
    	public String nextString() {
    		int c = read();
    		while (isSpaceChar(c)) {
    			c = read();
    		}
    		StringBuilder res = new StringBuilder();
    		do {
    			if (Character.isValidCodePoint(c)) {
    				res.appendCodePoint(c);
    			}
    			c = read();
    		} while (!isSpaceChar(c));
    			return res.toString();
    	}
    	
    	public boolean isSpaceChar(int c) {
    		if (filter != null) {
    			return filter.isSpaceChar(c);
    		}
    		return isWhitespace(c);
    	}
    	
    	public static boolean isWhitespace(int c) {
    		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
    	}
    	
    	public int[] nextIntArray(int n) {
    		int[] array = new int[n];
    		for (int i = 0; i < n; ++i) array[i] = nextInt();
    		return array;
    	}
    	
    	public interface SpaceCharFilter {
    	public boolean isSpaceChar(int ch);
    	
    	}
    }
}

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

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

int main() {
  int n;
  cin >>n;
  
  cout << n(n-1)/2 <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:12: error: 'n' cannot be used as a function
    8 |   cout << n(n-1)/2 <<endl;
      |           ~^~~~~
Language: C++

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

int main() {
  int n;
  cin >>n;
  int t=0;
  for(int i=1; i<n){
    t=t+i;
  }
  cout << t <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before ')' token
    8 |   for(int i=1; i<n){
      |                   ^
      |                   ;
Language: C++

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

int main() {
  int n;
  cin >>n;
  int t=0;
  for(int i=1; i<n){
    t=t+i
  }
  cout << t <<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected ';' before ')' token
    8 |   for(int i=1; i<n){
      |                   ^
      |                   ;
a.cc:9:10: error: expected ';' before '}' token
    9 |     t=t+i
      |          ^
      |          ;
   10 |   }
      |   ~
Language: C++

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

int main(){
    int N;
    cin >> N;
    int64_t ans = 0;

    ans = (N*N-1) / 2

    cout << ans;
    return 0;
}

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

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

int main(){
    int N;
    cin >> N;
    int ans = 0;

    for (i=1; i<N; i++){
        ans = ans + i;
    }

    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'i' was not declared in this scope
    9 |     for (i=1; i<N; i++){
      |          ^
Language: C++

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

int main(){
    int N;
    cin >> N;
    int ans = 0;

    for (i=1; i<N; i++){
        ans += i;
    }

    cout << ans;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:10: error: 'i' was not declared in this scope
    9 |     for (i=1; i<N; i++){
      |          ^
Language: C++

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

int main() {
  long N;
  cin >> N;
  cout << N * (N-1) / 2
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: expected ';' before '}' token
    7 |   cout << N * (N-1) / 2
      |                        ^
      |                        ;
    8 | }
      | ~
Language: C++

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

int main(){
    int N;
    cin >> N;
    int ans = 0;
    ans = (N*N+1) / 2

    cout << ans;
    return 0;
}

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

#include <bits/stdc++.h>
using namespace std;
int main()
{
  lint n; cin>>n;
  lint sum = 0;
  if(n ==1) sum = 0;
  else sum = n*(n-1)*0.5;  //WA
  else sum = n*(n-1)/2.0     //AC
  cout << sum << "\n";
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'lint' was not declared in this scope; did you mean 'uint'?
    5 |   lint n; cin>>n;
      |   ^~~~
      |   uint
a.cc:5:16: error: 'n' was not declared in this scope; did you mean 'yn'?
    5 |   lint n; cin>>n;
      |                ^
      |                yn
a.cc:6:7: error: expected ';' before 'sum'
    6 |   lint sum = 0;
      |       ^~~~
      |       ;
a.cc:7:13: error: 'sum' was not declared in this scope
    7 |   if(n ==1) sum = 0;
      |             ^~~
a.cc:8:8: error: 'sum' was not declared in this scope
    8 |   else sum = n*(n-1)*0.5;  //WA
      |        ^~~
a.cc:9:3: error: 'else' without a previous 'if'
    9 |   else sum = n*(n-1)/2.0     //AC
      |   ^~~~
a.cc:9:8: error: 'sum' was not declared in this scope
    9 |   else sum = n*(n-1)/2.0     //AC
      |        ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define SZ(x) ((int)(x).size())
#define debug(x) cerr << #x << ": " << x << '\n'
#define INF 999999999
typedef long long int Int;
using ll = long long;
using VI = vector<int>;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:22: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<'
   16 |   cout < (n*(n-1))/2 << endl;
      |          ~~~~~~~~~~~~^~~~~~~
Language: C

#include <stdio.h>

int main(){
  longlong i;
  scanf("%d",&i);
  printf("%d",i*(i-1)/2);
  return(0);
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'longlong'
    4 |   longlong i;
      |   ^~~~~~~~
Language: C++

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

int main()
{
  ll N;
  cin >> N;
  cout << (N-1)*N/2 << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'll' was not declared in this scope
    6 |   ll N;
      |   ^~
a.cc:7:10: error: 'N' was not declared in this scope
    7 |   cin >> N;
      |          ^
Language: Java

import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int i = 0;	
		for(int i = 0; i<N ; i++) {
			i=i+i;
		}
      	System.out.println(i);
	}
}

Compiler output:
Main.java:8: error: variable i is already defined in method main(String[])
		for(int i = 0; i<N ; i++) {
		        ^
1 error
Language: C++

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

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

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

int a, b;
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define int long long

int main() {
  int n,cnt=0;
  cin>>n;
  REP(i,n)cnt+=i;
  cout<<cnt<<endl;
  return 0;
}


Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <iostream>
#include<string>
using namespace std;
int main(void){
    // Your code here!
   int n;
   int max;
   
    cin >> n;
        max=n*(n-1)/2;
    
        cout << max;
    

Compiler output:
a.cc: In function 'int main()':
a.cc:12:21: error: expected '}' at end of input
   12 |         cout << max;
      |                     ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

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

Compiler output:
a.cc:3:6: error: cannot declare '::main' to be a global variable
    3 |  int main(
      |      ^~~~
a.cc:5:4: error: expected primary-expression before 'long'
    5 |    long long int n;
      |    ^~~~
a.cc:5:4: error: expected '}' before 'long'
a.cc:4:2: note: to match this '{'
    4 |  {
      |  ^
a.cc:4:3: error: expected ')' before 'long'
    4 |  {
      |   ^
      |   )
    5 |    long long int n;
      |    ~~~~
a.cc:3:10: note: to match this '('
    3 |  int main(
      |          ^
a.cc:6:4: error: 'cin' does not name a type
    6 |    cin>>n;
      |    ^~~
a.cc:7:30: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |             long long int k=(n*(n-1))/2;
      |                              ^
      |                              yn
a.cc:7:33: error: 'n' was not declared in this scope; did you mean 'yn'?
    7 |             long long int k=(n*(n-1))/2;
      |                                 ^
      |                                 yn
a.cc:8:13: error: 'cout' does not name a type
    8 |             cout<<k;
      |             ^~~~
a.cc:9:2: error: expected declaration before '}' token
    9 |  }
      |  ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
long long main() {
  
  long long N,ans;
  cin >> N;
  ans = N*(N-1)/2;
  cout << ans << endl;
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

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

#define deep(i, n) for(int i=0; i<n; i++)

int main() {
    long long a; cin >> a;
    long long to = 0;
    deep(i, n) to += i;
    cout << to << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:13: error: 'n' was not declared in this scope
   10 |     deep(i, n) to += i;
      |             ^
a.cc:5:35: note: in definition of macro 'deep'
    5 | #define deep(i, n) for(int i=0; i<n; i++)
      |                                   ^
Language: C++

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

signed main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int N;
    cin >> N;
    cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: no matching function for call to 'max(int, long long int)'
    9 |     cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:9:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    9 |     cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:9:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    9 |     cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
const int MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main(){
  int n;
  cin >> n;
  int* a = new int[n];
  int* m = new int[n];
  for (int i = 1; i < (n+1); i++)
  {
  	a[i-1] = i;
  }
  
  int m_sum = 0;
  for (int i = 1; i < (n+1); i++)
  {
  	int mem = -1;
  	int m_max = 0;
  	for (int j=0; j<n; j++)
  	{
  		x = i%a[j];
  		if (x > m[j])
  		{
  			m[i-1] = x;
  			mem = j;
  		}
  	}
  	if (mem != -1)
  	{
  		a[mem] = 0;
  	}
  	else
  	{
  		m[i-1] = 0;
  	}
  	
  	m_sum += m[i-1];
  }
  
  cout << m_sum;
  
  delete[] a;
  delete[] m;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:17: error: 'x' was not declared in this scope
   25 |                 x = i%a[j];
      |                 ^
Language: C++

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

signed main() {
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    int N;
    cin >> N:
    cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
    
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: found ':' in nested-name-specifier, expected '::'
    8 |     cin >> N:
      |             ^
      |             ::
a.cc:8:12: error: 'N' is not a class, namespace, or enumeration
    8 |     cin >> N:
      |            ^
a.cc:9:16: error: no matching function for call to 'max(int, long long int)'
    9 |     cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   template argument deduction/substitution failed:
a.cc:9:16: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'long long int')
    9 |     cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:9:16: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
    9 |     cout << max(0, (N - 1) * (N - 2) /2 )<< endl;
      |             ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

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

unsigned long long int N;


int main(){
  cin >> N;
  unsigned long long int max;
  unsigned long long int buf;
  unsigned long long int　two = 2;
  if(N  % two ==0){
    N /=2;
    max = N*(N-1);
  }else{
    buf = (N-1)/two;
    max = N * buf;
  }
  // max = N * (N-1) /2;
  cout << max <<endl;
}


Compiler output:
a.cc:11:22: error: extended character 　 is not valid in an identifier
   11 |   unsigned long long int　two = 2;
      |                      ^
a.cc: In function 'int main()':
a.cc:12:11: error: 'two' was not declared in this scope
   12 |   if(N  % two ==0){
      |           ^~~
Language: C++

#include "bits/stdc++.h"
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
const int MOD = 1000000007;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
 
int main(){
  int n;
  cin >> n;
  int* a = new int[n];
  int* m = new int[n];
  for (int i = 1; i < (n+1); i++)
  {
  	a[i-1] = i;
  }
  
  int m_sum = 0;
  for (int i = 1; i < (n+1); i++)
  {
  	int mem = -1;
  	int m_max = 0;
  	for (int j=0; j<n; j++)
  	{
  		m = i%a[j];
  		if (m > m[j])
  		{
  			m[i-1] = m;
  			mem = j;
  		}
  	}
  	if (mem != -1)
  	{
  		a[mem] = 0;
  	}
  	else
  	{
  		m[i-1] = 0;
  	}
  	
  	m_sum += m[i-1];
  }
  
  cout << m_sum;
  
  delete[] a;
  delete[] m;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:22: error: invalid conversion from 'int' to 'int*' [-fpermissive]
   25 |                 m = i%a[j];
      |                     ~^~~~~
      |                      |
      |                      int
a.cc:26:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   26 |                 if (m > m[j])
      |                     ~~^~~~~~
a.cc:28:34: error: invalid conversion from 'int*' to 'int' [-fpermissive]
   28 |                         m[i-1] = m;
      |                                  ^
      |                                  |
      |                                  int*
Language: C++

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

unsigned long long int N;


int main(){
  cin >> N;
  unsigned long long int max;
  unsigned long long int buf;
  unsigned long long int　two = 2
  if(N  % two ==0){
    N /=2;
    max = N*(N-1);
  }else{
    buf = (N-1)/two;
    max = N * buf;
  }
  // max = N * (N-1) /2;
  cout << max <<endl;
}


Compiler output:
a.cc:11:22: error: extended character 　 is not valid in an identifier
   11 |   unsigned long long int　two = 2
      |                      ^
a.cc: In function 'int main()':
a.cc:12:3: error: expected ',' or ';' before 'if'
   12 |   if(N  % two ==0){
      |   ^~
a.cc:15:4: error: 'else' without a previous 'if'
   15 |   }else{
      |    ^~~~
a.cc:16:17: error: 'two' was not declared in this scope
   16 |     buf = (N-1)/two;
      |                 ^~~
Language: Java

import java.util.Scanner;
	import java.util.Arrays;
	public class atcoder {
		static Scanner scn = new Scanner(System.in);
		public static void main(String[] args) {
			// TODO Auto-generated method stub
			int n=scn.nextInt();
			if(n%2!=0)
			{
			int a=n/2;
		int sum=(((a-1)*a)/2);
		int neg=(a*(a+1))/2;
		int sum2=((n-1)*n)/2;
		int such=sum2-neg;
		int rem=n%(a+1);
		int ans=such+rem+sum;
		System.out.println(ans);
			}
			else {
				System.out.println(n*(n-1)/2);
			}
		}
	
	}


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

#include <iostream>
#include <algorithm>
#include <functional>

using namespace std;

int main() {
	
	int N{};
	cin >> N;

	long int* P;
	P = new long int[N];
	int sum = 0;
	for (int i = 1; i <= N; i++)
	{
		if (i == N) {sum += i % 1; break;}
		sum += (i % (i + 1));
	}

	cout << sum << endl;

	return 0;
}

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

#include "bits/stdc++.h"

#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx,avx2,fma")

const int INF=1e9+5;

using namespace std;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    int n,j;
    long long res=0;
    cin>>n;1
    for(int i=1; i<=n; i++)
    {
        res+=(i%n);
    }
    cout<<res<<'\n';
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:17:13: error: expected ';' before 'for'
   17 |     cin>>n;1
      |             ^
      |             ;
   18 |     for(int i=1; i<=n; i++)
      |     ~~~      
a.cc:18:18: error: 'i' was not declared in this scope
   18 |     for(int i=1; i<=n; i++)
      |                  ^
Language: C++

int main()
{
  int n;
  scanf("%d",&n);
  ll ans=0;
  FOR(i,1,n) ans += i;
  cout << ans << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf("%d",&n);
      |   ^~~~~
a.cc:5:3: error: 'll' was not declared in this scope
    5 |   ll ans=0;
      |   ^~
a.cc:6:7: error: 'i' was not declared in this scope
    6 |   FOR(i,1,n) ans += i;
      |       ^
a.cc:6:3: error: 'FOR' was not declared in this scope
    6 |   FOR(i,1,n) ans += i;
      |   ^~~
a.cc:7:3: error: 'cout' was not declared in this scope
    7 |   cout << ans << endl;
      |   ^~~~
a.cc:7:11: error: 'ans' was not declared in this scope
    7 |   cout << ans << endl;
      |           ^~~
a.cc:7:18: error: 'endl' was not declared in this scope
    7 |   cout << ans << endl;
      |                  ^~~~
Language: C++

#include<iostream>
#include<vector>
#include<algorithm>
#include<math.h>
#include<string>
#include<map>

using namespace std;

unsigned long long main(void) {
	unsigned long long N;
	cin >> N;
	unsigned long long ans = 0;
	vector<int>P(N);
	if (N == 1) {
		cout << 0;
	}
	else {
		for (unsigned long long i = 0; i < N; i++) {
			P[i] = i + 1;
		}
		for (unsigned long long i = 0; i < N - 1; i++) {
			ans += P[i];
		}
		cout << ans;
	}
}

Compiler output:
cc1plus: error: '::main' must return 'int'
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
namespace std;
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
namespace mp = boost::multiprecision;

signed main()
{
	mp::cpp_int N;
	std::cin >> N;

	mp::cpp_int max = 0;
  	mp::cpp_int one = 1;
  	mp::cpp_int two = 2;
	max = N*(N-one)/two;

	std::cout << max;
	return 0;
}


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

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

Compiler output:
Main.java:7: error: variable ans is already defined in method main(String[])
    long ans = ans/2;
         ^
1 error
Language: C++

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
namespace mp = boost::multiprecision;

signed main()
{
	mp::cpp_int N;
	std::cin >> N;

	mp::cpp_int max = 0;
	max = N*(N-1)*0.5;

	std::cout << max;
	return 0;
}


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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
namespace std;
#include <boost/multiprecision/cpp_dec_float.hpp>
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/rational.hpp>
namespace mp = boost::multiprecision;

signed main()
{
	mp::cpp_int N;
	std::cin >> N;

	mp::cpp_int max = 0;
	max = N*(N-1)*0.5;

	std::cout << max;
	return 0;
}


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

#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
//#include <boost/multiprecision/cpp_int.hpp>
//using namespace boost::multiprecision;
using namespace std;
#ifndef ONLINE_JUDGE
    #include <lol.h>
#endif

#define all(c) (c).begin(),(c).end()
#define endl "\n"
#define ff first
#define ss second
#define allr(c) (c).rbegin(),(c).rend()
#define ifr(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define pof pop_front
#define pob pop_back
#define pb emplace_back
#define pf emplace_front
#define fstm(m,n,r) m.reserve(n);m.max_load_factor(r)
#define mp make_pair
#define mt make_tuple
#define inf LLONG_MAX
#define os tree<int, null_type,less<int>, rb_tree_tag,tree_order_statistics_node_update>
//order_of_key (k) : Number of items strictly smaller than k .
//find_by_order(k) : K-th element in a set (counting from zero).
typedef long long ll;
ll gcd(){return 0ll;} template<typename T,typename... Args> T gcd(T a,Args... args) { return __gcd(a,(__typeof(a))gcd(args...)); }
typedef map<ll,ll> mll;
typedef map<string,ll> msll;
typedef unordered_map<ll,ll> umap;
typedef vector<ll> vll;
typedef pair<ll,ll> pll;
typedef long double ld;
#define mod 1000000007

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll n;
    cin>>n;
    ll r = (n*(n-1))/2;
    cout<<r<<endl;
    return 0;
}

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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;

signed main()
{
	mp::cpp_int N;
	std::cin >> N;

	mp::cpp_int max = 0;
	max = N*(N-1)*0.5;

	std::cout << max;
	return 0;
}


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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
namespace std;
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;

signed main()
{
	mp::cpp_int N;
	std::cin >> N;

	mp::cpp_int max = 0;
	max = N*(N-1)*0.5;

	std::cout << max;
	return 0;
}


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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
using namespace std;
#include <boost/multiprecision/cpp_int.hpp>
namespace mp = boost::multiprecision;

signed main()
{
	long long N;
	cin >> N;

	mp::cpp_int max = 0;
	max = N*(N-1)*0.5;

	cout << max;
	return 0;
}


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

#include <iostream>
#include <cmath>
#include <vector>
#include <string>
#include <algorithm>
#define Rep(i,n) for(int i=0;i<(int)(n);i++)
#define For(i,n1,n2) for(int i=n1;i<(int)(n2);i++)
using namespace std;
#include <boost/multiprecision/cpp_int.hpp>

signed main()
{
	long long N;
	cin >> N;

	mp::cpp_int max = 0;
	max = N*(N-1)*0.5;

	cout << max;
	return 0;
}


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

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


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

#include <stdio.h>
int main(){
  int n;
  int ans=0
  
  scanf("%d",n);
  
  for(int i=1;i<=n;i++){
    ans=ans+i-1;
  }
  
  printf("%d",ans);
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:3: error: expected ',' or ';' before 'scanf'
    6 |   scanf("%d",n);
      |   ^~~~~
Language: Java

public class Sample {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();
    int result = 0;
    
    if(N != 1){
      result = N * (N - 1) / 2;
    }
    System.out.println(result);

  }

}

Compiler output:
Main.java:1: error: class Sample is public, should be declared in a file named Sample.java
public class Sample {
       ^
Main.java:4: error: cannot find symbol
    Scanner scanner = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Sample
Main.java:4: error: cannot find symbol
    Scanner scanner = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Sample
3 errors
Language: C++

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

int main() {
    long long n, 
    long long ans;
    cin >> n;
    ans = 0;

    for (int i = 0; i < n; i++) {
        ans += i;
    }
    cout << ans << endl;    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:5: error: expected unqualified-id before 'long'
    6 |     long long ans;
      |     ^~~~
a.cc:8:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    8 |     ans = 0;
      |     ^~~
      |     abs
Language: Java

public class Sample {

  public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt();
    int result = 0;
    
    if(N != 1){
      result = N * (N - 1) / 2;
    }
    print(result);

  }

}

Compiler output:
Main.java:1: error: class Sample is public, should be declared in a file named Sample.java
public class Sample {
       ^
Main.java:4: error: cannot find symbol
    Scanner scanner = new Scanner(System.in);
    ^
  symbol:   class Scanner
  location: class Sample
Main.java:4: error: cannot find symbol
    Scanner scanner = new Scanner(System.in);
                          ^
  symbol:   class Scanner
  location: class Sample
Main.java:11: error: cannot find symbol
    print(result);
    ^
  symbol:   method print(int)
  location: class Sample
4 errors
Language: Java

public class Sample {

  public static void main(String[] args) {

    // 引数で標準入力System.inを指定する
    Scanner scanner = new Scanner(System.in);
	int N = scanner.nextInt()
    int result = 0
    
    if(N != 1){
      result = N * (N - 1) / 2
    }
    print(result)

  }

}

Compiler output:
Main.java:7: error: ';' expected
	int N = scanner.nextInt()
	                         ^
Main.java:8: error: ';' expected
    int result = 0
                  ^
Main.java:11: error: ';' expected
      result = N * (N - 1) / 2
                              ^
Main.java:13: error: ';' expected
    print(result)
                 ^
4 errors
Language: C++

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		//String tmp = sc.next();
		//int tmp = sc.nextInt();
		//Long tmp = sc.nextLong();
      Long output = new Long(0);
      int N = sc.nextInt();
      if(N == 1){
        System.out.println(0);
        return;
      }else if(N == 2){
        System.out.println(1);
        return;
      }
      /*for(int i = 1; i <= N - 1; i++){
        output += i;
      }*/
      
      System.out.println(java.util.stream.LongStream.range(1, N).sum());
      //System.out.println();
	}
}


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