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

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

          for(int j = 0;j < Math.sqrt(N);j++){
            for(int k = 0;k<Math.sqrt(N);k++){
              }
              for(int l = 0;l<Math.sqrt(N);l++){
                if(j^2 + k^2 + l^2 + jk + kl + lj = N){
                  	count ++ ;
                	System.out.println(count);	
                }
          }
    }
}

Compiler output:
Main.java:21: error: reached end of file while parsing
}
 ^
1 error
Language: C++

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pint pair<int, int>
#define pll pair<ll, ll>
#define vint vector<int >
#define vll vector<ll >
#define ALL(x) (x).begin(), (x).end()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i,n) for (int i = 0; i < (n); ++i)
const int INF = 100100100;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;


int out(int a, int b, int c){
    if(a==b && b==c) return 1;
    if(a!=b && b!=c && c!=a) return 6;
    return 3;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int N;
    cin >> N;
    vint ret(N);
    REP(i,n) ret[i] = 0;
    
    FOR(x,1,N){
        FOR(y,1,N){
            FOR(z,1,N){
                int value = x*x + y*y + z*z + x*y + y*z + z*x;
                if(value > N) break;
                ret[value-1] = out(x,y,z);
            }
        }
    }

    REP(i,N){
        cout << ret[i] << "\n";
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:11: error: 'n' was not declared in this scope
   28 |     REP(i,n) ret[i] = 0;
      |           ^
a.cc:10:39: note: in definition of macro 'REP'
   10 | #define REP(i,n) for (int i = 0; i < (n); ++i)
      |                                       ^
Language: C++

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

int main() {
  ll n;
  cin>>n;
  ll k=n/6+1;
  for(ll a=0;a<n;a++){
    ll count=0;
  for(ll x=0;x<k;x++){
    for(ll y=0;y<k;y++){
      for(ll z=0;z<k;z++){
        if((x+1)*(x+1)+(y+1)*(y+1)+(z+1)*(z+1)+(x+1)*(y+1)+(y+1)*(z+1)+(z+1)*(x+1)==(a+1)){
          count++;
        }
        }
      }
    }
  cout<<count<<endl;
  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <bits/stdc++.h>
      | ^~~~~~~
a.cc:5:11: error: 'pair' does not name a type
    5 | using P = pair<int,int>;
      |           ^~~~
a.cc: In function 'int main()':
a.cc:9:3: error: 'cin' was not declared in this scope
    9 |   cin>>n;
      |   ^~~
a.cc:22:3: error: 'cout' was not declared in this scope; did you mean 'count'?
   22 |   cout<<count<<endl;
      |   ^~~~
      |   count
a.cc:22:16: error: 'endl' was not declared in this scope
   22 |   cout<<count<<endl;
      |                ^~~~
Language: C++

#include<iostream>
#include<cmath>
#include<vector>
using namespace std;

int main(){
    int N;
    double z;
    cin >> N;
    vector<int> f(N + 1);

    for(int n = 6; n <= N; n++){
        for(int x = 1; x < sqrt(n - 3); x++){
            for(int y = 1; y < sqrt(n - pow(x, 2) - 2); y++){
                ifor(int z = 1; z <= sqrt(n - pow(x, 2) - pow(y, 2) - x * y - (x * y) * z); z++){
                    if(pow(x, 2) + pow(y, 2) + pow(z, 2) + x * y + y * z + z * x == n){
                        f[n]++;
                    }
            }
        }
    }

    for(int n = 1; n <= N; n++) cout << f[n] << endl;

}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:22: error: expected primary-expression before 'int'
   15 |                 ifor(int z = 1; z <= sqrt(n - pow(x, 2) - pow(y, 2) - x * y - (x * y) * z); z++){
      |                      ^~~
a.cc:15:96: error: expected ';' before ')' token
   15 |                 ifor(int z = 1; z <= sqrt(n - pow(x, 2) - pow(y, 2) - x * y - (x * y) * z); z++){
      |                                                                                                ^
      |                                                                                                ;
a.cc:25:2: error: expected '}' at end of input
   25 | }
      |  ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

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

int main(){
  int n,cnt=0,i=0;
  cin >> n;
  int retu[18]={0,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,3,3,0,0};
  while(i<n){
    cout << retu.at(i) << endl;
    i++;
  }
  if(n>18){
    for(int k=1;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:7:56: error: too many initializers for 'int [18]'
    7 |   int retu[18]={0,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,3,3,0,0};
      |                                                        ^
a.cc:9:18: error: request for member 'at' in 'retu', which is of non-class type 'int [18]'
    9 |     cout << retu.at(i) << endl;
      |                  ^~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
#define ALL(a)    a.begin(), a.end() 
//#define rep(i, K, N)  for(int i = K; i < N; i++)
#define ll long long int
using namespace std;

int main() {
ll N;cin >> N;
map<ll, ll> P;

for(ll n = 1; n <= N; n++){
for(ll i = 2; i*i < 2*n; i++){
for(ll j = 2; i*i + j*j + 1 < 2*n; j++){


ll k = 2*n - i*i - j*j;

if(ceil(sqrt(k) != floor(sqrt(k)))continue;

k = sqrt(k);

if(i != j && i != k && j != k){P[n] += 6;continue;}
if(i== j && j == k && i == k){P[n]++;continue;}
P[n] += 3;



}
}
}

for(ll i = 1; i <= N; i++)cout << P[i] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:35: error: expected ';' before 'continue'
   19 | if(ceil(sqrt(k) != floor(sqrt(k)))continue;
      |                                   ^~~~~~~~
      |                                   ;
a.cc:21:12: error: expected ')' before ';' token
   21 | k = sqrt(k);
      |            ^
      |            )
a.cc:19:3: note: to match this '('
   19 | if(ceil(sqrt(k) != floor(sqrt(k)))continue;
      |   ^
Language: C++

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

int make_result(int n)
{
    int c=0;
    int x=n;
    n=sqrt(n);
    for(int i=1;i<=(n);i++)
    {
      for(int j=1;j<=(n);j++)
      {
          for(int k=1;k<=(n);k++)
          {
              int val=i*i+j*j+k*k+i*j+j*k+k*i;
              if(val==x)
              {
                 c++;
              }
          }
      }
    }
    return c;
}
int main()
{
    int n;
     ios_base::sync_with_stdio(false);
     cin.tie(NULL)
    cin>>n;
    for(int i=1;i<=n;i++)
    {
        cout<<make_result(i)<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:30:19: error: expected ';' before 'cin'
   30 |      cin.tie(NULL)
      |                   ^
      |                   ;
   31 |     cin>>n;
      |     ~~~
Language: C++

#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <functional>
#include <unordered_set>
#include <vector>
using namespace std;


int main(void) {
    long long N;

    cin >> N;

    for(long long i=1; i<=N; ++i)
    {
        long long sum = 0;
        for(long long x=1; x<=i-4-x*x; ++x)
        {
            for(long long y=1; y<=i-4-y*y;++y)
            {
                double d_z_1 = (-(x+y) +  sqrt((x+y)*(x+y) - 4*(i-x*x-y*y-x*y))) / 2;
                double d_z_2 = (-(x+y) +  sqrt((x+y)*(x+y) + 4*(i-x*x-y*y-x*y))) / 2;
                long long z = 0;
                if(d_z_1 < 1 || d_z_1 > i-4 || d_z_1 - (long long)d_z_1 != 0.0)
                {
                    if(d_z_2 < 1 || d_z_2 > i-4 || d_z_2 - (long long)d_z_2 != 0.0)
                    {
                        continue;
                    }
                    else
                    {
                        z = (long long)d_z_2;
                    }
                    
                }
                else
                {
                    z = (long long)d_z_1;
                }
                if(x*x+y*y+z*z+x*y+y*z+z*x == i)
                {
                    if(x == y && y == z)
                    {
                        sum = 1;
                        break;
                    }
                    if(x !=y && y != z && z != x)
                    {
                        sum = 6;
                        break;
                    }
                    else
                    {
                        sum = 3;
                        break;
                    }
                }
            }
            if(sum != 0)
            {
                break;
            }
        }
        cout << sum << endl;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:43: error: 'sqrt' was not declared in this scope
   23 |                 double d_z_1 = (-(x+y) +  sqrt((x+y)*(x+y) - 4*(i-x*x-y*y-x*y))) / 2;
      |                                           ^~~~
Language: C++

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

int main(){
  int n,cnt=0,i=0;
  cin >> n;
  int retu[]={0,0,0,0,0,1,0,0,0,0,3,0,0,0,0,0,3,3,0,0};
  while(i<n){
    cout << retu.at(i) << endl;
    i++;
  }
  if(n>18){
    for(int k=1;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 'retu', which is of non-class type 'int [20]'
    9 |     cout << retu.at(i) << endl;
      |                  ^~
Language: C++

#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <map>
#include <numeric>
#include <algorithm>
#include <stdio.h>

int main(void){
  int n,c,f;
  std::cin >> n;
  for(int i=1;i<=n;i++){
    c=0;
    f=(int)(i+1)/6;/*
    std::cout << f;*/
    for(int x=1;x<=f;x++){
      if(x*6>=i){
        int yin = 1;
      }else{
        int yin = f;
      }
      for(int y=1;y<=yin;y++){
        if(x*y*6>=i){
          int zin = 1;
        }else{
          int zin = f;
        }
        for(int z=1;z<=zin;z++){
          if(x*x+y*y+z*z+x*y+y*z+z*x==i)
          c++;
        }
      }
    }
    std::cout << c << std::endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:22: error: 'yin' was not declared in this scope; did you mean 'yn'?
   23 |       for(int y=1;y<=yin;y++){
      |                      ^~~
      |                      yn
a.cc:29:24: error: 'zin' was not declared in this scope; did you mean 'sin'?
   29 |         for(int z=1;z<=zin;z++){
      |                        ^~~
      |                        sin
Language: Java

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int[] cnt = new int[100000];
		for(int i = 0; i < 10010; i++) {
			cnt[i] = 0;
		}
		//System.out.println(Math.pow((double)n, 1.0/2.0));
		for(int i = 1; i < Math.pow((double)n, 1.0/2.0); i++) {
			for(int j = 1; j < Math.pow((double)n, 1.0/2.0); j++) {
				for(int k = 1; k < Math.pow((double)n, 1.0/2.0); k++) {
					if(i*i+j*j+k*k+i*j+j*k+k*i == 10000) {
						System.out.println(i + " " + j + " " + k);
					}
					if(i == j && j == k) {
						cnt[i*i+j*j+k*k+i*j+j*k+k*i] += 1;
					}else if((i == j && j != k) || (j == k && k != i) || (k == i && i != j)) {
						cnt[i*i+j*j+k*k+i*j+j*k+k*i] += 1;
					}else if(i != j && j != k && k != i) {
						//System.out.println(i+ " " + j + " " + k +" " + i*i+j*j+k*k+i*j+j*k+k*i);
						cnt[i*i+j*j+k*k+i*j+j*k+k*i] += 1;
					}
				}
			}
		}
		for(int i = 1; i < n+1; i++) {
			System.out.println(cnt[i]);
		}
	}
}


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

#define int long long int
#define pb push_back
#define f first
#define s second


signed main()
{
  int n;
  cin>>n;
  int arr[n+1]={0};
int   r=sqrt(n);
  for(int i=1;i<=r;i++)
  {
      for(int j=i;j<=r;j++)
      {
          for(int k=j;k<=r;k++)
          {
              int p=i*i+j*j+k*k+i*j+j*k+k*i;
              if(p>n)
                break;
              set<int>s;
              s.insert(i); s.insert(j); s.insert(k);
              if(s.size()==1)
                arr[p]=1;
              else if(s.size()==2)
                arr[p]=3;
              else
                arr[p]=6;
          }
      }
  }
  for(int i=1;i<=n;i++)
    cout<<arr[i]<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:3: error: 'cin' was not declared in this scope
   10 |   cin>>n;
      |   ^~~
a.cc:12:9: error: 'sqrt' was not declared in this scope
   12 | int   r=sqrt(n);
      |         ^~~~
a.cc:22:15: error: 'set' was not declared in this scope
   22 |               set<int>s;
      |               ^~~
a.cc:1:13: error: expected primary-expression before 'long'
    1 | #define int long long int
      |             ^~~~
a.cc:22:19: note: in expansion of macro 'int'
   22 |               set<int>s;
      |                   ^~~
a.cc:4:11: error: 'second' was not declared in this scope
    4 | #define s second
      |           ^~~~~~
a.cc:23:15: note: in expansion of macro 's'
   23 |               s.insert(i); s.insert(j); s.insert(k);
      |               ^
a.cc:34:5: error: 'cout' was not declared in this scope
   34 |     cout<<arr[i]<<endl;
      |     ^~~~
a.cc:34:19: error: 'endl' was not declared in this scope
   34 |     cout<<arr[i]<<endl;
      |                   ^~~~
Language: C++

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

typedef long long ll;
typedef int64_t i6;
typedef std::vector<std::vector<int64_t> > Graph;

#define rep(i, n) for (int64_t i = 0; i < n; ++i)
#define rep2(i, n) for (int64_t i = 1; i <= n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define Sort(x) sort(ALL(x))
#define Sort_rev(x) Sort(x);reverse(ALL(x))
#define Push_back(p, a, b) (p).push_back( make_pair( (a), (b) ) )

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;  }
template<typename V,typename T> bool find_num(V v, T num) { if ( find(ALL(v), num) == v.end() ) { return false; } return true; }

// π M_PI
// deg = rad*180/M_PI

int64_t function (int64_t x, int64_t y, int64_t z) {
    return x*x+y*y+z*z+x*y+y*z+z*x;
}

int main() {
    int64_t n;
    cin >> n;
    int64_t x = 1;
    std::vector<int64_t> v;
    while (1) {
        int64_t y = 1;
        while (1) {
            int64_t z = 1;
            while (1) {
                int64_t num = function(x, y, z);
                if (num > 10000) break;
                v.push_back(num);
                z++;
            }
            if (z == 1) break;
            y++;
        }
        if (y == 1) break;
        x++;
    }

    Sort(v);

    rep2(i, n) {
        if ( !find_num(v, i) ) {
            cout << 0 << endl;
        } else {
            int64_t ans = 0;
            int64_t boo = 0;
            rep(j, v.size()) {
                if (boo == 1) {
                    if ( v[j] == i ) {
                        ans++;
                    } else {
                        break;
                    }
                }

                if (v[j] == i) boo = 1;
            }
            cout << ans+1 << endl;
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:31: error: reference to 'function' is ambiguous
   36 |                 int64_t num = function(x, y, z);
      |                               ^~~~~~~~
In file included from /usr/include/c++/14/functional:59,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:53,
                 from a.cc:1:
/usr/include/c++/14/bits/std_function.h:111:11: note: candidates are: 'template<class _Signature> class std::function'
  111 |     class function;
      |           ^~~~~~~~
a.cc:22:9: note:                 'int64_t function(int64_t, int64_t, int64_t)'
   22 | int64_t function (int64_t x, int64_t y, int64_t z) {
      |         ^~~~~~~~
Language: C++

#include<iostream>
using namespace std;
#define ll long long int
int main()
{
  ll x,y,z,n,i=1;
  cin>>n;
  x=y=z=1;
  if(n<=6)
  { while(n--)
      cout<<"0"<<endl;
  return 0;}
 /* for(i=1;i<=6;i++)
    cout<<"0"<<endl;*/
  while((n-i)>=0)
  {
    if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)>i)
    {
      ll g=(((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2);
      for(;i<g;i++)
      cout<<"0"<<endl;
      continue;}
    //else if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)==i)
    {
      if((x==y)&&(y==z)&&(z==x))
      {cout<<"1"<<endl;
       x++;
      continue;}
      else if(((x-1)==y)&&(y==z)&&(z==x))
      {for(;i
        cout<<"3"<<endl;
       y++;
         continue;          
      }
      if((x==y)&&((y-1)==z)&&((x-1)==z))
      {
        cout<<"3"<<endl;
        z++;
        continue;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:30:14: error: expected ';' before 'cout'
   30 |       {for(;i
      |              ^
      |              ;
   31 |         cout<<"3"<<endl;
      |         ~~~~  
a.cc:31:24: error: expected ')' before ';' token
   31 |         cout<<"3"<<endl;
      |                        ^
      |                        )
a.cc:30:11: note: to match this '('
   30 |       {for(;i
      |           ^
Language: C++

#include <iostream>

using namespace std;

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

	if (N <= 6) {
		for (int i = 0; i < N; ++i) cout << "0" << endl;
		return 0;
	}

	for (int i = 1; i < N; ++i)
	{
		int s = 0;
		for (int j = 1; j < (int)std::sqrt(N); ++j)
		{
			for (int k = 1; k < (int)std::sqrt(N); ++k)
			{
				for (int l = 1; l < (int)std::sqrt(N); ++l)
				{
					if (j * j + k * k + l * l + j * k + k * l + l * j == i) s++;
				}
			}
		}
		cout << s << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:47: error: 'sqrt' is not a member of 'std'
   18 |                 for (int j = 1; j < (int)std::sqrt(N); ++j)
      |                                               ^~~~
a.cc:20:55: error: 'sqrt' is not a member of 'std'
   20 |                         for (int k = 1; k < (int)std::sqrt(N); ++k)
      |                                                       ^~~~
a.cc:22:63: error: 'sqrt' is not a member of 'std'
   22 |                                 for (int l = 1; l < (int)std::sqrt(N); ++l)
      |                                                               ^~~~
Language: C++

#include <iostream>
using namespace std;
int main() {
    int n;
    cin>>n;
    int dp[n+1];
    memset(dp,0,sizeof(dp));
    int s1=1,s2=1,s3=1;
    int res = 0;
    for(int i=s1;i<=n;i++)
    {
        for(int j=s2;j<=n;i++)
        {
            for(int k=s3;k<=n;k++)
            {
                res = i*i + j*j + k*k + i*j + j*k + k*i;
                if(res>n)
                break;
                dp[res]++;
            }
        }
    }
    for(int i=1;i<=n;i++)
    {
        cout<<dp[i]<<"\n";
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'memset' was not declared in this scope
    7 |     memset(dp,0,sizeof(dp));
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:14:11: error: 'num' undeclared (first use in this function); did you mean 'sum'?
   14 |           num[i]=sum;
      |           ^~~
      |           sum
main.c:14:11: note: each undeclared identifier is reported only once for each function it appears in
main.c:20:11: error: 'j' undeclared (first use in this function)
   20 |      for (j=1;j<=a;j++){
      |           ^
Language: C++

#include <cstdint>
#include <string>
#include <iostream>
#include <vector>

int main(int argc, char* argv[])
{	
	int32_t N;
	std::cin >> N;
	const int32_t maxXYZ = int32_t(std::sqrt(double(N + 1)));

	for (int32_t n = 1; n <= N; ++n)
	{
		int cnt = 0;
		for (int32_t x = 1; x <= maxXYZ; ++x)
		{
			for (int32_t y = 1; y <= maxXYZ; ++y)
			{
				for (int32_t z = 1; z <= maxXYZ; ++z)
				{
					if (x * x + y * y + z * z + x * y + y * z + z * x == n)
					{
						++cnt;
					}
				}
			}
		}
		std::cout << cnt << std::endl;
	}
}


Compiler output:
a.cc: In function 'int main(int, char**)':
a.cc:10:45: error: 'sqrt' is not a member of 'std'
   10 |         const int32_t maxXYZ = int32_t(std::sqrt(double(N + 1)));
      |                                             ^~~~
Language: C++

#include <iostream>
#include <algorithm>
#include <functional>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <string>
#include <numeric>
#include <cmath>
#include <bitset>

#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
using P = pair<ll, ll>;

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;}

const ll MOD = 1000000007;
const int INF = 1<<30;
//const ll INF = (ll)1e18 + 1;

// 素因数分解
template <typename T>
map<T, T> prime_factor(T n) {
    map<T, T> ret;
    for (T i = 2; i * i <= n; i++) {
        T tmp = 0;
        while (n % i == 0) {
            tmp++;
            n /= i;
        }
        ret[i] = tmp;
    }
    if (n != 1) ret[n] = 1;
    return ret;
}

// 約数の個数を求める
template <typename T>
T divisor_num(T N) {
    map<T, T> pf = prime_factor(N);
    T ret = 1;
    for (auto p : pf) {
        ret *= (p.second + 1);
    }
    return ret;
}

// 平方数かどうかの判定
bool is_squere(long long N) {
    return divisor_num(N) % 2 == 1;
}


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

  int ans = 0;
  int z1, z2;
  int disc;
  for (int n = 1; n <= N; ++n){
    ans = 0;
    for (int x = 1; x <= 100; ++x){
      for (int y = 1; y <= 100; ++y){
        if (x * x + y * y x * y >= n) continue;
        disc = (y + x) * (y + x) - 4 * (x * x + y * y + x * y - n);
        if (is_squere(disc)){
          z1 = (- (y + x) + sqrt(disc)) / 2;
          z2 = (- (y + x) - sqrt(disc)) / 2;
          if (z1 > 0) ans++;
          if (z2 > 0) ans++;
        }
      }
    }
    cout << ans << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:69:26: error: expected ')' before 'x'
   69 |         if (x * x + y * y x * y >= n) continue;
      |            ~             ^~
      |                          )
Language: Java

//package AtCoder;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.StringTokenizer;

import Puplis.zsort;

public class Main {
	static int INF = (int) 1e9;
	static ArrayList<Integer>[] adjList;

	public static void main(String[] args) throws IOException {
		Scanner sc = new Scanner(System.in);
		int res = 0 ;
		int n = sc.nextInt();
		for(int i = 1 ; i <= n ; i++)
			System.out.println(check(i, n));
	}

	public static int check(int n , int N) {
		int max= (int)Math.sqrt(N);
		int res = 0;
		for( int x = 1 ; x <= n ; x++)
			for( int y = 1 ; y <= n - x*x ; y++)
				for(int z = 1 ; z <= n - x*x - y*y ; z++)
					if( n == x*x + y*y + z*z + x*y + y*z + z*x)
						res++;
		return res;
	}
	
	
	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream system) {
			br = new BufferedReader(new InputStreamReader(system));
		}

		public Scanner(String file) throws Exception {
			br = new BufferedReader(new FileReader(file));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

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

		public double nextDouble() throws IOException {
			return Double.parseDouble(next());
		}

		public char nextChar() throws IOException {
			return next().charAt(0);
		}

		public Long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public boolean ready() throws IOException {
			return br.ready();
		}

		public void waitForInput() throws InterruptedException {
			Thread.sleep(3000);
		}
	}

	public static int gcd(int a, int b) {
		if (a == 0)
			return b;

		return gcd(b % a, a);
	}

	public static void shuffle(int[] a) {
		int n = a.length;
		for (int i = 0; i < n; i++) {
			int r = i + (int) (Math.random() * (n - i));
			int tmp = a[i];
			a[i] = a[r];
			a[r] = tmp;
		}
	}

	public static long square(long l) {
		return l * l;
	}
}


Compiler output:
Main.java:11: error: package Puplis does not exist
import Puplis.zsort;
             ^
1 error
Language: C++

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

long long f(int X,int Y,int Z)
{
  long long af=X*(X+Y)+Y*(Y+Z)+Z*(Z+X);
  return af;
}

int main()
{
int N;cin>>N;vector<long long> ans(N+1,0);
for(int x=1;x<N;x++)for(int y=x;y<N;y++)for(int z=y;z<N;z++)
{
  long long ff=f(x,y,z);
  if(ff>N)break;
  if(x==y&&y==z)ans[ff]++;
  else if(x==y)ans[ff]+=3;
  else if(y==z)ans[ff]+=3;
  else ans[ff]+=6;
}
for(int i=1;i<N+1;i++)cout<<ans[i]<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:22:42: error: expected '}' at end of input
   22 | for(int i=1;i<N+1;i++)cout<<ans[i]<<endl;
      |                                          ^
a.cc:11:1: note: to match this '{'
   11 | {
      | ^
Language: C++

#include<iostream>
using namespace std;
#define ll long long int
int main()
{
  ll x,y,z,n,i=1;
  cin>>n;
  x=y=z=1;
  if(n<=6)
  { while(n--)
      cout<<"0"<<endl;
  return 0;}
 /* for(i=1;i<=6;i++)
    cout<<"0"<<endl;*/
  while((n-i)=>0)
  {
    if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)>i)
    {cout<<"0"<<endl;
      continue;}
    else if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)==i)
    {
      if((x==y)&&(y==z)&&(z==x))
      {cout<<"1"<<endl;
       x++;}
      else if(((x-1)==y)&&(y==z)&&(z==x))
      {cout<<"3"<<endl;
       y++;
      }
      if((x==y)&&((y-1)==z)&&((x-1)==z))
      {
        cout<<"3"<<endl;
        continue;
        z++;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:15: error: expected primary-expression before '>' token
   15 |   while((n-i)=>0)
      |               ^
Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      int N = sc.nextInt();
      
      int count = 0;
      for(int i = 1: i <= N;i++){
        for(int x = 1; x <= N;x++){
          for(int y =1; y <= N; y++){
            for(int z = 1; z <= N; z++){
              if(x*x + y*y + z*z + x*y + y*z + z*x == i){
                count++;
                break;
              }
            }
          }
        }
        System.out.println(count);
      }
    }
}

Compiler output:
Main.java:9: error: ';' expected
      for(int i = 1: i <= N;i++){
                   ^
Main.java:9: error: not a statement
      for(int i = 1: i <= N;i++){
                       ^
Main.java:9: error: ';' expected
      for(int i = 1: i <= N;i++){
                               ^
3 errors
Language: C++

#include<iostream>
using namespace std;
#define ll long long int
int main()
{
  ll x,y,z,n,i=1;
  cin>>n;
  x=y=z=1;
  if(n<=6)
  { while(n--_)
      cout<<"0"<<endl;
  return 0;}
 /* for(i=1;i<=6;i++)
    cout<<"0"<<endl;*/
  while((n-i)=>0)
  {
    if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)>i)
    {cout<<"0"<<endl;
      continue;}
    else if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)=i)
    {
      if((x==y)&&(y==z)&&(z==x))
      {cout<<"1"<<endl;
       x++;}
      else if(((x-1)==y)&&(y==z)&&(z==x))
      {cout<<"3"<<endl;
       y++;
      }
      if((x==y)&&((y-1)==z)&&((x-1)==z))
      {
        cout<<"3"<<endl;
        continue;
        z++;
      }
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected ')' before '_'
   10 |   { while(n--_)
      |          ~   ^
      |              )
a.cc:10:14: error: '_' was not declared in this scope
a.cc:15:15: error: expected primary-expression before '>' token
   15 |   while((n-i)=>0)
      |               ^
a.cc:20:51: error: lvalue required as left operand of assignment
   20 |     else if((((x+y)*(x+y)+(y+z)*(y+z)+(z+x)*(z+x))/2)=i)
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Language: C++

#include <bits/stdc++.h>
#include <math.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
#define rep(i,n) for (int i = 0; i < (int)(n); ++i)
#define rrep(i,j,n) for(int i = (int)(j); i < (int)(n); i++)
#define mrep(i,n) for (int i = (int)(n); i > 0; i--)
#define be(v) (v).begin(), (v).end()
#define dcout cout << fixed << setprecision(20)
ll INF = 1LL << 60;
ll mod = 1e9 + 7;
ll modn = 998244353;

int vec[10001];
int cosuu(int n) {
	if(n<20) {
		return vec[n];
	}
	int ans=0;
	for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
		int s=i*i+j*j+k*k+i*j+j*k+k*i;
		if(s==n) ans++;
		if(s>n) break;
	}
	vec[n-1]=ans;
  	return vec[n-1];
}
int main() {
	vec[0]=0;
	vec[1]=0;
	vec[2]=0;
	vec[3]=0;
	vec[4]=0;
	vec[5]=1;
	vec[6]=0;
	vec[7]=0;
	vec[8]=0;
	vec[9]=0;
	vec[10]=3;
	vec[11]=0;
	vec[12]=0;
	vec[13]=0;
	vec[14]=0;
	vec[15]=0;
	vec[16]=3;
	vec[17]=3;
	vec[18]=0;
	vec[19]=0;
	int n; cin >> n;
	rep(i,n) {
		cout << cosuu(i) << endl;
	}
}

Compiler output:
a.cc: In function 'int cosuu(int)':
a.cc:21:22: error: expected ';' before '<=' token
   21 |         for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
      |                      ^~
      |                      ;
a.cc:21:22: error: expected primary-expression before '<=' token
   21 |         for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
      |                      ^~
a.cc:21:44: error: expected ';' before '<=' token
   21 |         for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
      |                                            ^~
      |                                            ;
a.cc:21:44: error: expected primary-expression before '<=' token
   21 |         for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
      |                                            ^~
a.cc:21:66: error: expected ';' before '<=' token
   21 |         for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
      |                                                                  ^~
      |                                                                  ;
a.cc:21:66: error: expected primary-expression before '<=' token
   21 |         for(int i=1,i<=20;i++)for(int j=1,i<=20;j++)for(int k=1,i<=20;k++) {
      |                                                                  ^~
Language: C++

#include <bits/stdc++.h>
using namespace std;
inline f(int x, int y, int z){
	return x*x + y*y + z*z + x*y + x*z + y*z;
}
int main(int argc, char const *argv[]){
	int count = 40;
	map<int, int> ans;
	for (int x = 1; x < count; ++x){
		for (int y = 1; y < count; ++y){
			for (int z = 1; z < count; ++z){
				ans[f(x,y,z)]++;
			}
		}
	}

	int n;
	cin>>n;
	for (int i = 1; i <= n; ++i){
		cout << ans[i] << endl;
	}
	return 0;
}

Compiler output:
a.cc:3:8: error: ISO C++ forbids declaration of 'f' with no type [-fpermissive]
    3 | inline f(int x, int y, int z){
      |        ^
Language: C++

#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file 
#include <ext/pb_ds/tree_policy.hpp> 
#include <functional> // for less
using namespace std;
using namespace __gnu_pbds;
#define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define endl "\n"
#define int long long 
// int dx[]={-1,1,0,0}; int dy[]={0,0,1,-1};
// int dx[]={2,2,-2,-2,1,1,-1,-1}; int dy[]={1,-1,1,-1,2,-2,2,-2};
const long long mod = 1e9 + 7;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef pair<int, int> ii;
typedef vector< pair< int, int > > vii;
typedef map<int, int> mii;
typedef pair<int, ii> pip;
typedef pair<ii, int> ppi;
#define arrinp(arr,init,final,size,type) type* arr=new type[size];for(int i=init;i<final;i++)cin>>arr[i];
#define cr2d(arr,n,m,t) t**arr=new t*[n];for(int i=0;i<n;i++)arr[i]=new t[m];
#define w(t) int t;cin>>t; while(t--)
#define takeInp(n) int n;cin>>n;
#define fr(i,init,final) for(int i=init;i<final;i++)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>  nds; 
vi init(string s)
{
	istringstream sin(s);
	int n;
	vi arr;
	while(sin>>n)arr.push_back(n);
	return arr;
}
int pow(int x, int y)
{ 
	if(y==0)return 1;
	int u=pow(x,y/2);
	u=u*u;
	if(y%2)u=x*u;
	return u;
    
}
int gcd(int a,int b)
{
	if(a<b)return gcd(b,a);
	return (b==0?a:(a%b?gcd(b,a%b):b));
}
int gcd_e(int a,int b,int &x,int &y)
{
	
	if(b==0){x=1; y=0; return a;}
	int x1,y1;
	int p=gcd_e(b,a%b,x1,y1);
	x=y1;
	y=x1-(a/b)*y1;
	return p;
}
signed main()
{
	IOS
	int n;
	cin>>n;
	long long arr[n+1];
	fr(i,1,n+1)
	{   arr[i]=0;
		fr(j,1,sqrt(((double)(2*i)+1)
		{
			for(long long  k=1;j+k<=sqrt(2*i);k++)
			{
				for(long long r=1;(j+k)*(j+k)+(j+r)*(j+r)+(k+r)*(k+r)<=2*i;r++)
				{
					if( (j+k)*(j+k)+(j+r)*(j+r)+(k+r)*(k+r)==2*i)arr[i]++;
				}
			}
		}
	}
	fr(i,1,n+1)cout<<arr[i]<<endl;
	
}



Compiler output:
a.cc:87:1: error: unterminated argument list invoking macro "fr"
   87 | 
      | ^
a.cc: In function 'int main()':
a.cc:73:17: error: 'fr' was not declared in this scope
   73 |                 fr(j,1,sqrt(((double)(2*i)+1)
      |                 ^~
a.cc:73:19: error: expected '}' at end of input
   73 |                 fr(j,1,sqrt(((double)(2*i)+1)
      |                   ^
a.cc:72:9: note: to match this '{'
   72 |         {   arr[i]=0;
      |         ^
a.cc:73:19: error: expected '}' at end of input
   73 |                 fr(j,1,sqrt(((double)(2*i)+1)
      |                   ^
a.cc:66:1: note: to match this '{'
   66 | {
      | ^
Language: C

#include<stdio.h>

int main(void){
  int n;
  int a[10000];
  scanf("%d", &n);
  for(int x = 1;x <= 98; x++){
    for(int y = 1;y<=x && y<=100-x;y++){
      for(int z = 1;z <= y && z<=100-x-y;z++){
        a[(x+y+z)*(x+y+z) - x*y - x*z - y*z - 1] += 6;
        if(x == y || x == z || y == z && a[(x+y+z)*(x+y+z) - x*y - x*z - y*z - 1] != 0){
          a[(x+y+z)*(x+y+z) - x*y - x*z - y*z - 1] -= 3;
          if(x == y && y == z)
            a[(x+y+z)*(x+y+z) - x*y - x*z - y*z - 1] -= 2;
        }
      }
    }
  }
  for(int i = 0; i < n; i++){
    printf("%d\n", a[i]);
  }

Compiler output:
main.c: In function 'main':
main.c:21:3: error: expected declaration or statement at end of input
   21 |   }
      |   ^
Language: C

#include <stdio.h>

int main()
{
    int N, i, j, k, l, c;
    scanf("%d", &N);
    for (i = 1; i <= N; i++)
    {
        c = 0;
        for (j = 1; j <= 10; j++)
        {
            for (k = 1; k <= 10 k++)
            {
                for (l = 1; l <= 10; l++)
                {
                    if (j * j + k * k + l * l + j * k + j * l + k * l == i)
                    {
                        c++;
                    }
                }
            }
        }
        printf("%d\n", c);
    }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:32: error: expected ';' before 'k'
   12 |             for (k = 1; k <= 10 k++)
      |                                ^~
      |                                ;
Language: C++

  if(((i+j+k)%2==0)&&(i-j+k)>1&&(i+j-k)>1&&(j+k-i)>1)

Compiler output:
a.cc:1:3: error: expected unqualified-id before 'if'
    1 |   if(((i+j+k)%2==0)&&(i-j+k)>1&&(i+j-k)>1&&(j+k-i)>1)
      |   ^~
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());
      	int count = 0,jc = 1,jk = 1;
      	for(int cnt = 0;cnt < n;cnt++){
        	for(int i = 1;i * jc * jk < cnt;i++){
            	for(int j = 1;i * j * k < cnt;j++){
                	for(int k = 1;i * j * k < cnt;k++){
                    	if(i * j * k == n){
                        	count++;
                        }
                    }
                }
            }
          	System.out.println(count);
          	count = 0;
        }
    }
}


Compiler output:
Main.java:10: error: cannot find symbol
            	for(int j = 1;i * j * k < cnt;j++){
            	                      ^
  symbol:   variable k
  location: class Main
1 error
Language: C++

#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < n; ++i)
using namespace std;
typedef long long ll;
#define MODSIZE 1000000007
// priority_queue<int, vector<int>, greater<int> > PQ; // 昇順PQ
priority_queue<ll> PQ;

int main(){
  int n;

  scanf("%d", &n);

  int i,j,k,l;
  int ii,jj,kk;
  int ij,jk,ik;
  int ans[10006] = {0};
  for(l = 1;l <= n;l++){
    ans = 0;
    for(i = 1;i <= sqrt(l);i++){
      ii = i*i;
      for(j = 1;j <= sqrt(l - ii);j++){
        jj = j*j;
        ij = i*j;
        for(k = 1;k <= sqrt(l - ii - jj - ij);k++){
          kk = k*k;
          if(ii + jj + kk + i*j + j*k + i*k == l) ans[l]++;
        }
      }
    }
  }

  for(i = 1;i <= n;i++) printf("%d\n", ans[i]);

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:9: error: incompatible types in assignment of 'int' to 'int [10006]'
   19 |     ans = 0;
      |     ~~~~^~~
Language: C++

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

    int f;

    for (int n=1; n<=N;++n) {
        f=0;
        for (int x=1;x*x<N;++x){
            for (int y=1;y*y<N-x*x;++y){
                for (int z=1;z*z<N-x*x -y*y;++z) {
                    if (x*x + y*y + z*z + x*y + y*z + z*x == n){
                        ++f;
                    }
                }
            }
        }
        std::cout << f << std::endl;
    }

    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:2:10: error: 'cin' is not a member of 'std'
    2 |     std::cin.tie(0);
      |          ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main (){
a.cc:3:14: error: 'std::ios' has not been declared
    3 |         std::ios::sync_with_stdio(false);
      |              ^~~
a.cc:4:16: error: 'cin' is not a member of 'std'
    4 |     int N;std::cin >> N;
      |                ^~~
a.cc:4:16: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:14: error: 'cout' is not a member of 'std'
   19 |         std::cout << f << std::endl;
      |              ^~~~
a.cc:19:14: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:19:32: error: 'endl' is not a member of 'std'
   19 |         std::cout << f << std::endl;
      |                                ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main (){
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());
      	int count = 0,j = 1,k = 1;
      	for(int cnt = 0;cnt < n;cnt++){
        	for(int i = 1;i * j * k < cnt;i++){
            	for(int j = 1;i * j * k < cnt;j++){
                	for(int k = 1;i * j * k < cnt;k++){
                    	if(i * j * k == n){
                        	count++;
                        }
                    }
                }
            }
          	System.out.println(count);
          	count = 0;
        }
    }
}


Compiler output:
Main.java:10: error: variable j is already defined in method main(String[])
            	for(int j = 1;i * j * k < cnt;j++){
            	        ^
Main.java:11: error: variable k is already defined in method main(String[])
                	for(int k = 1;i * j * k < cnt;k++){
                	        ^
2 errors
Language: Java

import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long [] in = new long [n];
        
        for(int i=1;i<=Math.sqrt(n)/6;i++){for(int j=1;j<=Math.sqrt(n)/6;j++){
          for(int k=1;k<=Math.sqrt(n)/6;k++){in[i*i+j*j+k*k+i*j+j*k+k*i-1]++;}                                                                                                                                                                                  
                                             }                                                                            
                                          }                         
         for(int i=0;i<n;i++){System.out.println(in[i]);}	
	}

Compiler output:
Main.java:13: error: reached end of file while parsing
	}
	 ^
1 error
Language: Java

import java.util.*;
import java.util.function.*;
import java.math.*;
public class Main {
    public static void main(String[] args){
Scanner s = new Scanner(System.in);
		int N = Integer.valueOf(s.next());
		int[] ret = new int[N+1];
		
		for(int x = 1; x < 24; x++) {
			for(int y = 1; y < 24; y++) {
				for(int z = 1; z < 24; z++) {
					int cur = calc(x, y, z);
					if(cur <= N) {
						ret[cur]++;
					}else {
						continue;
					}
				}
			}
		}
		
		for(int i = 1; i <= N; i++) {
			System.out.println(ret[i]);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
					int cur = calc(x, y, z);
					          ^
  symbol:   method calc(int,int,int)
  location: class Main
1 error
Language: C++

#include <iostream>

using namespace std;

bool is_square(int n)
{
	int x = (int)sqrt((double)n);
	return x * x == n;
}

bool z_ok(int n, int x, int y)
{
	int b = x + y;
	int c = x * x + y * y + x * y - n;
	int D = b * b - 4 * c;

	if (D < 0) {
		return false;
	}
	if (!is_square(D)) {
		return false;
	}

	int D2 = (int)sqrt((double)D);


	if ((b % 2) != (D2 % 2)) {
		return false;
	}

	int z = -b + D2;

	return z >= 1;
}

int f(int n)
{
	int ans = 0;
	for (int x = 1; x * x <= n; ++x) {
		for (int y = 1; x * x + y * y <= n; ++y) {
			if (z_ok(n, x, y)) {
				++ans;
			}
		}
	}
	return ans;
}

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

	for (int i = 1; i <= N; ++i) {
		cout << f(i) << endl;
	}
}


Compiler output:
a.cc: In function 'bool is_square(int)':
a.cc:7:22: error: 'sqrt' was not declared in this scope
    7 |         int x = (int)sqrt((double)n);
      |                      ^~~~
a.cc: In function 'bool z_ok(int, int, int)':
a.cc:24:23: error: 'sqrt' was not declared in this scope
   24 |         int D2 = (int)sqrt((double)D);
      |                       ^~~~
Language: C++

#include <iostream>
using namespace std;

typedef long long int ll;

const ll maxN = 1e4 + 11;

int main(){
    cin.sync_with_stdio(false);
    cin.tie(0);
    ll n;
    cin >> n;
    map<ll, ll> dp;
    for(ll i=1; i<100; i++){
        for(ll j=1; j<100; j++){
            for(ll k=1; k<100; k++){
                ll q = i*i + j*j + k*k + i*k + j*k + i*k;
                dp[q] += 1;
            }
        }
    }
    for(ll i=1; i<=n; i++){
        cout << dp[i] << "\n";
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:5: error: 'map' was not declared in this scope
   13 |     map<ll, ll> dp;
      |     ^~~
a.cc:2:1: note: 'std::map' is defined in header '<map>'; this is probably fixable by adding '#include <map>'
    1 | #include <iostream>
  +++ |+#include <map>
    2 | using namespace std;
a.cc:13:11: error: expected primary-expression before ',' token
   13 |     map<ll, ll> dp;
      |           ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |     map<ll, ll> dp;
      |               ^
a.cc:13:17: error: 'dp' was not declared in this scope
   13 |     map<ll, ll> dp;
      |                 ^~
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());
      	int count = 0;
      	for(int cnt = 0;cnt < n;cnt++){
        	for(int i = 1;i * j * k < cnt;i++){
            	for(int j = 1;i * j * k < cnt;j++){
                	for(int k = 1;i * j * k < cnt;k++){
                    	if(i * j * k == n){
                        	count++;
                        }
                    }
                }
            }
          	System.out.println(count);
          	count = 0;
        }
    }
}


Compiler output:
Main.java:9: error: cannot find symbol
        	for(int i = 1;i * j * k < cnt;i++){
        	                  ^
  symbol:   variable j
  location: class Main
Main.java:9: error: cannot find symbol
        	for(int i = 1;i * j * k < cnt;i++){
        	                      ^
  symbol:   variable k
  location: class Main
Main.java:10: error: cannot find symbol
            	for(int j = 1;i * j * k < cnt;j++){
            	                      ^
  symbol:   variable k
  location: class Main
3 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;
int f(int n){
  if(n<6)return 0;
  int count=0;
  for(int i=1;i<n;i++){
    for(int j=1;j<n;j++){
      for(int k=1;k<n;k++){
        if(i*i+j*j+k*k+i*j+i*k+j*k==n)count++
      }
    }
  }
  return count;
}
int main(){
  int n;
  cin >> n;
  for(int i=1;i<=n;i++){
    cout << f(i) << endl;
  }
}
    

Compiler output:
a.cc: In function 'int f(int)':
a.cc:9:46: error: expected ';' before '}' token
    9 |         if(i*i+j*j+k*k+i*j+i*k+j*k==n)count++
      |                                              ^
      |                                              ;
   10 |       }
      |       ~