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

#include <bits/stdc++.h>
using namespace std;
int data[10010];
int main()
{
    int s;
    cin>>s;
    int i,j,k;
    for(i=1; i<100; i++)
    {
        for(j=1; j<100; j++)
        {
            for(k=1; k<100; k++)
            {
                 int n=i*i+j*j+k*k+i*j+i*k+j*k;
                 if(0<=n&&n<=s)
                  data[n]++;
            }
        }
    }
    for(i=1;i<=s;i++)
        cout<<data[i]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: reference to 'data' is ambiguous
   17 |                   data[n]++;
      |                   ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:3:5: note:                 'int data [10010]'
    3 | int data[10010];
      |     ^~~~
a.cc:22:15: error: reference to 'data' is ambiguous
   22 |         cout<<data[i]<<endl;
      |               ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:3:5: note:                 'int data [10010]'
    3 | int data[10010];
      |     ^~~~
Language: C++

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

int main(){
	ll x=1,y=1,z=1,k=1;
	//int t=0,p=0,r=0;
	ll n;
	cin>>n;
	while(n>=k){
		ll ked=k;
		k=x*x + y*y + z*z + x*y + y*z + z*x;
		for(int i=ked; i<=min(n,k);i++){
			//t++;
			//cout<<x<<y<<z<<
			if(i==k){
				//p++;
				//cout<<p<<" "<<x<<" "<<y<<" "<<z<<" "<<i<<endl;
				if(x==y && y==z){
					cout<<1<<endl;
				}else if( x!=y && x!=z && y!=z ){
					cout<<6<<endl;
				}else{
					cout<<3<<endl;
				}
			}else{
				r++;
				cout<<0<<endl;
			}
		}
		if(x==y && y==z){
			z++;
		}else if(z>y){
			if (y>x){
				x++;
			}else{
				y++;
			}
		}else if(y==z){
			z++;
			y--;
		}
		k++;
	}
	//cout<<t<<" "<<p<<" "<<r<<endl;
}
			
					
					

Compiler output:
a.cc: In function 'int main()':
a.cc:28:33: error: 'r' was not declared in this scope
   28 |                                 r++;
      |                                 ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
long long data[10010];
int main()
{
    long long s;
    cin>>s;
    long long i,j,k;
    for(i=1; i<100; i++)
    {
        for(j=1; j<100; j++)
        {
            for(k=1; k<100; k++)
            {
                 long long n=i*i+j*j+k*k+i*j+i*k+j*k;
                 if(0<=n&&n<=s)
                  data[n]+=1;
            }
        }
    }
    for(long long i=1;i<=s;i++)
        cout<<data[i]<<endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:19: error: reference to 'data' is ambiguous
   17 |                   data[n]+=1;
      |                   ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:3:11: note:                 'long long int data [10010]'
    3 | long long data[10010];
      |           ^~~~
a.cc:22:15: error: reference to 'data' is ambiguous
   22 |         cout<<data[i]<<endl;
      |               ^~~~
/usr/include/c++/14/bits/range_access.h:344:5: note: candidates are: 'template<class _Tp> constexpr const _Tp* std::data(initializer_list<_Tp>)'
  344 |     data(initializer_list<_Tp> __il) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:334:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])'
  334 |     data(_Tp (&__array)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:323:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)'
  323 |     data(const _Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:312:5: note:                 'template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)'
  312 |     data(_Container& __cont) noexcept(noexcept(__cont.data()))
      |     ^~~~
a.cc:3:11: note:                 'long long int data [10010]'
    3 | long long data[10010];
      |           ^~~~
Language: C++

#include"bits/stdc++.h"
using namespace std;
int n;
int main(){
	cin>>n;
	for(int i=0;i<=sqrt(n);i++){
		for(int j=i;j<=sqrt(n);j++){
			for(int k=j;k<=sqrt(n);k++){
				if(i==j&&j==k){
					flag[i*i+j*j+k*k+i*j+i*k+j*k]=1;
				}else flag[i*i+j*j+k*k+i*j+i*k+j*k]=2;
			}
		}
	} 
	for(int i=1;i<=n;i++){
		if(flag[i]==1)printf("%d\n",1);
		else if(flag[i]==2)printf("%d\n",3);
		else printf("%d\n",0);
	}
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:41: error: 'flag' was not declared in this scope
   10 |                                         flag[i*i+j*j+k*k+i*j+i*k+j*k]=1;
      |                                         ^~~~
a.cc:11:39: error: 'flag' was not declared in this scope
   11 |                                 }else flag[i*i+j*j+k*k+i*j+i*k+j*k]=2;
      |                                       ^~~~
a.cc:16:20: error: 'flag' was not declared in this scope
   16 |                 if(flag[i]==1)printf("%d\n",1);
      |                    ^~~~
Language: C++

#include "bits/stdc++.h" // 提出時こちらで問題なし
using namespace std;

int main() {
	int num_N = 0;
	cin >> num_N;

	vector<int> hash(10001, 0);
	int sum = 0;

	for (int x = 1; x < 100; x++) {
		for (int y = 1; y < 100; y++) {
			for (int z = 1; z < 100; z++) {
				sum = pow((x + y + z), 2) - (x * y + y * z + z * x);
				if (sum > 10000) {
					break;
				}
				hash[sum]++;
			}
		}
	}
	for (int i = 1; i <= n; i++) cout << hash[i] << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: 'n' was not declared in this scope
   22 |         for (int i = 1; i <= n; i++) cout << hash[i] << endl;
      |                              ^
Language: C++

#include <iostream>
using namespace std;

int main() {
  int N, cnt=0;
  cin >> N;
  
  for (auto i=1; i<N+1; i++) {
    for (auto x=1; i<i+1; i++) {
      for (auto y=1; i<i+1; i++) {
        for (auto z=1; i<i+1; i++) {
          if (x*x + y*y + z*z + x*y + y*z + z*x == i) {
            ans++;
          }
        }
      }
    }
  }
  cout << ans << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |             ans++;
      |             ^~~
      |             abs
a.cc:19:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   19 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

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

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


int main(){
	
	int N = 0;
	int Np = 100;
	int count1 = 0;
	int count2 = 0;
	
	cin >> N;
	
	while(count1 < N){
	
		for(int x = 1; x < Np; x ++){
	        	
			for(int y = 1; y < Np; y ++){
				
				for(int z = 1; z < Np; z ++){
					
					if(count1 + 1 == pow(x,2) + pow(y,2) + pow(z,2) + x*y + y*z + z*x){
						count2 ++;
					}
					if(pow(x,2) + pow(y,2) + pow(z,2) + x*y + y*z + z*x >10000){
						break;
					}
				}
			}
		}
	
	cout << count2 << endl;

	count1 ++;
	
	count2 = 0;
	
	}
}

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

#include <iostream>
#include <cmath>
using namespace std;
 
int main() {
	int n;
	cin >> n;
	for (int i = 1; i < n + 1; i++) {
		int cnt = 0;
		for (int x = 1; x < 100; x++) {
			for (int y = 1; y < sqrt(i - x); y++) {
				int rema = i - pow(x, 2) - pow(y, 2) - x * y;
				if (rema > 3) {
					for (int z = 1; z < rema; z++) {
						if (pow(z, 2) + (x + y) * z == rema) {
							cnt++;
							break;
						}
					}
				}
				else {
					break;
				}
			}
		}
		cout << cnt << 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<iostream>
#include<algorithm>
#include<queue>
#include<vector>
#include<list>
#include<set>
#include<map>
#include<utility>
#include<string>
#include<bits/stdc++.h>
using namespace std;

/*define*/
#define rep(i, n) for(int i=0; i<n; ++i)
#define endl "\n"
typedef long long ll;
//typedef pair<int, int> P;
//vector<long long> v(max_n);
//多次元配列
//vector<int> v[max_n];
//vector<vector<int>> v(max_n);
//map<int, int> m;
static const int max_n = 1e5+2, max_m = 52;
static const ll  INF = 1000000000;
const long long mod = 1e18;
int ci;

ll calc()
int main(){
    int n;
    cin >> n;
    map<ll, int> ans;
    for(int x=1; x<100; ++x){
        ans[6*x*x]++;
    }
    for(int x=1; x<=100; ++x){
        for(int y=1; y<=100; ++y){
            if(x!=y) ans[3*x*x+2*x*y+y*y]+=3;
        }
    }
    for(int x=1; x*x<=n; ++x){
        for(int y=1; y*y<n; ++y){
            for(int z=1; z*z<n; ++z){
                ans[x*x+y*y+z*z+x*y+x*z+y*z]++;
            }
        }
    }
    for(int i=1; i<=n; ++i) cout<<ans[i]<<endl;
}

Compiler output:
a.cc:29:1: error: expected initializer before 'int'
   29 | int main(){
      | ^~~
Language: C

 int main(void) {
 int n, k, i, cou=0, tmp, j, m, p, q;
 scanf("%d", &n);
 int max=sqrt(n), memo[n]

 
 for(i=1; i<=n; i++){
 cou=0;
 for(j=1; j<=i; j++){
 for(k=1; k<=i; k++){
 tmp=j*j+k*k+j*k;
 if(tmp>i) break;
 for(m=1; m<=i; m++){
 tmp=(j+k)*(j+k)+(k+m)*(k+m)+(m+j)*(m+j);
 //printf("%d %d %d %d %d\n",i, j,k,m,tmp);
 if(tmp>2*i) break;
 else if(tmp==2*i) cou++;
 }
 }
 }
 //printf("cou=%d\n", cou);
 memo[i-1]=cou;
 }
 //printf("\n");
 for(i=0; i<n; i++)
 printf("%d\n", memo[i]);

 }

Compiler output:
main.c: In function 'main':
main.c:3:2: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    3 |  scanf("%d", &n);
      |  ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 |  int main(void) {
main.c:3:2: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    3 |  scanf("%d", &n);
      |  ^~~~~
main.c:3:2: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:4:10: error: implicit declaration of function 'sqrt' [-Wimplicit-function-declaration]
    4 |  int max=sqrt(n), memo[n]
      |          ^~~~
main.c:1:1: note: include '<math.h>' or provide a declaration of 'sqrt'
  +++ |+#include <math.h>
    1 |  int main(void) {
main.c:4:10: warning: incompatible implicit declaration of built-in function 'sqrt' [-Wbuiltin-declaration-mismatch]
    4 |  int max=sqrt(n), memo[n]
      |          ^~~~
main.c:4:10: note: include '<math.h>' or provide a declaration of 'sqrt'
main.c:7:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'for'
    7 |  for(i=1; i<=n; i++){
      |  ^~~
main.c:7:20: error: expected ';' before ')' token
    7 |  for(i=1; i<=n; i++){
      |                    ^
      |                    ;
main.c:7:20: error: expected statement before ')' token
main.c:22:2: error: 'memo' undeclared (first use in this function)
   22 |  memo[i-1]=cou;
      |  ^~~~
main.c:22:2: note: each undeclared identifier is reported only once for each function it appears in
main.c:26:2: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   26 |  printf("%d\n", memo[i]);
      |  ^~~~~~
main.c:26:2: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:26:2: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:26:2: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main() {
    int N;
    cin >> N;
    vector<int> ans(N, 0);
    int judge = 0;
    if (N > 5) {
        for (int i = 6; i < N + 1; i++) {
            for (int x = 1; x <= sqrt(N); x++) {
                for (int y = 1; y <= sqrt(N); y++) {
                    for (int z = 1; z <= sqrt(N); z++) {
                        if (x * x + y * y + z * z + x * y + y * z + z * x == i && x == y && y == z) {
                            ans[i - 1]++;
                            judge = 1;
                            break;
                        }
                        else if (x * x + y * y + z * z + x * y + y * z + z * x == i && ((x == y && y != z) || (y == z && z != x) || (z == x && x != y))) {
                            ans[i - 1] += 3;
                                judge = 2;
                                break;
                        }
                        else if (x * x + y * y + z * z + x * y + y * z + z * x == i && x != y && y != z && z != x) {
                            ans[i - 1] += 6;
                                judge = 3;
                                break;
                        }
                    }
                    if (judge > 0) {
                        break;
                    }
                }
                if (judge > 0) {
                    break;
                }
            }
            if (judge > 0) {
                judge = 0;
            }
        }
    }

    for (int i = 0; i < N; i++) {
        cout << ans[i] << endl;
    }
}

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

#include<bits/stdc++.h>
using namespace std;
using ll  = long long;
using vl  = vector<ll>;
using vi  = vector<int>;
#define _GLIBCXX_DEBUG
#define IO_STREAM cin.tie(0);ios::sync_with_stdio(false)
#define all(x) x.begin(),x.end()
#define rep(i,sta,end) for(int i=sta;i<end;++i)
#define lcm(a,b) (a)/__gcd((a),(b))*(b)
#define pb push_back
const ll INF = 1000000000000000;
const ll MOD = 1000000007;
const double PI = acos(-1);
//||
#define DBG(a,b,c,d) //cout<<a<<" "<<b<<" "<<c<<" "<<d<<" "<<endl
//DBG("","","","");

int main(){
	IO_STREAM;
	int N;	cin>>N;
	vi ans(10000);
	int x,y,z;
	x=y=1;
	int x2,y2,z2;
	rep(i,1,N+1){
		int ans=0;
		rep(j,1,101){
			x=j;
			x2=x*x;
			rep(k,1,101){
				y=k;
				y2=y*y;
				if((x2+y2)>i) break;
				rep(p,1,101){
					int calc;
					z=p;
					z2=z*z;
					if((x2+y2+z2)>i) break;
					calc=x2+y2+z*z+x*y+y*z+z*x;
					ans[calc]++;
				}
			}
		}
	}
	rep(i,1,N+1){
		cout<<ans[i]<<endl;
	}
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:41:44: error: invalid types 'int[int]' for array subscript
   41 |                                         ans[calc]++;
      |                                            ^
Language: C++

#include<iostream>
#include<vector>
using namespace std;
int main() {
    int N;
    cin >> N;
    vector<int> ans(N, 0);
    int judge = 0;
    if (N > 5) {
        for (int i = 6; i < N + 1; i++) {
            for (int x = 1; x <= sqrt(N); x++) {
                for (int y = 1; y <= sqrt(N); y++) {
                    for (int z = 1; z <= sqrt(N); z++) {
                        if (x * x + y * y + z * z + x * y + y * z + z * x == i && x == y && y == z) {
                            ans[i - 1]++;
                            judge = 1;
                            break;
                        }
                        else if (x * x + y * y + z * z + x * y + y * z + z * x == i && ((x == y && y != z) || (y == z && z != x) || (z == x && x != y))) {
                            ans[i - 1] += 3;
                                judge = 2;
                                break;
                        }
                        else if (x * x + y * y + z * z + x * y + y * z + z * x == i && x != y && y != z && z != x) {
                            ans[i - 1] += 6;
                                judge = 3;
                                break;
                        }
                    }
                    if (judge > 0) {
                        break;
                    }
                }
                if (judge > 0) {
                    break;
                }
            }
            if (judge > 0) {
                judge = 0;
            }
        }
    }

                    for (int i = 0; i < N; i++) {
                        cout << ans[i] << endl;
                    }
                }

Compiler output:
a.cc: In function 'int main()':
a.cc:11:34: error: 'sqrt' was not declared in this scope
   11 |             for (int x = 1; x <= sqrt(N); x++) {
      |                                  ^~~~
Language: Java

import java.util.*;
import java.math.*;
 
 
public class Hack{
    public static void main(String args[]){
        Scanner in = new Scanner(System.in);
        int N = in.nextInt();
         
        

        for(int n = 1; n <= N ; n++){
        int x = 0;
        int y = 0;
        int z = 0;
            for(int i = 1; i < (int)Math.sqrt(n) ; i++){
            for(int j = 1; j <(int) Math.sqrt(n) ; j++){
                for(int k = 1; k <= (int)Math.sqrt(n) ; k++){
                    if(((i*i)+(j*j)+(k*k)+(i*j)+(i*k)+(j*k)) == n){
                        x = i;
                        y = j;
                        z = k;
                        i = j = k = n;
                    }

                  }
             }
        }

         if(x <= 0 || y <= 0 || z <= 0)
            System.out.print(0);
        else
        if(x == y && y == z)
            System.out.print(1);
        else
        if(x==y || y == z || x == z)
            System.out.print(3);
        
        
       // System.out.println(" "+ x + " "+ y + " " + z + "--->"+n);
       
        }
        
    }
}

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

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

int main() {
    int n;
    cin >> n;
    vector<vector<vector<int>>> N(n, vector<vector<int>>(n, vector<int>(n, 0)));
    }
    rep(i,n){
        rep(j,n){
            rep(k,n){
                    N.at(i).at(j).at(k)=i*i+j*j+k*k+i*j+j*k+k*i;
                }
            }
        }
    rep(l,n){
        cout << count_if(N.begin(), N.end(), l+1); << endl;
    }
}


Compiler output:
a.cc:3:18: error: expected unqualified-id before 'for'
    3 | #define rep(i,n) for(int i = 0; i < n; i++)
      |                  ^~~
a.cc:10:5: note: in expansion of macro 'rep'
   10 |     rep(i,n){
      |     ^~~
a.cc:10:9: error: 'i' does not name a type
   10 |     rep(i,n){
      |         ^
a.cc:3:33: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i = 0; i < n; i++)
      |                                 ^
a.cc:10:9: error: 'i' does not name a type
   10 |     rep(i,n){
      |         ^
a.cc:3:40: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i = 0; i < n; i++)
      |                                        ^
a.cc:3:18: error: expected unqualified-id before 'for'
    3 | #define rep(i,n) for(int i = 0; i < n; i++)
      |                  ^~~
a.cc:17:5: note: in expansion of macro 'rep'
   17 |     rep(l,n){
      |     ^~~
a.cc:17:9: error: 'l' does not name a type
   17 |     rep(l,n){
      |         ^
a.cc:3:33: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i = 0; i < n; i++)
      |                                 ^
a.cc:17:9: error: 'l' does not name a type
   17 |     rep(l,n){
      |         ^
a.cc:3:40: note: in definition of macro 'rep'
    3 | #define rep(i,n) for(int i = 0; i < n; i++)
      |                                        ^
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  for(int n=1;n<=N;n++){
    ans=0;
    for(int A=2;A<=141;A++){
      for(int B=2;B<=141;B++){
        if(A*A+B*B>2*n) break;
        int C=sqrt(2*n-A*A-B*B);
        int S=A+B+C;
        if(C*C==2*n-A*A-B*B && S%2==0 && S/2>max({A,B,C})){
          ans++;
        }
        
      }
    }
    cout<<ans<<endl;
    }
  return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:15: error: 'sqrt' was not declared in this scope
   13 |         int C=sqrt(2*n-A*A-B*B);
      |               ^~~~
Language: C++

#include<iostream>
#include<cmath>
using namespace std;
int main(){
  int N;
  cin>>N;
  int ans=0;
  for(int n=1;n<=N;n++){
    ans=0;
    for(int A=2;A<=141;A++){
      for(int B=2;B<=141;B++){
        if(A*A+B*B>2*n) break;
        int C=sqrt(2*n-A*A-B*B);
        int S=A+B+C;
        if(C*C==2*n-A*A-B*B && S%2==0 && S/2>max({A,B,C})){
          ans++;
        }
        
      }
    }
    cout<<ans<<endl;
    }
  return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:49: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   15 |         if(C*C==2*n-A*A-B*B && S%2==0 && S/2>max({A,B,C})){
      |                                              ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:51,
                 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/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:   candidate expects 2 arguments, 1 provided
/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, 1 provided
Language: C++

#include<bits/stdc++.h>
using namespace std;
int f(int n){
	int x,y,z;
	if(x*x + y*y + z*z + x*y + y*z + z*x == n){
		return x*y*z;
}
int main()
{
	int N;
	cin >> N;
	for(int i = 0; i < N;i++){
		int ans;
		ans = f(i);
		cout<< ans << endl;
	}		
}

Compiler output:
a.cc: In function 'int f(int)':
a.cc:8:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    8 | int main()
      |         ^~
a.cc:8:9: note: remove parentheses to default-initialize a variable
    8 | int main()
      |         ^~
      |         --
a.cc:8:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:9:1: error: a function-definition is not allowed here before '{' token
    9 | {
      | ^
a.cc:17:2: error: expected '}' at end of input
   17 | }
      |  ^
a.cc:3:13: note: to match this '{'
    3 | int f(int n){
      |             ^
a.cc:17:2: warning: control reaches end of non-void function [-Wreturn-type]
   17 | }
      |  ^
Language: C++

#include <bits/stdc++.h> 

using namespace std; 
#define ll long long
#define ld long double
ll power(ll x, ll y, ll p)  
{  
    ll res = 1;     // Initialize result  
  
    x = x % p; // Update x if it is more than or  
                // equal to p 
   
    if (x == 0) return 0; // In case x is divisible by p; 
  
    while (y > 0)  
    {  
        // If y is odd, multiply x with result  
        if (y & 1)  
            res = (res*x) % p;  
  
        // y must be even now  
        y = y>>1; // y = y/2  
        x = (x*x) % p;  
    }  
    return res;  
}  
int main()
{
	ll arr[n]={0};
	for(ll i=1;i<=10000;i++)
	{
		for(ll j=1;j<=10000;j++)
		{
			ll vl=0;
			for(ll k=1;k<=10000;k++)
			{
				vl+=i*i+j*j+k*k+i*j+j*k+i*k;
				if(vl>10000)
					break;
				else
				{
					if(i==j && i==k)
					{
						arr[vl-1]+=1;
					}
					else if(i=j || j==k || i==k)
					{
						arr[vl-1]+=3;
					}
					else
					{
						arr[vl-1]+=6;
					}
				}
			}
		}
	}
	ll n;
	cin >> n;
	ll ans=0;
	for(ll i=1;i<=n;i++)
	{
		ans+=arr[i-1];
	}
	cout << ans << "\n"; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:29:16: error: 'n' was not declared in this scope; did you mean 'yn'?
   29 |         ll arr[n]={0};
      |                ^
      |                yn
a.cc:44:49: error: 'arr' was not declared in this scope
   44 |                                                 arr[vl-1]+=1;
      |                                                 ^~~
a.cc:48:49: error: 'arr' was not declared in this scope
   48 |                                                 arr[vl-1]+=3;
      |                                                 ^~~
a.cc:52:49: error: 'arr' was not declared in this scope
   52 |                                                 arr[vl-1]+=6;
      |                                                 ^~~
a.cc:63:22: error: 'arr' was not declared in this scope
   63 |                 ans+=arr[i-1];
      |                      ^~~
Language: C++

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

int f(int x, int y, int z) {
    return pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x;
}

int main() {
    int n;
    cin >> n;

    int num = 0;

    for (int i = 1; i < n; i++) {

        if (pow(i, 2) + 2 * i + 3 > n) {
            num = i - 1;
            break;
        }
    }

    vector<int> a(n, 0);
    for (int w = num; 1 <= w; w--) {
        for (int y = w; 1 <= y; y--) {
            for (int x = y; 1 <= x; x--) {
                int u = f(x, y, w);
                if (u <= n) {
                    if (x == y && y == w) {
                        a.at(u - 1)++;
                    } else if (x != y &&y = w) {
                        a.at(u - 1) += 6;
                    } else {
                        a. at(u - 1) += 3;
                    }
                }
            }
        }
    }

    for (auto x : a) {
        cout << x << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:39: error: lvalue required as left operand of assignment
   31 |                     } else if (x != y &&y = w) {
      |                                ~~~~~~~^~~
Language: C++

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

int f(int x, int y, int z) {
    return pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x;
}

int main() {
    int n;
    cin >> n;

    int num = 0;

    for (int i = 1; i < n; i++) {

        if (pow(i, 2) + 2 * i + 3 > n) {
            num = i - 1;
            break;
        }
    }

    vector<int> a(n, 0);
    for (int w = num; 1 <= w; w--) {
        for (int y = w; 1 <= y; y--) {
            for (int x = y; 1 <= x; x--) {
                int u = f(x, y, w);
                if (u <= n) {
                    if (x == y && y == w) {
                        a.at(u - 1)++;
                    } else if (x != y &&y = w) {
                        a.at(u - 1) += 6;
                    } else {
                        a, at(u - 1) += 3;
                    }
                }
            }
        }
    }

    for (auto x : a) {
        cout << x << endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:31:39: error: lvalue required as left operand of assignment
   31 |                     } else if (x != y &&y = w) {
      |                                ~~~~~~~^~~
a.cc:34:28: error: 'at' was not declared in this scope; did you mean 'a'?
   34 |                         a, at(u - 1) += 3;
      |                            ^~
      |                            a
Language: C++

#include<functional>
#include<list>
#include<queue>
using namespace std;
#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
#define all(x) (x).begin(),(x).end()
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; }
typedef long long ll;
const long long INF = 1LL << 60;
typedef pair<int, int> P;
typedef pair<ll, ll> p;
typedef vector<int> vec;
using Graph = vector<vector<int>>;
using graph = vector<vector<ll>>;

const ll inf = (1LL<<31)-1;
const long long MOD = 1000000007;



int main() {
    int n;
    cin >> n;
    vec v(n + 1);
    repd(i,1, 101) {
        repd(j, 1, 101) {
            repd(k, 1, 101) {
                int a = i * i + j * j + k * k + i * j + j * k + k * i;
                if (i == j && j == k) {
                    if (a >= 1 && a <= n)v[i * i + j * j + k * k + i * j + j * k + k * i]++;
                }
                else if (i == j || j == k || k == i) if (a >= 1 && a <= n)v[i * i + j * j + k * k + i * j + j * k + k * i] ++;
                else  if (a >= 1 && a <= n)v[i * i + j * j + k * k + i * j + j * k + k * i]++;
            }
        }
    }
    repd(i, 1, n+1)cout << v[i] << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'cin' was not declared in this scope
   25 |     cin >> n;
      |     ^~~
a.cc:4:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    3 | #include<queue>
  +++ |+#include <iostream>
    4 | using namespace std;
a.cc:39:20: error: 'cout' was not declared in this scope
   39 |     repd(i, 1, n+1)cout << v[i] << endl;
      |                    ^~~~
a.cc:39:20: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:39:36: error: 'endl' was not declared in this scope
   39 |     repd(i, 1, n+1)cout << v[i] << endl;
      |                                    ^~~~
a.cc:4:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    3 | #include<queue>
  +++ |+#include <ostream>
    4 | using namespace std;
Language: C

#include <stdio.h>

int main(void){
  int N,n,i,j,k,s;
  scanf("%d",&N);
  if(N<0||N>10000)
    return 0;
  
  for(i=1;i<=N;i++){
    s=0;
    if(i<6){
      printf("%d",s);
    }else if{
      for(j=1;j<=n/6;j++){
        for(k=1;k<=n/6;k++){
          n = i*i+j*j+k*k+i*j+j*k+k*i;
          if(n==i){
            s++;
          }
        }
      }
      printf("%d",s);
    }
  }

  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:13:13: error: expected '(' before '{' token
   13 |     }else if{
      |             ^
      |             (
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 1; i < (int)(n); i++)
int main(){
  int n;
  cin >> n;
  int ct=1;
  while(ct<=n){
    int ans=0;
    for(int i=1;i<100;i++){
      for(int j=1;j<100;j++){
        double p=((-i-j)+sqrt((i-j)*(i-j))/2);
        double q=((-i-j)+sqrt((i-j)*(i-j))/2);
        if(p%1.0==0||q%1.0==0){
          ans++;
        }
      }
    }
    cout << ans;
    ct++;
  }
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   14 |         if(p%1.0==0||q%1.0==0){
      |            ~^~~~
      |            | |
      |            | double
      |            double
a.cc:14:23: error: invalid operands of types 'double' and 'double' to binary 'operator%'
   14 |         if(p%1.0==0||q%1.0==0){
      |                      ~^~~~
      |                      | |
      |                      | double
      |                      double
Language: C

#include<stdio.h>
int main()
{
    int N;
    scanf("%d",&N);
    int x,y,z,k,i;

    for(i=1;i<=N;i++)
    {
        for(x=1;x<=100;x++)
        {
            for(y=1;y<=x;y++)
            {
                for(z=1;z<=y;z++)
                {
                    k=(x+y+z)*(x+y+z)-(x*y+y*z+x*z);
                    if(i==k)
                    {
                        if(x==y && y==z)
                        {
                            printf("1\n");
                            break;
                        }
                        else if (x>y && y>z) 
                        {
                            printf("6\n");
                            break;
                        }
                        else 
                        {
                            printf("3\n");
                            break;
                        }
                      if(i*i>k)
                      {
                        printf("0\n")
                          break;
                      }
                    }
                }
                if(i==k) break;
              if(i*i>k) break;
            }
            if(i==k) break;
          if(i*i>k) break;
        }
    }
   
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:38: error: expected ';' before 'break'
   36 |                         printf("0\n")
      |                                      ^
      |                                      ;
   37 |                           break;
      |                           ~~~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<cmath>
using namespace std;
int main(){
  int N;
  cin>>N;
  ll ans=0;
  for(int n=1;n<=N;n++){
    ans=0;
    for(int A=2;A<=141;A++){
      for(int B=2;B<=141;B++){
        if(A*A+B*B>2*n) break;
        int C=sqrt(2*n-A*A-B*B);
        int S=A+B+C;
        if(C*C==2*n-A*A-B*B && S%2==0 && S/2>max({A,B,C})){
          ans++;
        }
        
      }
    }
    cout<<ans<<endl;
    }
  return 0;}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:3: error: 'll' was not declared in this scope
    8 |   ll ans=0;
      |   ^~
a.cc:10:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |     ans=0;
      |     ^~~
      |     abs
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 1; i < (int)(n); i++)
int main(){
  int n;
  cin >> n;
  int ct=1;
  while(ct<=n){
    int ans=0;
    for(int i=1;i<100;i++){
      for(int j=1;j<100;j++){
        float p=((-i-j)+sqrt((i-j)*(i-j))/2);
        float q=((-i-j)+sqrt((i-j)*(i-j))/2);
        if(p%1.0==0||q%1.0==0){
          ans++;
        }
      }
    }
    cout << ans;
    ct++;
  }
}

    

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: invalid operands of types 'float' and 'double' to binary 'operator%'
   14 |         if(p%1.0==0||q%1.0==0){
      |            ~^~~~
      |            | |
      |            | double
      |            float
a.cc:14:23: error: invalid operands of types 'float' and 'double' to binary 'operator%'
   14 |         if(p%1.0==0||q%1.0==0){
      |                      ~^~~~
      |                      | |
      |                      | double
      |                      float
Language: C

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

int main() {

  int N ; 
  cin >> N ;
  int x , y, z , C ; 
  x = 1 ; 
  y = 1 ; 
  z = 1 ; 
  C = 0 ;
  
  for(int i = 1 ; i <= N ; i++ ){
  
  for( x=1 ; x*x + 2 <= i ; x++ ){
      for( y=x ; y*y + x*x + 1 <= i  ; y++ ){
      	  for( z=y ; (z*z + y*y + x*x) <= i ; z++ ){
    		
            if( ((x+y)*(x+y) + (y+z)*(y+z) + (x+z)*(x+z)) == 2*i){
              if(x == y && x != z){
                C++ ; 
                C++ ;
                C++ ; 
                }
              
              

              else if(x == y && y == z){
              C++ ; 
              }
              
              else if(x == z && y  != z){
                C++;
                C++;
                C++;
                  
              }
              
              else if(y == z && x  != z){
                C++;
                C++;
                C++;
                  
              }
              
              else if(x != y && y != z){
                C++ ; 
                C++;
                C++;
              }
            }
  		  }
  	  }
  }
    

    
    cout << C << endl ; 
    C = 0 ; 

    
}

}


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

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  
  int arr[N];
  for (int i = 0; i < N + 1; i++) {
  	arr[i] = 0;
  }
  
  int x;
  x = 1;
  
  int y;
  y = 1;
  
  int z;
  z = 1;
  
  if((x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x) < N + 1) {
        arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)]++;
  }

  while(x < N + 1) {  
    x++;//2,1,1
     if((x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x) < N + 1) {
        arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)] += 3;
     }
    if(y < x) {
    	y++;
         if((x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x) < N + 1) {
          arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)] += 3;
        }
    	z++;//2,2,2
        if((x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x) < N + 1) {
          	if(x == y && y == z) {
            	arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)++;
            }else{
            arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)] +=3;
            }
        }  
    }//2,2,1
   
    y = 1;
    z = 1; 
  }
  
   for (int j = 1; j < N + 1; j++) {
  	cout << arr[j] << endl;
     cout << j << endl;
  }
  
}

Compiler output:
a.cc: In function 'int main()':
a.cc:39:74: error: lvalue required as increment operand
   39 |                 arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)++;
      |                                                                       ~~~^~~~
a.cc:39:80: error: expected ']' before ';' token
   39 |                 arr[(x * x) + (y * y) + (z * z) + (x * y) + (y * z) + (z * x)++;
      |                                                                                ^
      |                                                                                ]
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 1; i < (int)(n); i++)
int main(){
  int n;
  cin >> n;
  int ct=1;
  while(ct<=n){
    int ans=0;
    for(int i=1;i<100;i++){
      for(int j=1;j<100;j++){
        double p=((-i-j)+sqrt((i-j)*(i-j))/2);
        double q=((-i-j)+sqrt((i-j)*(i-j))/2);
        if(p%1==0 || q%1==1){
          ans++;
        }
      }
    }
    cout << ans;
    ct++;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   14 |         if(p%1==0 || q%1==1){
      |            ~^~
      |            | |
      |            | int
      |            double
a.cc:14:23: error: invalid operands of types 'double' and 'int' to binary 'operator%'
   14 |         if(p%1==0 || q%1==1){
      |                      ~^~
      |                      | |
      |                      | int
      |                      double
Language: C

#include <stdio.h>
int main(void){
int a;
  int i,j;
  int x, y,z;
  int sum=0;
  int num[99];
  scanf("%d", &a);
  
  for (i=1; i<=a; i++){
    for (x=1; x<=20; x++){
      for (y=1; y<=20; y++){
        for (z=1; z<=20; z++){
          if (x*x+y*y+z*z+x*y+x*z+y*z==i){
            sum++;
          }
        }
      }
    } 
    num[i]=sum;
    sum=0;
  }
     for (j=1;j<=a;j++){
       printf("%d\n", num[j]);
     }
  return 0;
}
提出情報 

Compiler output:
main.c:28:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
   28 | 提出情報
      | ^~~~~~~~
Language: Java

import java.util.*;

public class Main {
	static Scanner sc = new Scanner(System.in);

	public static void main(String[] args) {
		int N=sc.nextInt();
		for(int i=1;i<=N;i++) {
			int c=-1;
			int re=0;
			for(int x=1;c<=i;x++) {
				for(int y=x;c<=i;y++) {
					for(int z=y;true;z++) {
						c=x*x+y*y+z*z+x*y+y*z+z*x;
						if(c>=i) {
							if(c==i) {
								if(x==y&y==z) {
									re=1;
								}else if((x!=y&&y==z)||(y!=z&&z==x)||(z!=x&&x==y)) {
									re=3;
								}else {
									re=6;
								}
							}
							break;
						}
					}
                  	long t=x*x+y*y*3+x*y*2
					if(t<=i) {
						c=0;
					}
				}
              	long t=6*x*x;
				if(t<=i) {
					c=0;
				}
			}
			System.out.println(re);
		}
	}
}


Compiler output:
Main.java:28: error: ';' expected
                  	long t=x*x+y*y*3+x*y*2
                  	                      ^
1 error
Language: C

#include <stdio.h>

int main() {
    int x=1,y=1,z=1,N,anser=0;
    scanf("%d", &N);
    for(int i=1;i<N+1;i++){
            for(x=1;x<=i&&y*z<=i;x++){
                for(y=1;y<=iz*y<=i;y++){
                    for(z=1;z<=iz*y<=i;z++){
                        if(x*x+y*y+z*z+x*y+y*z+x*z == i){
                             anser++;    
                        }
                    }
                }
            }
            printf("%d\n",anser);
            anser=0;
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:8:28: error: 'iz' undeclared (first use in this function); did you mean 'i'?
    8 |                 for(y=1;y<=iz*y<=i;y++){
      |                            ^~
      |                            i
main.c:8:28: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define  fo(i,n) for(ll i=0;i<n;i++)
#define rfo(i,n) for(ll i=n;i>=0;i--)
#define fori(it, x) for (__typeof((x).begin()) it = (x).begin(); it != (x).end(); it++)
#define pb push_back
#define deb(x) cout<< #x << " = "<<x<<endl;
#define F first
#define S second
#define MP make_pair
#define all(x) (x).begin(), (x).end()
void solve()
{ll n;
cin>>n;
for(ll i=1;i<=n;i++)
{
	ll ans =0;
	ll x,y,z;
	ll temp = (ll)sqrt(i);
	if(i != (temp*temp))
	{
		temp++;
	}
	for( x=1;x<=i-2;x++)
	{
		for( y=1;y<=i-2;y++)
		{
			 z= temp-x-y;
			 if(z<1){break;
			 }
		
		if((pow(x,2)+pow(y,2)+pow(z,2)+(x*y)+(y*z)+(x*z))==i)
		{
			ans ++;2020
		}
		}
	}
	cout<<ans<<"\n";
}
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
	solve();
    return 0;
}

Compiler output:
a.cc: In function 'void solve()':
a.cc:35:36: error: expected ';' before '}' token
   35 |                         ans ++;2020
      |                                    ^
      |                                    ;
   36 |                 }
      |                 ~
Language: C++

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 1; i < (int)(n); i++)
int main(){
  int n;
  cin >> n;
  int ct=1;
  while(ct<=n){
    int ans=0;
    for(int i=1;i<100;i++){
      for(int j=1;j<100;j++){
        double p=((-i-j)+sqrt((i+j)*(i+j)-4(i*i+j*j+i*j-ct))/2);
        double q=((-i-j)-sqrt((i+j)*(i+j)-4(i*i+j*j+i*j-ct))/2);
        if(p.is_integer())==true ||q.is_integer())==true){
          ans++;
        }
      }
    }
    cout << ans;
    ct++;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:44: error: expression cannot be used as a function
   12 |         double p=((-i-j)+sqrt((i+j)*(i+j)-4(i*i+j*j+i*j-ct))/2);
      |                                           ~^~~~~~~~~~~~~~~~
a.cc:13:44: error: expression cannot be used as a function
   13 |         double q=((-i-j)-sqrt((i+j)*(i+j)-4(i*i+j*j+i*j-ct))/2);
      |                                           ~^~~~~~~~~~~~~~~~
a.cc:14:14: error: request for member 'is_integer' in 'p', which is of non-class type 'double'
   14 |         if(p.is_integer())==true ||q.is_integer())==true){
      |              ^~~~~~~~~~
a.cc:14:27: error: expected primary-expression before '==' token
   14 |         if(p.is_integer())==true ||q.is_integer())==true){
      |                           ^~
a.cc:14:38: error: request for member 'is_integer' in 'q', which is of non-class type 'double'
   14 |         if(p.is_integer())==true ||q.is_integer())==true){
      |                                      ^~~~~~~~~~
Language: C++

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

int main(){
  int n,cnt=0,k=0;
  cin >> n;
  int list[20]={0,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,3,3,0,0};
  while(k<n){
    cout << list.at(k) << endl;
    k++;
  }
  for(int k=20;k<=n;k++){
  for(int x=1;x<k-2;x++){
    for(int y=1;y<k-2;y++){
      for(int z=1;z<k-2;z++){
        if(x*x+y*y+z*z+x*y+y*z+z*x==k){
          cnt++;
          break;
        }
      }
    }
  }
    cout << cnt << endl;
    cnt=0;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:18: error: request for member 'at' in 'list', which is of non-class type 'int [20]'
    9 |     cout << list.at(k) << endl;
      |                  ^~
Language: C

#include <stdio.h>
#include <math.h>

int main(void){
  int N,n,i,j,k,s;
  scanf("%d",&N);
  if(N<0||N>10000)
    return 0;
  
  for(n=1;n<=N;n++){
    s=0;
    for(i=1;i<=n/6)
      for(j=1;j<=n/6;j++){
        for(k=1;k<=n/6;k++){
          nn=i*i+j*j+k*k+i*j+j*k+k*i;
          if(n==nn)
            s++;
        }
      }
    }
    printf("%d",s);
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:12:19: error: expected ';' before ')' token
   12 |     for(i=1;i<=n/6)
      |                   ^
      |                   ;
main.c:15:11: error: 'nn' undeclared (first use in this function); did you mean 'n'?
   15 |           nn=i*i+j*j+k*k+i*j+j*k+k*i;
      |           ^~
      |           n
main.c:15:11: note: each undeclared identifier is reported only once for each function it appears in
main.c: At top level:
main.c:23:3: error: expected identifier or '(' before 'return'
   23 |   return 0;
      |   ^~~~~~
main.c:24:1: error: expected identifier or '(' before '}' token
   24 | }
      | ^