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

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

typedef long long ll;

template <typename A, typename B>
string to_string(pair<A, B> p);

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string& s) {
  return '"' + s + '"';
}

string to_string(const char* s) {
  return to_string((string) s);
}

string to_string(bool b) {
  return (b ? "true" : "false");
}

string to_string(vector<bool> v) {
  bool first = true;
  string res = "{";
  for (int i = 0; i < static_cast<int>(v.size()); i++) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(v[i]);
  }
  res += "}";
  return res;
}

template <size_t N>
string to_string(bitset<N> v) {
  string res = "";
  for (size_t i = 0; i < N; i++) {
    res += static_cast<char>('0' + v[i]);
  }
  return res;
}

template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) {
      res += ", ";
    }
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p) {
  return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

void run() {
  int n;
  cin >> n;
  vector<ll> ar(n);
  for(auto &x : ar) cin >> x;
  ll res = 0, m = 1e9 + 7;
  auto mul = [&](ll a, ll b) {
    return (a * b) % m;
  };
  for(ll i = 0; i < 60; i++) {
    ll bit = (1LL << i);
    ll a = 0, b = 0;
    for(auto &x : ar) {
      if (x & bit) a++;
      else b++;
    }
    ll t = mul(a, b);
    for(int j = 0; j < i; j++) t = mul(t, 2);
    res += t;
    res %= m;
  }
  cout << res;
}

signed main() {
#ifdef LOCAL
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
#else
  gen.seed(time(0));
 // freopen("divljak.in", "r", stdin);
 // freopen("divljak.out", "w", stdout);
#endif
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(2);
  run();
}


Compiler output:
a.cc: In function 'int main()':
a.cc:123:3: error: 'gen' was not declared in this scope
  123 |   gen.seed(time(0));
      |   ^~~
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();
		long[] a = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = sc.nextLong();
		}
		int m = 1000000007;

		long answer = 0;
		for (int i = 0; i < 61; i++) {
			long d = (1L << i);
			long count = 0;
			for (int j = 0; j < a.length; j++) {
				if ((d & a[j]) > 0) {
					count++;
				}
			}
			count = count * (n - count);

			answer = (answer + ((d * count) % m) % m;
		}

		System.out.println(answer % m);
	}
}


Compiler output:
Main.java:24: error: ')' expected
			answer = (answer + ((d * count) % m) % m;
			                                        ^
1 error
Language: C++

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

int main(){
    int N;
    cin >> N;
    vector<ll> A(N+1);
    rep(i,N){
        cin >> A[i];
    }
    ll ans=0;
    for(int i=0;i<60;i++){
        ll count=0;
        for(int j=0;j<N;j++){
            ll asd = A[j]>>i;
            if((asd&1) != 0){
                count++;
            }
        }
        ll tmp = count*(N-count);
        tmp %= MOD;
        //ans+=pow(2,i)*tmp;
        ll p = (pow(2,i) % MOD);
        ans += (p * tmp);
        ans %= MOD;
    }    
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:26: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   27 |         ll p = (pow(2,i) % MOD);
      |                 ~~~~~~~~ ^
      |                    |
      |                    __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

#include <bits/stdc++.h>
#define vector<int> vi

using namespace std;
int N;
vi A;

void input() {
	scanf("%d", &N);
	for (int i = 1; i <= N; i++) {
		scanf("%d", &A.at(i));
	}
}

void solve() {
	input();
	int sum = 0;
	for (int i = 1; i <= N - 1; i++) {
		for (int j = 1; j <= N; j++) {
			sum += (A.at(i) ^ A.at(j));
		}
	}
	int ans;
	ans = sum / (1000000000 + 7);
	cout << ans << endl;
}

int main() {
	solve();
	return 0;
}

Compiler output:
a.cc:2:9: warning: ISO C++11 requires whitespace after the macro name
    2 | #define vector<int> vi
      |         ^~~~~~
a.cc:6:1: error: 'vi' does not name a type; did you mean 'void'?
    6 | vi A;
      | ^~
      | void
a.cc: In function 'void input()':
a.cc:11:30: error: 'A' was not declared in this scope
   11 |                 scanf("%d", &A.at(i));
      |                              ^
a.cc: In function 'void solve()':
a.cc:20:33: error: 'A' was not declared in this scope
   20 |                         sum += (A.at(i) ^ A.at(j));
      |                                 ^
Language: C++

#include <bits/stdc++.h>
#define vetor<int> vi

using namespace std;
int N;
vi A;

void input() {
	scanf("%d", &N);
	for (int i = 1; i <= N; i++) {
		scanf("%d", &A.at(i));
	}
}

void solve() {
	input();
	int sum = 0;
	for (int i = 1; i <= N - 1; i++) {
		for (int j = 1; j <= N; j++) {
			sum += (A.at(i) ^ A.at(j));
		}
	}
	int ans;
	ans = sum / (1000000000 + 7);
	cout << ans << endl;
}

int main() {
	solve();
	return 0;
}

Compiler output:
a.cc:2:9: warning: ISO C++11 requires whitespace after the macro name
    2 | #define vetor<int> vi
      |         ^~~~~
a.cc:6:1: error: 'vi' does not name a type; did you mean 'void'?
    6 | vi A;
      | ^~
      | void
a.cc: In function 'void input()':
a.cc:11:30: error: 'A' was not declared in this scope
   11 |                 scanf("%d", &A.at(i));
      |                              ^
a.cc: In function 'void solve()':
a.cc:20:33: error: 'A' was not declared in this scope
   20 |                         sum += (A.at(i) ^ A.at(j));
      |                                 ^
Language: C++

/*
    Author:zeke
    
    pass System Test!
    GET AC!!
*/
#include <iostream>
#include <queue>
#include <vector>
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <map>
#include <iomanip>
#include <utility>
#include <stack>
#include <bitset>
using ll = long long;
using ld = long double;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rep3(var, min, max) for (ll(var) = (min); (var) < (max); ++(var))
#define repi3(var, min, max) for (ll(var) = (max)-1; (var) + 1 > (min); --(var))
#define Mp(a, b) make_pair((a), (b))
#define F first
#define S second
#define Icin(s) \
    ll(s);      \
    cin >> (s);
#define Scin(s) \
    ll(s);      \
    cin >> (s);
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef vector<V> VV;
typedef vector<P> VP;
ll mod = 1e9 + 7;
unsigned long long MOD = 1e9 + 7;
ll INF = 1e18;
long long modMult(long long a, long long b, long long m)
{
    long long res = 0;
    long long exp = a % m;
    while (b)
    {
        if (b & 1)
        {
            res += exp;
            if (res > m)
                res -= m;
        }
        exp <<= 1;
        if (exp > m)
            exp -= m;
        b >>= 1;
    }
    return res;
}
long long powMod(long long a, long long b, long long m)
{
    long long res = 1;
    long long exp = a % m;
    while (b)
    {
        if (b & 1)
            res = modMult(res, exp, m);
        exp = modMult(exp, exp, m);
        b >>= 1;
    }
    return res;
}
//powMod(a,b,MOD)
//O(log(b))?
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    vector<ll> vec(n);
    vector<ll> reg(100,0);
    rep(i, n) {
        cin >> vec[i];
    }
    rep(i, n)
    {
        for(ll j=61;j>=0;j--)
        {
            double a=pow(2,j);
            long long b=(ll)a;
            if(a<=vec[i]){
                reg[j]++;
                vec[i]-=a;
            }
        }
    }
    ll res=0;
    rep(i, 62)
    {
        double a=pow(2,i);
        ll b=(ll)a;
        ll k =(ll)*b%MOD;
        ll f=reg[i]*(n-reg[i]);
        
        res += k*f;
        res %= MOD;
      //  cout << res << endl;
    }
    cout << res%MOD << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:131:19: error: invalid type argument of unary '*' (have 'll' {aka 'long long int'})
  131 |         ll k =(ll)*b%MOD;
      |                   ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
using ll=long long;
const ll MOD=1000000007;

int main(){
  int n; cin>>n;
  vector<ll> num(n);
  for(int i=0;i<n;i++){
    cin>>num[i];
  }
  
  ll ans=0;
  for(int i=0;i<61;i++){
    ll c0=0,c1=0;
    for(int j=0;j<n;j++){
      if(num[j]%2==0){
        c1++;
      }else{
        c0++;
      }
      num[j]/=2;
    }
    ans+=(c0*c1)%MOD)*(1<<i)%MOD;
    ans%=MOD;
  }
  
  cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:21: error: expected ';' before ')' token
   24 |     ans+=(c0*c1)%MOD)*(1<<i)%MOD;
      |                     ^
      |                     ;
Language: Java

import java.util.*;

public class D{
	static final long MOD = 1000000007L;
	static final int WIDTH = 64;
	static final long[] BIN_EXPS = buildBinExps();
	static Scanner sc = new Scanner(System.in);
	static int n = 0;
	
	public static void main(String[] args){
		n = sc.nextInt();
		int[][] binaries = new int[n][WIDTH];
		for(int i = 0; i < n; ++i){
			binaries[i] = getBinary(sc.nextLong());
			
			//System.out.println(Arrays.toString(binaries[i]));
		}
		
		long ans = 0L;
		for(int iw = 0; iw < WIDTH; ++iw){
			long z = count0(binaries, iw);
			long prod = z * (n - z) % MOD;
			ans += prod * BIN_EXPS[iw] % MOD;
			ans %= MOD;
			//System.out.println("z = " + z + ", prod = " + prod + ", BIN = " + BIN_EXPS[iw] + ", ans = " + ans);
		}
		System.out.println(ans);
	}
	
	static long[] buildBinExps(){
		long[] res = new long[WIDTH];
		for(int i = 0; i < WIDTH; ++i){
			res[i] = (i == 0) ? 1L : 2L * res[i - 1] % MOD;
		}
		return res;
	}
	
	static int[] getBinary(long num){
		int[] res = new int[WIDTH];
		for(int i = 0; i < WIDTH; ++i){
			res[i] = (num % 2L == 1L) ? 1 : 0;
			num /= 2L;
		}
		return res;
	}
	
	static long count0(int[][] binaries, int iw){
		long res = 0L;
		for(int id = 0; id < n; ++id){
			if(binaries[id][iw] == 0) ++res;
		}
		return res;
	}
}

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

#include <iostream>
#include <cmath>
#include <string>
#include <numeric>
#include <algorithm>
#include <iomanip>
#include <queue>
#include <vector>
using namespace std;
#define INF 1000000007
#define ll long long
#define rep(i_, __start, __end) for(ll i_=(ll)__start; i_<(ll)__end; i_++)
#define print(_a) cout << _a << endl;
#define printarray(a, len) rep(ii,0,len) cout << a[ii] << " ";
#define printarray2(aa, len) rep(ij,0,len) printarray(aa[ij], aa[ij].size()); print("");

ll dp[62] = {};
int main(){
    ll n, a, cur=1, ans=0;
    cin >> n;
    rep(i, 0, n){
      cin >> a;
      rep(x, 0, 62){
        if(a % 2 == 1) dp[x] += 1;
        a /= 2;
      }
    }
    
    rep(i, 0, 62){
      t = cur;
      t *= dp[i];
      t %= INF;
      t *= (n - dp[i]);
      t %= INF;
      cur *= 2;
      cur %= INF;
      ans %= INF;
    }

    print(ans);

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:7: error: 't' was not declared in this scope
   30 |       t = cur;
      |       ^
Language: C++

#include <iostream>
#include <vector>
#include <math.h>
#include <queue>
#include <map>
#include <math.h>

long long modpow(long long a, long long n) {
  long long res = 1;
  while (n > 0) {
    if (n & 1) res = res * a % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return res;
}

int main(){
  long long N;
  scanf("%lld",&N);
  std::vector<long long >A(N+5, 0);
  long long maxvalue = 0;
  for (long long i=0; i<N; i++){
    scanf("%lld",&A[i]);
    maxvalue = fmax(maxvalue, A[i]);
  }
  long long mod = (long long)1e9+7;
  long long ans = 0;
  long long multiple = 1;

  int i=0;
  while(maxvalue>0){
    long long count = 0;
    for (long long j=0; j<N; j++){
      //if ((A[j] & 1) != 0){
      if ((A[j] % 2) == 1){
        count++;
      }
      A[j] /= 2;
    }
    maxvalue /= 2;
    //printf("count=%lld\n",count);
    ans += multiple * count * (N-count);
    ans %= mod;
    //multiple *= 2;
    multiple = modpow(2,i);
    multiple %= mod;
    //printf("ans=%lld\n",ans);
    i++;
  }
  printf("%lld\n",ans);
  return 0;
}

Compiler output:
a.cc: In function 'long long int modpow(long long int, long long int)':
a.cc:11:32: error: 'MOD' was not declared in this scope
   11 |     if (n & 1) res = res * a % MOD;
      |                                ^~~
a.cc:12:17: error: 'MOD' was not declared in this scope
   12 |     a = a * a % MOD;
      |                 ^~~
Language: C++

#include<iostream>
#define int long long
const int mod = 1e9 + 7;
using namespace std;
int app(int arr[],int n){
    int sum=0;
    for(int i=0;i<61;i++){
        int zc=0,oc=0;
        int adsum=0;
        for(int j=0;j<n;j++){
            if(arr[j]%2==0){
                zc++;
            }else{
                oc++;
            }
            arr[j]=arr[j]/2;
        }
        idsum = ((oc * zc % mod) * ((1LL << i) % mod)) % mod;
        sum=sum+adsum;
        sum=sum%mod;
    }
    return sum;
}
int32_t main(){
    int n;
    cin>>n;
    int arr[n];
    int sum=0;
    for(int i=0;i<n;i++){
        cin>>arr[i];
    }
    sum=app(arr,n);
    cout<<sum<<endl;
    return 0;
}


Compiler output:
a.cc: In function 'long long int app(long long int*, long long int)':
a.cc:18:9: error: 'idsum' was not declared in this scope; did you mean 'adsum'?
   18 |         idsum = ((oc * zc % mod) * ((1LL << i) % mod)) % mod;
      |         ^~~~~
      |         adsum
Language: Java


import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    long MOD = (long)Math.pow(10, 9) + 7;
    int n = sc.nextInt();
    long[][] rui = new long[60][2];
    for(int i = 0; i < n; i++) {
      long a = sc.nextLong();
      for(int j = 0; j < 60; j++) {
        long t = a / (long)Math.pow(2, j);
        rui[j][(int)(t % 2)]++;
      }
    }
    long ans = 0;
    for(int i = 0; i < 60; i++) {
      long t = (long)Math.pow(2, i) % MOD;
      long t = (t * rui[i][0]) % MOD;
      t = (t * rui[i][1]) % MOD;
      ans = (ans + t) % MOD;
    }
    System.out.println(ans);
  }
}

Compiler output:
Main.java:20: error: variable t is already defined in method main(String[])
      long t = (t * rui[i][0]) % MOD;
           ^
1 error
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i=0; i<n; ++i)
#define rep1(i, n) for (int i=1; i<=n; ++i)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
constexpr ll  MOD = (1e9+7);
constexpr int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
constexpr int lcm(int a, int b) { return a / gcd(a, b) * b; }

template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
ll factorial(ll n, ll m=2) {
    // calculate n!
    m = max(2LL, m);
    ll rtn = 1;
    for (ll i=m; i<=n; i++) {
        rtn = (rtn * i) % MOD;
    }
    return rtn;
}
ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b;
        swap(a, b);
        u -= t * v;
        swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}
ll modpow(ll a, ll n) {
    ll res = 1;
    while (n > 0) {
        if (n & 1)
            res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

template <class Abel> struct BIT {
    const Abel UNITY_SUM = 0;
    vector<Abel> dat;
    /* [1, n] */
    BIT(int n) : dat(n+1, UNITY_SUM) {}
    void init(int n) { dat.assign(n+1, UNITY_SUM); }
    /* a is 1-indexed */
    inline void add(int a, Abel x) {
        for (int i=a; i<(int)dat.size(); i+=i & -i)
            dat[i] = dat[i] + x;
    }
    /* [1, a], a is 1-indexed */
    inline Abel sum(int a) {
        Abel res = UNITY_SUM;
        for (int i=a; i>0; i-=i & -i)
            res = res + dat[i];
        return res;
    }
    /* [a, b), a and b are 1-indexed */
    inline Abel sum(int a, int b) {
        return sum(b-1) - sum(a-1);
    }
};

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    ll n; cin >> n;
    vector<ll> a(n);
    rep(i, n) cin >> a[i];
    vector<ll> cnt(60, 0);
    rep(i, n) {
        rep(j, 60) {
            cnt[j] += (a[i] >> j) % 2;
        }
    }
    ll ans = 0;
    rep(b, 60) {
        // ans += (1ll << b) % MOD * cnt[b] % MOD * (n - cnt[b]) % MOD;
        ans += cnt[b] * (n - cnt[b])　<< (ll)b;
        ans %= MOD;
    }
    cout << ans << endl;
    return 0;
}

Compiler output:
a.cc:102:37: error: extended character 　 is not valid in an identifier
  102 |         ans += cnt[b] * (n - cnt[b])　<< (ll)b;
      |                                     ^
a.cc: In function 'int main()':
a.cc:102:37: error: expected ';' before '\U00003000'
  102 |         ans += cnt[b] * (n - cnt[b])　<< (ll)b;
      |                                     ^~
      |                                     ;
Language: Java

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = Integer.parseInt(sc.next());
    final int MOD = 1000000007;
    long[] num = new long[n];
    long sum = 0;
    int[] count = new int[60];
    for(int i = 0; i < n; i++) {
      num[i] = Long.parseLong(sc.next());
      for(int j = 0; j < 60; j++) {
        count[j] += (1 & (num[i] >> j));
      }
    }
    for(int i = 0; i < 60; i++) {
      sum += (count[i] * (n - count[i]) % MOD) * (1L << i) % MOD) % MOD;
      sum %= MOD;
    }
    System.out.println(sum);
  }
}


Compiler output:
Main.java:18: error: ';' expected
      sum += (count[i] * (n - count[i]) % MOD) * (1L << i) % MOD) % MOD;
                                                                ^
Main.java:18: error: not a statement
      sum += (count[i] * (n - count[i]) % MOD) * (1L << i) % MOD) % MOD;
                                                                    ^
2 errors
Language: Java

import java.util.*;

public class D{
	static final long MOD = 1000000007L;
	static final int WIDTH = 64;
	static final long[] BIN_EXPS = buildBinExps(WIDTH);
	static Scanner sc = new Scanner(System.in);
	static int n = 0;
	
	public static void main(String[] args){
		n = sc.nextInt();
		int[][] binaries = new int[n][WIDTH];
		for(int i = 0; i < n; ++i){
			binaries[i] = getBinary(sc.nextLong());
			
			/*System.out.print("binaries[" + i + "] = ");
			for(int iw = 0; iw < WIDTH; ++iw){
				System.out.print(binaries[i][iw]);
				if(iw == WIDTH - 1) System.out.print('\n');
			}*/
		}
		
		long ans = 0L;
		for(int iw = 0; iw < WIDTH; ++iw){
			int z = count0(binaries, iw);
			//System.out.println("BIN_EXPS[" + iw + "] = " + BIN_EXPS[iw] + ", z = " + z);
			ans += z * (n - z) % MOD * BIN_EXPS[iw] % MOD;
			ans %= MOD;
		}
		System.out.println(ans);
	}
	
	static long[] buildBinExps(int w){
		long[] res = new long[w];
		for(int i = 0; i < w; ++i){
			res[i] = (i == 0) ? 1L : 2L * res[i - 1] % MOD;
		}
		return res;
	}
	
	static int[] getBinary(long num){
		int[] res = new int[WIDTH];
		for(int i = 0; i < WIDTH; ++i){
			res[i] = (num % 2L == 1L) ? 1 : 0;
			num /= 2L;
		}
		return res;
	}
	
	static int count0(int[][] binaries, int iw){
		int res = 0;
		for(int id = 0; id < n; ++id){
			if(binaries[id][iw] == 0) ++res;
		}
		return res;
	}
}

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

#include<iostream>
#include<cmath>

using namespace std;

int main(void){
    long long p[60]={0};
    long long n,a;
    cin >> n;
    for(int i=0;i<n;i++){
        cin >> a;
        for(int j=0;j<60;j++){
            p[j]+=a%2;
            a=a/2;
        }
    }
    long long ans=0;
    for(int i=0;i<60;i++){
        long long ind=1;
        for(int j=0;j<i;j++){
            ind=(ind*2)%(long long)(1000000007);
        }
        ans=(ans+(p[i]*(n-p[i])%(long long)(1000000007)*ind)%(long long)(1000000007);
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:85: error: expected ')' before ';' token
   23 |         ans=(ans+(p[i]*(n-p[i])%(long long)(1000000007)*ind)%(long long)(1000000007);
      |             ~                                                                       ^
      |                                                                                     )
Language: C++

#include<iostream>
#include<cmath>

using namespace std;

int main(void){
    long long p[61]={0};
    long long n,a;
    cin >> n;
    coout << n;
    for(int i=0;i<n;i++){
        cin >> a;
        for(int j=0;j<61;j++){
            p[j]+=a%2;
            a=a/2;
        }
    }
    long long ans=0;
    for(int i=0;i<61;i++){
        long long ind=1;
        for(int j=0;j<i;j++){
            ind=(ind*2)%(long long)(1000000007);
        }
        ans=(ans+p[i]*(n-p[i])*ind)%(long long)(1000000007);
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'coout' was not declared in this scope
   10 |     coout << n;
      |     ^~~~~
Language: C++

#include<iostream>
#include<cmath>

using namespace std;

int main(void){
    long long p[61]={0};
    long long n,a;
    cin >> n;
    printf(n);
    for(int i=0;i<n;i++){
        cin >> a;
        for(int j=0;j<61;j++){
            p[j]+=a%2;
            a=a/2;
        }
    }
    long long ans=0;
    for(int i=0;i<61;i++){
        long long ind=1;
        for(int j=0;j<i;j++){
            ind=(ind*2)%(long long)(1000000007);
        }
        ans=(ans+p[i]*(n-p[i])*ind)%(long long)(1000000007);
    }
    cout << ans;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:12: error: invalid conversion from 'long long int' to 'const char*' [-fpermissive]
   10 |     printf(n);
      |            ^
      |            |
      |            long long int
In file included from /usr/include/c++/14/cstdio:42,
                 from /usr/include/c++/14/ext/string_conversions.h:45,
                 from /usr/include/c++/14/bits/basic_string.h:4154,
                 from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/stdio.h:363:43: note:   initializing argument 1 of 'int printf(const char*, ...)'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
Language: C++

#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <stdio.h>
#include <tuple>
#include <bitset>
#include <cfloat>
#include <fstream>
#include <limits.h>
#include <list>
#include <math.h>
#include <random>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#include <numeric>
#include <utility>
#include <sstream>

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

using namespace std;
#define int long long
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i,a,b) for(ll i=(a);i<(b);i++)
#define FORR(i,a,b)for(ll i=(a);i<=(b);i++)
#define repr(i,n) for(ll i=n;i>=0;i--)
#define P pair<ll, ll>
#define sz(x) (ll)x.size()
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define VE vector<ll>
#define COUT(x) cout<<(x)<<endl
#define MA map<ll,ll>
#define SE set<ll>
#define PQ priority_queue<ll>
#define PQR priority_queue<ll,VE,greater<ll>>
#define COUT(x) cout<<(x)<<endl
#define YES(n) cout << ((n) ? "YES" : "NO"  ) << endl
#define Yes(n) cout << ((n) ? "Yes" : "No"  ) << endl
#define EPS (1e-10)
ll gcd(ll a, ll b) {
	if (a < b)swap(a, b);
	if (b == 0) return a;
	return gcd(b, a % b);
}
ll lcm(ll a, ll b) {
	ll g = gcd(a, b);
	return a / g * b;
}
bool prime(ll n) {
	for (ll i = 2; i <= sqrt(n); i++) {
		if (n%i == 0)return false;
	}
	return n != 1;
}


const long long MOD = 1000000007;
const long long INF = 1LL << 60;


const int MAX_N = 1000010;
// cnt[i][0]->a_iの0の数
// cnt[i][1]->a_iの1の数
int cnt[60][2];
signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int n; cin >> n;
	VE a(n); rep(i, n)cin >> a[i];
	rep(i, n) {
		rep(j, 60) {
			// bit演算
			// ビットa[i]にj番目のフラグが立っているかどうか
			cnt[j][(a[i] >> j) & 1]++;
		}
	}
	int ans = 0;
	repr(i, 59, 0) {
		(ans *= 2) % MOD;
		ans += cnt[i][0] * cnt[i][1] % MOD;
	}
	cout << ans % MOD << endl;
	return 0;
}


Compiler output:
a.cc:107:22: error: macro "repr" passed 3 arguments, but takes just 2
  107 |         repr(i, 59, 0) {
      |                      ^
a.cc:54:9: note: macro "repr" defined here
   54 | #define repr(i,n) for(ll i=n;i>=0;i--)
      |         ^~~~
a.cc: In function 'int main()':
a.cc:107:9: error: 'repr' was not declared in this scope
  107 |         repr(i, 59, 0) {
      |         ^~~~
Language: C++

/*
    Author:zeke
    
    pass System Test!
    GET AC!!
*/
#include <iostream>
#include <queue>
#include <vector>
#include <iostream>
#include <vector>
#include <string>
#include <cassert>
#include <algorithm>
#include <functional>
#include <cmath>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <map>
#include <iomanip>
#include <utility>
#include <stack>
#include <bitset>
using ll = long long;
using ld = long double;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
#define rep3(var, min, max) for (ll(var) = (min); (var) < (max); ++(var))
#define repi3(var, min, max) for (ll(var) = (max)-1; (var) + 1 > (min); --(var))
#define Mp(a, b) make_pair((a), (b))
#define F first
#define S second
#define Icin(s) \
    ll(s);      \
    cin >> (s);
#define Scin(s) \
    ll(s);      \
    cin >> (s);
template <class T>
bool chmax(T &a, const T &b)
{
    if (a < b)
    {
        a = b;
        return 1;
    }
    return 0;
}
template <class T>
bool chmin(T &a, const T &b)
{
    if (b < a)
    {
        a = b;
        return 1;
    }
    return 0;
}
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef vector<V> VV;
typedef vector<P> VP;
ll mod = 1e9 + 7;
unsigned long long MOD = 1e9 + 7;
ll INF = 1e18;
long long modMult(long long a, long long b, long long m)
{
    long long res = 0;
    long long exp = a % m;
    while (b)
    {
        if (b & 1)
        {
            res += exp;
            if (res > m)
                res -= m;
        }
        exp <<= 1;
        if (exp > m)
            exp -= m;
        b >>= 1;
    }
    return res;
}
long long powMod(long long a, long long b, long long m)
{
    long long res = 1;
    long long exp = a % m;
    while (b)
    {
        if (b & 1)
            res = modMult(res, exp, m);
        exp = modMult(exp, exp, m);
        b >>= 1;
    }
    return res;
}
//powMod(a,b,MOD)
//O(log(b))?
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll n;
    cin >> n;
    vector<ll> vec(n);
    vector<ll> reg(100,0);
    rep(i, n) {
        cin >> vec[i];
    }
    rep(i, n)
    {
        for(ll j=61;j>=0;j--)
        {
            if(powMod(2,j)<=vec[i]){
                reg[j]++;
                vec[i]-=powMOd(2,j);
            }
        }
    }
    ll res=0;
    ll g=1;
    rep(i, 62)
    {
        ll k=g;
        ll f=reg[i]*(n-reg[i]);
        f%=MOD;
        res += k*f;
        res %= MOD;
        g*=2;
        g%=MOD;
      //  cout << res << endl;
    }
    cout << res%MOD << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:118:22: error: too few arguments to function 'long long int powMod(long long int, long long int, long long int)'
  118 |             if(powMod(2,j)<=vec[i]){
      |                ~~~~~~^~~~~
a.cc:88:11: note: declared here
   88 | long long powMod(long long a, long long b, long long m)
      |           ^~~~~~
a.cc:120:25: error: 'powMOd' was not declared in this scope; did you mean 'powMod'?
  120 |                 vec[i]-=powMOd(2,j);
      |                         ^~~~~~
      |                         powMod
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
const int N=1e6+9;
ll a[N];
ll cnt[89];
ll ans;
const int mod=1e9+7；
int n;
int main(){
  cin>>n;
  for(int i=1;i<=n;i++){
    cin>>a[i];
    for(int j=0;j<60;j++)if((a[i]>>j)&1)cnt[j]++;
  }
  for(int i=0;i<60;i++)ans=(ans+(1ll<<i)%mod*cnt[i]%mod*(n-cnt[i])%mod)%mod;
  cout<<ans<<endl;
  return 0;
}

Compiler output:
a.cc:8:19: error: unable to find numeric literal operator 'operator""\U0000ff1b'
    8 | const int mod=1e9+7；
      |                   ^~~
a.cc: In function 'int main()':
a.cc:11:8: error: 'n' was not declared in this scope
   11 |   cin>>n;
      |        ^
Language: C++

#include <stdio.h>
#include <math.h>
int main(){
    int n,i=0,,j,sum=0;
    scanf("%d",&n);
    int num[n];
    for(i;i<n;i++){
        scanf("%d",num[i]);
    }
    for(i=0;i<n-1;i++){
        j=i+1;
        for(j;j<n;j++){
            sum+=num[i+1]^num[j+1];
        }
    }
    sum=sum%(int(pow(10,9))+7);
  	printf("%d",sum);
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:15: error: expected unqualified-id before ',' token
    4 |     int n,i=0,,j,sum=0;
      |               ^
Language: C++

#include<iostream>
#include<vector>
#include<map>
#include<algorithm>
#include<math.h>
#include<string>
#include <iomanip>
#include<deque>
#include<queue>
#include<stack>
#include<set>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef int itn;
const ll LINF = 1e18;
const int INF = 1e9;

//マクロ定義
#define vvint(vec,n,m,l) vector<vector<int>> vec(n, vector<int>(m,l));	// lで初期化
#define vvll(vec,n,m,l) vector<vector<ll>> vec(n,vector<ll>(m,l));
#define vint vector<int>
#define pint pair<int,int>
#define rep(i,a) for(int i=0;i<(a);i++)
#define all(x) (x).begin(),(x).end()
#define debug system("pause")				//デバッグ用
#define ret return 0

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

#define keta setprecision(15) //15桁表示

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

	ll n;
	cin >> n;
	vector<ull> a(n);
	rep(i, n)
	{
		cin >> a[i];
	}
	vector<vector<ull>> ket(n, vector<ull>(61,0));
    ull ke=0; 
	for (int i = 0; i < n; i++)
	{
		ll tmp = a[i];
	    ull k = 0;
		while (tmp!=0)
		{
			ket[i][k] += (tmp & 1);
			k++;
			tmp=tmp >> 1;
		}
		ke = max(ke, k);
	}

	for (int i = 1; i < n; i++)
	{
		for (int j = 0; j < ke; j++)
		{
			ket[i][j] += ket[i - 1][j];
          ket[i][j]%=1000000007;
		}
	}

    ull ans = 0;
	for (int i = 0; i < n-1; i++)
	{
		for (int j = 0; j < ke; j++)
		{
			if ((a[i] >> j) % 2==0)
			{
				ans += (pow(2, j)%1000000007) * (ket[n - 1][j] - ket[i][j]);
				ans %= 1000000007;
			}
			else
			{
				ans += (pow(2, j)%1000000007) * ((n-(i+1))-(ket[n - 1][j] - ket[i][j]));
				ans %= 1000000007;
			}
		}
	}
	cout << ans << endl;
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:79:50: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   79 |                                 ans += (pow(2, j)%1000000007) * (ket[n - 1][j] - ket[i][j]);
      |                                         ~~~~~~~~~^~~~~~~~~~~
      |                                            |      |
      |                                            |      int
      |                                            __gnu_cxx::__promote<double>::__type {aka double}
a.cc:84:50: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'int' to binary 'operator%'
   84 |                                 ans += (pow(2, j)%1000000007) * ((n-(i+1))-(ket[n - 1][j] - ket[i][j]));
      |                                         ~~~~~~~~~^~~~~~~~~~~
      |                                            |      |
      |                                            |      int
      |                                            __gnu_cxx::__promote<double>::__type {aka double}
Language: C++

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

int main(){
  ll N;
  const ll mod=pow(10,9)+7;
  vector<ll> A;
  ll sum=0;
  cin >> N;

  for(int i=0;i<N;i++){
    ll input;
    cin >> input;
    A.push_back(input);
    }
  
  for(int bit=0;bit<=60;bit++){
    ll ones=0;
    vector<ll> v=A;
    for(int i=0;i<v.size();i++){
      ll a=v.back();
      a = v.pop_back();
      if((a&(1<<bit))!=0) ones++;
    }
    sum = (sum+(1LL<<bit)%mod*ones%mod*(N-ones)%mod)%mod;
  }
  cout << sum << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:21: error: void value not ignored as it ought to be
   23 |       a = v.pop_back();
      |           ~~~~~~~~~~^~
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.begin(), v.end(), x) != v.end())

using namespace std;
typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
const int INF = 1001001001;
const long long INFL = (1LL<<60);
const double eps = (1e-9);

ll mod = 1000000007;

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

  ll n;
  cin >> n;
  vector<ll> one(63, 0);
  vector<ll> zero(63, 0);
  rep(i, n) {
    ll a;
    cin >> a;

    for (int j = 0; j < 63; j++) {
      if ((a >> j) & 1) {
        one[j]++;
      } else {
        zero[j]++;
      }
    }
  }
/*
  rep(i, 60) {
    cerr << one[i] << " ";
  }
  cerr << endl;
  rep(i, 60) {
    cerr << zero[i] << " ";
  }
  cerr << endl;
*/
  ll ans = 0;
  for (ll i = 0; i < one.size(); i++) {
    ll base = pow(ll(2), i) % mod;
    ll x = (one[i] * zero[i]) % mod;
    ans += (x * base) % mod;
    ans %= mod;
  }

  cout << ans << endl;

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:54:29: error: invalid operands of types '__gnu_cxx::__promote<double>::__type' {aka 'double'} and 'll' {aka 'long long int'} to binary 'operator%'
   54 |     ll base = pow(ll(2), i) % mod;
      |               ~~~~~~~~~~~~~ ^ ~~~
      |                  |            |
      |                  |            ll {aka long long int}
      |                  __gnu_cxx::__promote<double>::__type {aka double}
Language: C++


#include "bits/stdc++.h"
#define int long long

using namespace std;

void solve(){
	int n;
	cin>>n;
	int a;
	int o[100]={0};
	int ans =0;
		cin>>a;
		for(int j=0;j<=63;++j){
			if(a&(1LL<<j)){
				++o[j];
			}
		}
	}

	for(int i=0;i<=63;++i){
		if(o[i]!=0 && o[i]!=n){
			int x = o[i]*(n-o[i]);
			for(int j=0;j<i;++j){
				x*=2;
				x%= 1000000007LL;
			}
			ans+=x;
			ans%=1000000007LL;
		}
	}	
	cout<<ans%(1000000007LL)<<endl;
}

int main(){
	IOS
	int t=1;
	cin>>t;
	while(t--)
		solve();
	return 0;
}



Compiler output:
a.cc:21:9: error: expected unqualified-id before 'for'
   21 |         for(int i=0;i<=63;++i){
      |         ^~~
a.cc:21:21: error: 'i' does not name a type
   21 |         for(int i=0;i<=63;++i){
      |                     ^
a.cc:21:27: error: expected unqualified-id before '++' token
   21 |         for(int i=0;i<=63;++i){
      |                           ^~
a.cc:32:9: error: 'cout' does not name a type
   32 |         cout<<ans%(1000000007LL)<<endl;
      |         ^~~~
a.cc:33:1: error: expected declaration before '}' token
   33 | }
      | ^
cc1plus: error: '::main' must return 'int'
a.cc: In function 'int main()':
a.cc:36:9: error: 'IOS' was not declared in this scope
   36 |         IOS
      |         ^~~
a.cc:38:14: error: 't' was not declared in this scope; did you mean 'tm'?
   38 |         cin>>t;
      |              ^
      |              tm
Language: C++


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

void solve(){
	int n;
	cin>>n;
	int a;
	int o[100]={0};
	int ans =0;
		cin>>a;
		for(int j=0;j<=63;++j){
			if(a&(1LL<<j)){
				++o[j];
			}
		}
	}

	for(int i=0;i<=63;++i){
		if(o[i]!=0 && o[i]!=n){
			int x = o[i]*(n-o[i]);
			for(int j=0;j<i;++j){
				x*=2;
				x%= 1000000007LL;
			}
			ans+=x;
			ans%=1000000007LL;
		}
	}	
	cout<<ans%(1000000007LL)<<endl;
}

int main(){
	IOS
	int t=1;
	cin>>t;
	while(t--)
		solve();
	return 0;
}


Compiler output:
a.cc:19:9: error: expected unqualified-id before 'for'
   19 |         for(int i=0;i<=63;++i){
      |         ^~~
a.cc:19:21: error: 'i' does not name a type
   19 |         for(int i=0;i<=63;++i){
      |                     ^
a.cc:19:27: error: expected unqualified-id before '++' token
   19 |         for(int i=0;i<=63;++i){
      |                           ^~
a.cc:30:9: error: 'cout' does not name a type
   30 |         cout<<ans%(1000000007LL)<<endl;
      |         ^~~~
a.cc:31:1: error: expected declaration before '}' token
   31 | }
      | ^
a.cc: In function 'int main()':
a.cc:34:9: error: 'IOS' was not declared in this scope
   34 |         IOS
      |         ^~~
a.cc:36:14: error: 't' was not declared in this scope; did you mean 'tm'?
   36 |         cin>>t;
      |              ^
      |              tm
Language: C++

#include "bits/stdc++.h" 
using namespace std;
#define MOD 1000000007

int main()
{

    long long n;
     cin>>n;
    long long a[n];
     for(int i=0;i<n;i++)cin>>a[i];
  
    long long one[64];
    long long zero[64];
    for(int i=0;i<n;i++)
    {
        long long y = a[i];
        long long k = 0;
        while(y!=0)
        {
            if(y&1)
            {
                one[k]++;
            }
            else
            {
                zero[k]++;
            }
            y/=2;
            k++;
        }
        for(long long j=k;j<=63;j+=1)
        {
            zero[j]++;
        }
    }
    long long ans = 0;
    for(long long i=0;i<64;i++)
    {
        if(one[i]!=0&&zero[i]!=0)
        {

            long long  s = (one[i]%MOD*zero[i]%MOD)%MOD;
            s = (s%MOD*power(2,i,MOD)%MOD)%MOD;
            ans = (ans%MOD+s%MOD)%MOD;
        }
    }
    cout<<ans;
    return 0;
} 


Compiler output:
a.cc: In function 'int main()':
a.cc:44:24: error: 'power' was not declared in this scope
   44 |             s = (s%MOD*power(2,i,MOD)%MOD)%MOD;
      |                        ^~~~~
Language: C++

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

const int mod = 1000000007;

long long modpow(long long a, long long n, long long mod) {
    long long res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % mod;
        a = a * a % mod;
        n >>= 1;
    }
    return res;
}

int main(void) {
  
  int n;
  cin >> n;
  ll a[n];
  rep (i, n) cin >> a[i];

  vector<ll> num(70, 0);

  rep (i, n) rep (j, 66) {
    if (a[i] & (1LL << j)) num[j]++;
  }

  ll ans = 0;

  rep (i, 64) {
    ans += (num[i] * (n - num[i]))%mod * (modpow(2, i, mod))mod;
    ans %= mod;
  }

  cout << ans << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:34:61: error: expected ';' before 'mod'
   34 |     ans += (num[i] * (n - num[i]))%mod * (modpow(2, i, mod))mod;
      |                                                             ^~~
      |                                                             ;
Language: C++

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

#define ll long long
#define PB push_back
#define PII pair<int, int>
#define MP make_pair
#define all(x) x.begin(), x.end()
#define REP(x, y, z) for(int x = y; x <= z; x++)
#define REPP(x, y, z) for(int x = y; x >= z; x--)
#define F first
#define S second
#define MSET(x, y) memset(x, y, sizeof(x)) 
#define EB emplace_back
#define maxn


//structure

//declaration
ll lis[300005];
//functions

int main(void)
{
	#ifdef DBG
	freopen("in.in", "r", stdin);
	freopen("out.out", "w", stdout);
	#endif

	int n;
	scanf("%d\n", &n);


	ll mod = 1000000007;

	REP(i, 1, n)
		scanf("%lld", &lis[i]);

	ll ans = 0;
	ll odd, even;

	for(ll i = 0; i < 60; i++)
	{
		odd = even = 0;
		REP(j, 1, n)
		{	
			if(lis[j]&1LL<<i)
				odd++;
			else
				even++;
		}

		ans += (odd*even*((1LL<<i)%mod))%mod;
	}


	printf("%lld\n", ll(ans%mod));

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:12: error: expected primary-expression before 'long'
    4 | #define ll long long
      |            ^~~~
a.cc:58:26: note: in expansion of macro 'll'
   58 |         printf("%lld\n", ll(ans%mod));
      |                          ^~
Language: C++

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

typedef long long ll;

ll o[65],z[65];

bool checkbit(ll N,int pos)
{
    return (bool)(N & (1LL<<pos));
}

ll mulMod(ll a,ll b,ll M)
{
    return ((a%M)*(b%M))%M;
}

ll addMod(ll a,ll b,ll M)
{
    return ((a%M)+(b%M))%M;
}

int main()
{
    //freopen("in.txt","r", stdin);
    //freopen("out.txt","w", stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL),cout.tie(NULL);

    ll n,x,m = 1e9+7;

    cin>>n;

    for(int i=0; i<n; i++)
    {
        cin>>x;
        for(int j=0; j<=61; j++)
        {
            if(checkbit(x,j))   o[j]++;
            else                z[j]++;
        }
    }

    ll ans = 0;

    for(ll i=0; i<=61; i++)
        ans = ((ans+mulMod(o[i]*z[i],(1LL<<i),m))%m;

    cout<<ans<<endl;

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:47:52: error: expected ')' before ';' token
   47 |         ans = ((ans+mulMod(o[i]*z[i],(1LL<<i),m))%m;
      |               ~                                    ^
      |                                                    )
Language: C++

#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <math.h>
#include <complex>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <functional>
#include <assert.h>
#define int long
#define ll long long
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define eb emplace_back
#define all(x) x.begin(),x.end()
#define SZ(x) x.size()
#define fi first
#define se second
const int MOD = 1e9+7;
using namespace std;

template<class t> using vc=vector<t>;
template<class t> using vvc=vc<vc<t>>;

using pi=pair<int,int>;
using vi=vc<int>;

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(20);

    int N; cin >> N;
    int bkt[61],bkt2[61];
    rep(i,61) {bkt[i]=0; bkt2[i]=0;}
    int sum=0;
    int a[N];
    rep(i,N){
        cin >> a[i];
    }
    rep(i,61){
        rep(j,N){
            if((a[j]>>i)&1){
                bkt[i]++;
            } else {
                bkt2[i]++;
            }
        }
        sum=(sum+((bkt[j]*bkt2[j])%MOD*(1LL<<j)%MOD)%MOD)%MOD;
    }
    cout << sum << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:58:24: error: 'j' was not declared in this scope
   58 |         sum=(sum+((bkt[j]*bkt2[j])%MOD*(1LL<<j)%MOD)%MOD)%MOD;
      |                        ^
Language: Java

import java.util.Scanner;

public class Main {
    public static int binary(int dec){
        final String bin = Integer.toBinaryString(dec);
        return Integer.parseInt(bin);
    }
    
    public static int decimal(int bin){
        final int dec = Integer.parseInt(bin, 2);
        return Integer.parseInt(dec);
    }
    
    public static void main(String args[]){
        Scanner stdIn = new Scanner(System.in);
        
        int n = stdIn.nextInt();
        //int b = stdIn.nextInt();
        //int c = stdIn.nextInt();
        //int x = stdIn.nextInt();
        int num[] = new int[n];
        //String s = stdIn.next();
        //String t = stdIn.next();
        //char c[] = s.toCharArray();
        int count = 0;
        //int sum = 0;
        //boolean flag = true;
        for(int i = 0; i < s.length() / 2; i++){
            if(c[i] != c[s.length() - i - 1]){
                count++;
            }
        }
        
        System.out.println(count);
        
        //System.out.println();
        //System.out.print();

        stdIn.close();
    }
}


Compiler output:
Main.java:10: error: incompatible types: int cannot be converted to String
        final int dec = Integer.parseInt(bin, 2);
                                         ^
Main.java:11: error: incompatible types: int cannot be converted to String
        return Integer.parseInt(dec);
                                ^
Main.java:28: error: cannot find symbol
        for(int i = 0; i < s.length() / 2; i++){
                           ^
  symbol:   variable s
  location: class Main
Main.java:29: error: cannot find symbol
            if(c[i] != c[s.length() - i - 1]){
               ^
  symbol:   variable c
  location: class Main
Main.java:29: error: cannot find symbol
            if(c[i] != c[s.length() - i - 1]){
                       ^
  symbol:   variable c
  location: class Main
Main.java:29: error: cannot find symbol
            if(c[i] != c[s.length() - i - 1]){
                         ^
  symbol:   variable s
  location: class Main
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
6 errors