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

#include<stdio.h>
main(){
  int n,x;
  int i,j,k;
  int counter;
  while(1){
    scanf("%d%d",&n,&x);
    if(n==0 && x==0)
      break;
    for(i=1;i<=n;i++)
      for(j=i+1;j<=n;j++)
        for(k=j+1;k<=n;k++)
          if(i+j+k==x)
            counter++;
    printf("%d\n",counter);
    counter=o;
  }
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:16:13: error: 'o' undeclared (first use in this function)
   16 |     counter=o;
      |             ^
main.c:16:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <iostream>
using namespace std;

int main(void)
{
	int n, x;
	while (true){
		cin >> n >> x;
		if (n==0 && x==0) break;
		
		int c = 0;
		for (int i=1; i<n-1; i++)
			for (int j=i+1; j<n; j++)
				for (int k=j+1; k<n+1; k++){
					int s = i+j+k;
					if (s==x) c++;
					else if (s>x) break;
				}
		cout << c;
	}
	return 0;
}

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

#include<stdio.h>
int main(void)
{
  int n,x,i,j,p;
  int k=0;
  while(1){
    scanf("%d %d",&n,&x);
    if(n==0 && x==0) printf('0')break;
    else{
         for(i=1;i<=n;i++){
	   for(j=i+1;j<=n;j++){
	     for(p=j+1;p<=n;p++){
	       if(i+j+p==x) k++;
	     }
	   }
	 }
	 printf("%d\n",k);
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:29: error: passing argument 1 of 'printf' makes pointer from integer without a cast [-Wint-conversion]
    8 |     if(n==0 && x==0) printf('0')break;
      |                             ^~~
      |                             |
      |                             int
In file included from main.c:1:
/usr/include/stdio.h:363:43: note: expected 'const char * restrict' but argument is of type 'int'
  363 | extern int printf (const char *__restrict __format, ...);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
main.c:8:33: error: expected ';' before 'break'
    8 |     if(n==0 && x==0) printf('0')break;
      |                                 ^~~~~
      |                                 ;
Language: C

#include<stdio.h>
int main(void)
{
  int n,x,count,i,j;

  while(1){
    scanf("%d %d",&n,&x);
    if(n==0 && x==0) break;
    else{
      count=0;
         for(i=1;i<n;i++){
	   for(j=i+1;j<n;j++){
	     if(j+1<=x-i-j && x--i-j<=n) count++;
	   }
	 }
    }
  }
  printf("%d\n",k);
  return 0;
}

	       

Compiler output:
main.c: In function 'main':
main.c:13:34: error: expected ')' before 'i'
   13 |              if(j+1<=x-i-j && x--i-j<=n) count++;
      |                ~                 ^
      |                                  )
main.c:18:17: error: 'k' undeclared (first use in this function)
   18 |   printf("%d\n",k);
      |                 ^
main.c:18:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
  int n,x,count,i,j;

  while(1){
    scanf("%d %d",&n,&x);
    if(n==0 && x==0) break;
    else{
      count=0;
      for(i=1;i<n;i++){
	for(j=i+1;j<n;j++){
	  if(j+1<=x-i-j && x--i-j<=n) count++;
	}
      }
    }
  }
  printf("%d\n",k);
  return 0;
}

	       

Compiler output:
main.c: In function 'main':
main.c:13:31: error: expected ')' before 'i'
   13 |           if(j+1<=x-i-j && x--i-j<=n) count++;
      |             ~                 ^
      |                               )
main.c:18:17: error: 'k' undeclared (first use in this function)
   18 |   printf("%d\n",k);
      |                 ^
main.c:18:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<stdio.h>
int main(void)
{
  int n,x,count,i,j;

  while(1){
    scanf("%d %d",&n,&x);
    if(n==0 && x==0) break;
    else{
      count=0;
      for(i=1;i<n;i++){
	for(j=i+1;j<n;j++){
	  if(j+1<=x-i-j && x--i-j<=n) count++;
	}
      }
    }
  printf("%d\n",k);
  }

  return 0;
}

	       

Compiler output:
main.c: In function 'main':
main.c:13:31: error: expected ')' before 'i'
   13 |           if(j+1<=x-i-j && x--i-j<=n) count++;
      |             ~                 ^
      |                               )
main.c:17:17: error: 'k' undeclared (first use in this function)
   17 |   printf("%d\n",k);
      |                 ^
main.c:17:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include<iostream>
#define rep(i,a) for(int i = 0; i < a; i++)
using namespace std;

int main(){
	int n, x, ans;
	while(1){
		ans = 0;
		cin >> n >> x;
		if(n == 0 && x == 0) break;

		for(int i = 1; i <= n - 2; i++){
			for(int j = i + 1; j <= n - 1; j++){
				for(int k = j + 1; k <= n; k++){
					if(i + j + k == x) ans++;
				}
			}
		}
		cout << ans << endl;
	}
}

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

#include <iostream>
using namespace std;

int n,x,count;
int main() {
	while(true) {
		cin >> n >> x;
		if(n == 0 && x == 0) break;
		for(int i = n-3; i > x/3 && i < n-2; --i) {
			int sum = x-i;
			int num = i - sum/2 -1;
			count += num;
		}
		cout << count << endl;
	}
}

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

#include <iostream>
using namespace std;

int main(){
  int n,x,count;

  while(1){
    cin>>n>>x;
    if(n==0 && x==0) break;
    for(int i=1;i<=n;i++){
      for(int j=1;j<=n;j++){
	for(int k=1;k<=n;k++){
	  if(i+j+k==x && i!=j && i!=k && j!=k && i<j && j<k)
	    count++;
      }
    }
  }
  cout<<count<<endl;
  return 0;
}



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

#include<iostream>
using namespacestd;
int count(int n,int x){
     int cnt=0;
    for(int i=1;i<=n-2;i++){
        for(int j=i+1;j<=n-1;j++){
            for(int k=j+1;k<=n;k++){
                if(i+j+k==x)cnt++;
            }
        }
    }
    return cnt;
}
int main(){
    int n,x;
    while(1){
    　cin>>n>>x;
    　if(n==0&&x==0)break;
    　cout<<count(n,x)<<endl;
    }
    return 0;
}


Compiler output:
a.cc:17:5: error: extended character 　 is not valid in an identifier
   17 |     　cin>>n>>x;
      |     ^
a.cc:18:5: error: extended character 　 is not valid in an identifier
   18 |     　if(n==0&&x==0)break;
      |     ^
a.cc:19:5: error: extended character 　 is not valid in an identifier
   19 |     　cout<<count(n,x)<<endl;
      |     ^
a.cc:2:7: error: expected nested-name-specifier before 'namespacestd'
    2 | using namespacestd;
      |       ^~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:17:5: error: '\U00003000cin' was not declared in this scope
   17 |     　cin>>n>>x;
      |     ^~~~~
a.cc:18:5: error: '\U00003000if' was not declared in this scope
   18 |     　if(n==0&&x==0)break;
      |     ^~~~
a.cc:19:5: error: '\U00003000cout' was not declared in this scope
   19 |     　cout<<count(n,x)<<endl;
      |     ^~~~~~
a.cc:19:25: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   19 |     　cout<<count(n,x)<<endl;
      |                         ^~~~
      |                         std::endl
In file included from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int count(int n,int x){
     int cnt=0;
    for(int i=1;i<=n-2;i++){
        for(int j=i+1;j<=n-1;j++){
            for(int k=j+1;k<=n;k++){
                if(i+j+k==x)cnt++;
            }
        }
    }
    return cnt;
}
int main(){
    int n,x;
    while(1){
    　cin>>n>>x;
    　if(n==0&&x==0)break;
    　cout<<count(n,x)<<endl;
    }
    return 0;
}


Compiler output:
a.cc:17:5: error: extended character 　 is not valid in an identifier
   17 |     　cin>>n>>x;
      |     ^
a.cc:18:5: error: extended character 　 is not valid in an identifier
   18 |     　if(n==0&&x==0)break;
      |     ^
a.cc:19:5: error: extended character 　 is not valid in an identifier
   19 |     　cout<<count(n,x)<<endl;
      |     ^
a.cc: In function 'int main()':
a.cc:17:5: error: '\U00003000cin' was not declared in this scope
   17 |     　cin>>n>>x;
      |     ^~~~~
a.cc:18:5: error: '\U00003000if' was not declared in this scope
   18 |     　if(n==0&&x==0)break;
      |     ^~~~
a.cc:19:5: error: '\U00003000cout' was not declared in this scope
   19 |     　cout<<count(n,x)<<endl;
      |     ^~~~~~
Language: C++

#include <bits/stdc++.h>
using namespace std;
int main(){
	int n,sa;
	float D = 0;
	cin>>n;
	int x[n];
	int y[n];
	for(int i = 0;i<n;i++){
		cin>>x[i];
	}
	for(int i = 0;i<n;i++){
		cin>>y[i];
	}
	for(int i = 0;i<n;i++){
		if(x[i]>y[i])sa = x[i] - y[i];
		else  sa = y[i] -x[i];
		D += sa;
	}
	printf("%.4f\n",D);
	sa = 0;
	D = 0;
	for(int i = 0;i<n;i++){
		if(x[i]>y[i])sa = x[i] - y[i];
		else  sa = y[i] -x[i];
		D += sa*sa;
	}
	couT<<D<<endl;
	printf("%.50f\n",sqrt(D));
	D = 0;
	sa = 0;
	for(int i = 0;i<n;i++){
		if(x[i]>y[i])sa = x[i] - y[i];
		else  sa = y[i] -x[i];
		D += sa*sa*sa;
	}
	printf("%.10f\n",cbrt(D));
	D = 0;
	sa = 0;
	float max = 0;
	for(int i = 0;i<n;i++){
		if(x[i]>y[i])sa = x[i] - y[i];
		else  sa = y[i] -x[i];
		if(max<sa)max = sa;
	}
	printf("%.4f",max);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:28:9: error: 'couT' was not declared in this scope
   28 |         couT<<D<<endl;
      |         ^~~~
Language: C++

#include<stdio.h>

int main(){
    int n,x,a;
    scanf("%d%d",&n,&x);
    for(int i=0,i<n,i++){
        for(int j=0,j<n,j++){
            for(int k=0,k<n,k++){
                if(i+j+k==x)a++;
            }
        }
    }
    printf("%d\n",a);
}


Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: expected ';' before '<' token
    6 |     for(int i=0,i<n,i++){
      |                  ^
      |                  ;
a.cc:6:18: error: expected primary-expression before '<' token
a.cc:6:24: error: expected ';' before ')' token
    6 |     for(int i=0,i<n,i++){
      |                        ^
      |                        ;
a.cc:7:22: error: expected ';' before '<' token
    7 |         for(int j=0,j<n,j++){
      |                      ^
      |                      ;
a.cc:7:22: error: expected primary-expression before '<' token
a.cc:7:28: error: expected ';' before ')' token
    7 |         for(int j=0,j<n,j++){
      |                            ^
      |                            ;
a.cc:8:26: error: expected ';' before '<' token
    8 |             for(int k=0,k<n,k++){
      |                          ^
      |                          ;
a.cc:8:26: error: expected primary-expression before '<' token
a.cc:8:32: error: expected ';' before ')' token
    8 |             for(int k=0,k<n,k++){
      |                                ^
      |                                ;
Language: C++

#include <cstdio>
#include <iostream>
using namespace std;


int main(){
    int n, x;
    
    while(1){
        cin >> n >> x;
        if (n == 0 && x == 0) break;
        int cnt = 0;
        for(int i = 1; i*3+2 < x && i+2 <= n; i++){
            int temp = x-2*i-1;
            cnt += (temp-i)/2;
            if (temp >= n) cnt -= temp-n;
        }
        if (cnt < 1) cnt = 1;
        cout << cnt << endl;
    }
    
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:22:14: error: expected '}' at end of input
   22 |     return 0;
      |              ^
a.cc:6:11: note: to match this '{'
    6 | int main(){
      |           ^
Language: C++

#include<iostream>
using namespace std;
int main(){
int n,x,ans=0;
while(1){
cin >> n >> x;
if(n==0 && x==0)break;
for(int i=1; i<=n-2; i++){
for(int j=i+1; j<=n-1; j++){
for(it k=j+1; k<=n; k++){
if(i+j+k==x) ans++;
}
}
}
cout << ans <<endl;
}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'it' was not declared in this scope; did you mean 'i'?
   10 | for(it k=j+1; k<=n; k++){
      |     ^~
      |     i
a.cc:10:15: error: 'k' was not declared in this scope
   10 | for(it k=j+1; k<=n; k++){
      |               ^
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	unsigned int n, x, ans = 0;
	while (true) {
		cin >> n >> x;
		if (n == 0 && x == 0)
			break;
		ans = 0;
		n = min(n,  x - 3);
		for (unsigned int i = n; i  > 2; --i) {
			unsigned int y = min(x - i - 1, i);
			unsigned int z = max(1, x - y);
			ans+= (y - z - 1) / 2;
		}
		cout << ans << endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:17:45: error: no matching function for call to 'max(int, unsigned int)'
   17 |                         unsigned int z = max(1, x - y);
      |                                          ~~~^~~~~~~~~~
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:   template argument deduction/substitution failed:
a.cc:17:45: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'unsigned int')
   17 |                         unsigned int z = max(1, x - y);
      |                                          ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:17:45: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   17 |                         unsigned int z = max(1, x - y);
      |                                          ~~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <algorithm>

using namespace std;

int main()
{
	unsigned int n, x, ans = 0;
	while (true) {
		cin >> n >> x;
		if (n == 0 && x == 0)
			break;
		ans = 0;
		n = min(n,  x - 3);
		for (unsigned int i = n; i > 2; --i) {
			unsigned int r = x - i;
			unsigned int y = min(r - 1, i - 1);
			unsigned int z = max(1, r - y);
			ans+= (y - z - 1) / 2;
		}
		cout << ans << endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:45: error: no matching function for call to 'max(int, unsigned int)'
   18 |                         unsigned int z = max(1, r - y);
      |                                          ~~~^~~~~~~~~~
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:   template argument deduction/substitution failed:
a.cc:18:45: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'unsigned int')
   18 |                         unsigned int z = max(1, r - y);
      |                                          ~~~^~~~~~~~~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 2 provided
In file included from /usr/include/c++/14/algorithm:61,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   template argument deduction/substitution failed:
a.cc:18:45: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   18 |                         unsigned int z = max(1, r - y);
      |                                          ~~~^~~~~~~~~~
Language: C++

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

int main() {
    int n, x;
    
    while(1) {
        cin >> n >> x;
        
        if (n == 0 && x == 0) {
            break;
        } else {
            cout << solve << endl;
        }
        
    }
}

int solve(int n, int x) {
    int cnt = 0;
    
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            for (int k = j + 1; k < n; k++) {
                if (i + j + k == x) {
                    cnt++;
                } else if (i + j + k >= x) {
                    break;
                }
            }
        }
    }
    
    return cnt;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'solve' was not declared in this scope
   13 |             cout << solve << endl;
      |                     ^~~~~
Language: C++

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

int main() {
    int n, x;
    
    while(1) {
        cin >> n >> x;
        
        if (n == 0 && x == 0) {
            break;
        } else {
            cout << solve(n, x) << endl;
        }
        
    }
}

int solve(int n, int x) {
    int cnt = 0;
    
    for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
            for (int k = j + 1; k < n; k++) {
                if (i + j + k == x) {
                    cnt++;
                } else if (i + j + k >= x) {
                    break;
                }
            }
        }
    }
    
    return cnt;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:21: error: 'solve' was not declared in this scope
   13 |             cout << solve(n, x) << endl;
      |                     ^~~~~
Language: C++

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

int main(){
int n,x;
int count = 0;
while(1){
     cin >> n >> x;
     if(n == 0 && x == 0){
          break;
     }
     for(int i = 1; i <= n; i++){
          for(int j = 1; j <= n; j++){
               for(int k = 1; k <= n; k++){
               if( k != i && k != j && i != j){
                    if(i + j + k == x){
                    count++;
                    }
               }
               }
          }
          }
     }
     count /= 6;
     cout << count << endl;
}
return 0;
}


Compiler output:
a.cc:29:1: error: expected unqualified-id before 'return'
   29 | return 0;
      | ^~~~~~
a.cc:30:1: error: expected declaration before '}' token
   30 | }
      | ^
Language: C++

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

using namespace std;

int main(){
	while(true){
		int n, x;
		cin >> n >> x;
		if(n==0){
			break
		}
		int cnt = 0;
		for(int i = 1; i <= n; i++){
			for(int j = 1; j <= n; j++){
				if(i!=j){
					for(int k = 1; k <= n; k++){
						if(i!=k&&j!=k){
							if(i+j+k==x){
								cnt++;
							}
						}
					}
				}
			}
		}
		cout << cnt << "\n";
	}
}


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

#include<iostream>
using namespace std;
int main(){
    int n, x;
    cin >> n >> x;
    int i,j,k,total=0;
    while(n!=0||x!=0){
        for(i=1;i<n-1;i++){
            for(j=i+1;j<n;j++){
                for(k=j+1;k<n+1;k++){
                    if(x==i+j+k) total+=1
                }
            }
        }
        cout << total << endl;
        cin >> n >> x;
        total = 0;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:42: error: expected ';' before '}' token
   11 |                     if(x==i+j+k) total+=1
      |                                          ^
      |                                          ;
   12 |                 }
      |                 ~
Language: C++

#include<iostream>
using namespace std;

int main(){
int n, x;

While(1){
 cin  >> n >> x;
 if(n == 0 && x == 0) break;

 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+j+k == x) count += 1;
       }
     }
   }
 cout << count << endl;
 }
}



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

#include <stdio.h>

int main(void){
  int i,j,k,l,n,x;

  for ( ; ; ){
    scanf("%d %d",&n,&x);
    if (n == 0 && x == 0){
      break;
    }
  
    for (n = 1; i <= n; i++){
      for (j = 1; j <= n; j++){
        for (k = 1; k <= n; k++){
          if (i + j + k == x){
            l += l
          }
        }
      }
    }
  }
  printf("%d\n",&l)

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:19: error: expected ';' before '}' token
   16 |             l += l
      |                   ^
      |                   ;
   17 |           }
      |           ~        
a.cc:22:20: error: expected ';' before 'return'
   22 |   printf("%d\n",&l)
      |                    ^
      |                    ;
   23 | 
   24 |   return 0;
      |   ~~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,x,t;
    t=0
    while(1){
        cin>>n>>x;
        if (n==0&&x==0) break;
        else{
            for (int a=1;a<=n;a++){
                if (a==n-1) break;
                else for (int b=a+1;b<=n;b++){
                    if (b==n) break;
                    else for (int c=b+1;c<=n;c++){
                        if (a+b+c==x) t+=1; 
                    }
                }
            }
        }
    }return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected ';' before 'while'
    5 |     t=0
      |        ^
      |        ;
    6 |     while(1){
      |     ~~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,x;
    while(1){
        int count=0;
        cin>>n>>x;
        if(n==0)break;
        for(int i=0;i<=n;i++){
            for(int j=i+1;j<=n;j++){
                for(int k=j+1;k<=n;k++){
                    if(i+j+k==x){
                        count++;
                    }
                }
            }
        }
    }   
    cout<<count<<endl;
    return 0;
}


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

#include<iostream>
using namespace std;
int main (){
	int n, x;
	while(1){
	    cin>>n>>x;
		if(n == 0 && x == 0)break;
		int count = 0;
		for(int i = 1; i <= n; i++){
			for(int j = i + 1; j <= n; j++){
				for(int k = j + 1; k <= n; k++){
					if(i + j + k == m) count ++;
				}
			}
		}
		
		cout << count << endl;
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:12:57: error: 'm' was not declared in this scope
   12 |                                         if(i + j + k == m) count ++;
      |                                                         ^
Language: C++

#include<iostream>
using namespace std;

int main(){
    int n, x;
    int count =0;
    
    while(1){
        
        cin >> n >> x;
        
        if(n=0 && x=0) break;
        
        for(int i=1; i<n-2; i++){
            for(int j=2; j<n-1; j++){
                for(int k=3; k<n; k++){
                    if(i+j+k == x){
                        count++;
                    }else{
                        continue;
                    }
                }
            }
        }
        cout << count << endl;
        
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: lvalue required as left operand of assignment
   12 |         if(n=0 && x=0) break;
      |              ~~^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
    
    int n, x;
    int count = 0;
    
    while(1){
        cin >> n >> x;
        if(n==0 && x==0) break;
        for(int i=1; i<n; i+=1){
            for(int j=1; j<n; j+=1){
                for(int k=1; k<n; k+=1){
                    if(i+j+k = x){
                        if(i!=j && j!=k) count += 1;
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:27: error: lvalue required as left operand of assignment
   15 |                     if(i+j+k = x){
      |                        ~~~^~
Language: C++

#include<iostream>
using namespace std;

int main(){
    
    int n, x;
    int count = 0;
    
    while(1){
        cin >> n >> x;
        if((n==0) && (x==0)) break;
        for(int i=1; i<n; i+=1){
            for(int j=1; j<n; j+=1){
                for(int k=1; k<n; k+=1){
                    if((i+j+k) = x){
                        if((i!=j) && (j!=k)) count += 1;
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:28: error: lvalue required as left operand of assignment
   15 |                     if((i+j+k) = x){
      |                        ~~~~^~~
Language: C++

#include<iostream>
using namespace std;

int count(int n, int x){
    int cnt=0;
    for(int i=1; i<=n-2; i++){
        for(int j=i+1; j<=n-1; j++){
            for(int k=j+1; k<=n; k++){
                if(i+j+k==x) cnt++
            }
        }
    }
    
    return cnt;
}

int main(){
    int n,x;
    while(1){
        cin>>n>>x;
        if(n==0&&x==0) break;
    }
    
    cout<<count(n,x);
    
    return 0;
}


Compiler output:
a.cc: In function 'int count(int, int)':
a.cc:9:35: error: expected ';' before '}' token
    9 |                 if(i+j+k==x) cnt++
      |                                   ^
      |                                   ;
   10 |             }
      |             ~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,x;
    while(1){
    cin>>n>>x;
    int y=0;
    if(n ==0&&x==0){
        break;
    }
    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            for(int k=0;k<n;k++){
                if(i+j+k=x){
                    y++;
                }
            }
        }
    }
    cout<<y<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:23: error: lvalue required as left operand of assignment
   14 |                 if(i+j+k=x){
      |                    ~~~^~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,x;
    while(1){
    cin>>n>>x;
        int y=0;
        if(n ==0&&x==0){
            break;
        }
        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                for(int k=0;k<n;k++){
                    if(i+j+k=x){
                        y++;
                    }
                }
            }
        }
        cout<<y<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: lvalue required as left operand of assignment
   14 |                     if(i+j+k=x){
      |                        ~~~^~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int n, x, c;
    while(true){
		cin >> n >> x;
		if ((n | x) = 0)
			break;
        c = 0;
		for(int i=1;i<n-1;++i){
			for(int j=2;j<n;++j){
				for(int k=3;k<n+1;++k){
					if(i<j&&j<k&&i+j+k==x)
						c++;
				}
			}
		}
		cout<<c<<endl;
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: lvalue required as left operand of assignment
    7 |                 if ((n | x) = 0)
      |                     ~~~^~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int n, x, c;
    while(true){
		cin >> n >> x;
		if ((n | x) = 0)
			break;
        c = 0;
		for(int i=1;i<n-1;++i){
			for(int j=2;j<n;++j){
				for(int k=3;k<n+1;++k){
					if(i<j&&j<k&&i+j+k==x)
						c++;
				}
			}
		}
		cout<<c<<endl;
    }
    return 0
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: lvalue required as left operand of assignment
    7 |                 if ((n | x) = 0)
      |                     ~~~^~~~
a.cc:20:13: error: expected ';' before '}' token
   20 |     return 0
      |             ^
      |             ;
   21 | }
      | ~
Language: C++

#include <iostream>
using namespace std;
int main(){
    int n, x, c;
    while(true){
		cin >> n >> x;
		if ((n | x) == 0)
			break;
        c = 0;
		for(int i=1;i<n-1;++i){
			for(int j=2;j<n;++j){
				for(int k=3;k<n+1;++k){
					if(i<j&&j<k&&i+j+k==x)
						c++;
				}
			}
		}
		cout<<c<<endl;
    }
    return 0
}



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

#include<iostream>
using namespace std;
int main() {
    
    int n,x,count;
    
    while(1) {
        
        cin >> n >> x;
        
        if ((n == 0) && (x == 0)) break;
        
        for (i = 1, i <= n, i ++) {
            for (j = 1, j <= n, j ++) {
                for (k = 1, k <= n, k ++) {
                    
                    if (i + j + k == x) {
                        
                        if ((i < j) && (j < k)) {
                            
                            count += 1;
                            
                        }
                        
                    }
                
                }
            }
        }
        
    }
    
    cout << count << endl;
    
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:14: error: 'i' was not declared in this scope
   13 |         for (i = 1, i <= n, i ++) {
      |              ^
a.cc:31:5: error: expected primary-expression before '}' token
   31 |     }
      |     ^
a.cc:29:10: error: expected ';' before '}' token
   29 |         }
      |          ^
      |          ;
   30 | 
   31 |     }
      |     ~     
a.cc:31:5: error: expected primary-expression before '}' token
   31 |     }
      |     ^
a.cc:29:10: error: expected ')' before '}' token
   29 |         }
      |          ^
      |          )
   30 | 
   31 |     }
      |     ~     
a.cc:13:13: note: to match this '('
   13 |         for (i = 1, i <= n, i ++) {
      |             ^
a.cc:31:5: error: expected primary-expression before '}' token
   31 |     }
      |     ^
Language: C++

#include<iostream>
using namespace std;
int main() {
    
    int n,x,count;
    
    while(1) {
        
        cin >> n >> x;
        
        if ((n == 0) && (x == 0)) break;
        
        for (int i = 1, i <= n, i ++) {
            for (int j = 1, j <= n, j ++) {
                for (int k = 1, k <= n, k ++) {
                    
                    if (i + j + k == x) {
                        
                        if ((i < j) && (j < k)) {
                            
                            count += 1;
                            
                        }
                        
                    }
                
                }
            }
        }
        
    }
    
    cout << count << endl;
    
    return 0;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:26: error: expected ';' before '<=' token
   13 |         for (int i = 1, i <= n, i ++) {
      |                          ^~~
      |                          ;
a.cc:13:27: error: expected primary-expression before '<=' token
   13 |         for (int i = 1, i <= n, i ++) {
      |                           ^~
a.cc:13:37: error: expected ';' before ')' token
   13 |         for (int i = 1, i <= n, i ++) {
      |                                     ^
      |                                     ;
a.cc:14:30: error: expected ';' before '<=' token
   14 |             for (int j = 1, j <= n, j ++) {
      |                              ^~~
      |                              ;
a.cc:14:31: error: expected primary-expression before '<=' token
   14 |             for (int j = 1, j <= n, j ++) {
      |                               ^~
a.cc:14:41: error: expected ';' before ')' token
   14 |             for (int j = 1, j <= n, j ++) {
      |                                         ^
      |                                         ;
a.cc:15:34: error: expected ';' before '<=' token
   15 |                 for (int k = 1, k <= n, k ++) {
      |                                  ^~~
      |                                  ;
a.cc:15:35: error: expected primary-expression before '<=' token
   15 |                 for (int k = 1, k <= n, k ++) {
      |                                   ^~
a.cc:15:45: error: expected ';' before ')' token
   15 |                 for (int k = 1, k <= n, k ++) {
      |                                             ^
      |                                             ;
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,m,c;
    c=0;
    cin>>n>>m;
    for(int x=1;x<=n-2;x++){
        for(int y=x+1;y<=n-1;y++){
            for(int z=y+1;y<=n;z++){
                if(x+y+z==m){
                    c++
                    cout<<c<<endl;
                }
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 'cout'
   11 |                     c++
      |                        ^
      |                        ;
   12 |                     cout<<c<<endl;
      |                     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,m,c;
    c=0;
    cin>>n>>m;
    for(int x=1;x<=n-2;x++){
        for(int y=x+1;y<=n-1;y++){
            for(int z=y+1;y<=n;z++){
                if(x+y+z==m){
                    c++
                    cout << c << endl;
                }
            }
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:24: error: expected ';' before 'cout'
   11 |                     c++
      |                        ^
      |                        ;
   12 |                     cout << c << endl;
      |                     ~~~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int n,m,c;
    c=0;
    while(1){
        if(n==0 && m==0) break;
        cin>>n>>m;
        for(int x=1;x<=n-2;x++){
            for(int y=x+1;y<=n-1;y++){
                for(int z=y+1;y<=n;z++){
                    if(x+y+z==m){
                        c++;
                        cout << c << endl;
                }
            }
        }
    }
    return 0;
}


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

#include<iostream>
using namespace std;
int main(){
    int n,m,c;
    c=0;
    while(1){
        cin>>n>>m;
        if(n==0 && m==0) break;
        else {
            for(int x=1;x<=n-2;x++){
                for(int y=x+1;y<=n-1;y++){
                    for(int z=y+1;y<=n;z++){
                        if(x+y+z==m){
                            c++;
                            cout << c << endl;
                        }
                    }
                }
            }
        }
    return 0;
}


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

int main(){
    int n,x,t;
    while(1){
        cin>>n>>x;
        t=0;
        if (n==0&&x==0) break;
        else{
            for (int a=1;a<=n;a++){
                if (a==n-1) break;
                else for (int b=a+1;b<=n;b++){
                    if (b==n) break;
                    else for (int c=b+1;c<=n;c++){
                        if (a+b+c==x) t+=1; 
                    }
                }
            }
        }
        cout<<t<<endl;
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin>>n>>x;
      |         ^~~
a.cc:18:9: error: 'cout' was not declared in this scope
   18 |         cout<<t<<endl;
      |         ^~~~
a.cc:18:18: error: 'endl' was not declared in this scope
   18 |         cout<<t<<endl;
      |                  ^~~~
Language: C++

#include<iostream>

using namespace std;

int main() {
    int n, x, i, j, k;
    while(cin >> n >> x, n||x){
        ans = 0;
        for (i=1;i<=n;i++){
            for(j=i+1;j<=n;j++){
                for(k=j+1;k<=n;k++){
                    if(i+j+k == x)
                        ans++;
                }
            }
        }
        cout << ans << endl;
    }
}

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

#include<iostream>
 
using namespace std;
 
int main(){int main()
{
        int n, x;
		int count=0;
 
        while(cin>>n>>x){
                if(n==0 && x==0)
					break;
                for(int i=1;i<=n;i++){
                        for(int j=i+1;j<=n;j++){
                                for(int k=j+1;k<=n;k++){
                                        if(i+j+k==x)
											count++;
                                }
                        }
                }
                cout<<count<<endl;
        }
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:20: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
    5 | int main(){int main()
      |                    ^~
a.cc:5:20: note: remove parentheses to default-initialize a variable
    5 | int main(){int main()
      |                    ^~
      |                    --
a.cc:5:20: note: or replace parentheses with braces to value-initialize a variable
a.cc:6:1: error: a function-definition is not allowed here before '{' token
    6 | {
      | ^
a.cc:24:2: error: expected '}' at end of input
   24 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){int main()
      |           ^
Language: C++

#include <iostream>
using namespace std;

int main(){
 int n, x, c = 0;

 for (int i = 1, i < n - 1; i++) {
  for (int j = 2, j < n; j++) {
   for (int k = 3, k <= n; k++) {
    if (x == i + j + k) c++;
   }
  }
 }

 cout << c << endl;

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:19: error: expected ';' before '<' token
    7 |  for (int i = 1, i < n - 1; i++) {
      |                   ^~
      |                   ;
a.cc:7:20: error: expected primary-expression before '<' token
    7 |  for (int i = 1, i < n - 1; i++) {
      |                    ^
a.cc:8:20: error: expected ';' before '<' token
    8 |   for (int j = 2, j < n; j++) {
      |                    ^~
      |                    ;
a.cc:8:21: error: expected primary-expression before '<' token
    8 |   for (int j = 2, j < n; j++) {
      |                     ^
a.cc:9:21: error: expected ';' before '<=' token
    9 |    for (int k = 3, k <= n; k++) {
      |                     ^~~
      |                     ;
a.cc:9:22: error: expected primary-expression before '<=' token
    9 |    for (int k = 3, k <= n; k++) {
      |                      ^~
Language: C++

#include <iostream>
using namespace std;

int main(){
 int n, x, c = 0;

 while(x) {
 for (int i = 1; i < n - 1; i++) {
  for (int j = 2; j < n; j++) {
   for (int k = 3; k <= n; k++) {
    if (x == i + j + k) c++;
   }
  }
 }

 cout << c << endl;

 return 0;
}

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


int main(){

 int n, x, c;

 while(x) {
  cin >> n >> x;
  if (n == 0 && x == 0) break;

  c = 0;

  for (int i = 1; i < n - 1; i++) {
   for (int j = i + 1; j < n; j++) {
    for (int k = j + 1; k <= n; k++) {
     if (x == i + j + k) c++;
    }
   }
  }

  cout << c << endl;
 }
 
 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   cin >> n >> x;
      |   ^~~
a.cc:20:3: error: 'cout' was not declared in this scope
   20 |   cout << c << endl;
      |   ^~~~
a.cc:20:16: error: 'endl' was not declared in this scope
   20 |   cout << c << endl;
      |                ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int a,b;
  whle(cin>>a>>b,a||b){
    int co=0;
    loop(i,1,a+1)
      loop(j,1,a+1)
      loop(k,1,a+1)if(a+b+c==b)co++;
    cout<<co<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:3: error: 'whle' was not declared in this scope
   21 |   whle(cin>>a>>b,a||b){
      |   ^~~~
Language: C++

#include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int a,b;
  while(cin>>a>>b,a||b){
    int co=0;
    loop(i,1,a+1)
      loop(j,1,a+1)
      loop(k,1,a+1)if(a+b+c==b)co++;
    cout<<co<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:25:27: error: 'c' was not declared in this scope
   25 |       loop(k,1,a+1)if(a+b+c==b)co++;
      |                           ^
Language: C++

#include<stdio.h>

int main()
{
int x,n,cou;
cou=0;
while(1)
{
scanf("%d",&n);scanf("%d",&x);
if(x==0&&n==0)break;
for(int i=1;i<=n-2;i++)
for(int j=2;j<=n-1;j++)
for(int k=3;k<=n-3;k++)
if(i+j+k==x)cou++;

printf("%d\n",cou);
return 0;
}

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

#include<iostream>
using namespace std;

int main(){
	int n, x;
	int sum = 0
	cin >> n >> x;
	for(int i = 1; i < n; i++){
		for(int j = 1; j < n; j++){
			for(int k = 1; k < n; k++){
				if(i + j + k == x) sum += 1;
			}
		}
	}
	cout << sum << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: expected ',' or ';' before 'cin'
    7 |         cin >> n >> x;
      |         ^~~
Language: C++

#include<iostream>
using namespace std;

int count(int n, int x){
	int sum = 0;
	for(int i = 3; i <=  n - 2; i++){
		for(int j =  2; j < i; j++){
			for(int k = 1; k < j; k++){
				if(i + j + k == x) sum++;
			}
		}
	}
	
	return sum;
}

int main(){
	int n, x;
	while(1){
		cin >> n >> x;
		if(n == 0 && x == 0) break;
		cout << sum << endl;
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:25: error: 'sum' was not declared in this scope
   22 |                 cout << sum << endl;
      |                         ^~~
Language: C++

#include <iostream>
#include <iomanip>
#include <algorithm>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cstring>
#include <map>
using namespace std;
 
int main()
{
  cout << setprecision(6);
  cout << setiosflags(ios::scientific);
  cout.flags(ios::fixed);
 
  while(true)
    {
      int n,x;
      cin >> n >> x;
 
      if(n==0 && x==0)
    break;
 
      int count=0;
      for(int i=1; i<=n; i++){
    for(int j=i+1; j<=n; j++){
      for(int k=j+1; k<=n; k++){
        if(i+j+k==x)
          count++;
      }
    }
      }
 
 
      cout << count <<  endl;
    }
 
  }

Compile Error Logs:
You are not authorized to see the message.

Status
Judge: 4/4	 C++	 CPU: 00.00 sec	 Memory: 1160 KB	 Length: 576 B	 2013-01-15 01:01	 2013-01-15 01:01
Results for testcases
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1:	: Accepted	00.00 sec	1160 KB	8 B	2 B	test_case_1
Case #2:	: Accepted	00.00 sec	1160 KB	28 B	10 B	test_case_2
Case #3:	: Accepted	00.00 sec	1160 KB	85 B	36 B	test_case_3
Case #4:	: Accepted	00.00 sec	1160 KB	297 B	163 B	test_case_4

< prev |	1	 /	4	| next >	 		 : Accepted        00.00 sec        1160 KB
 
Judge Input #1 ( in1.txt | 8 B)		Judge Output #1 ( out1.txt | 2 B)
5 9
0 0
2
Comments
 
 Under Construction.
 
Categories
 
 
Free Tags
 
 

Compiler output:
a.cc:47:6: error: stray '#' in program
   47 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
a.cc:48:6: error: stray '#' in program
   48 | Case #1:        : Accepted      00.00 sec       1160 KB 8 B     2 B     test_case_1
      |      ^
a.cc:49:6: error: stray '#' in program
   49 | Case #2:        : Accepted      00.00 sec       1160 KB 28 B    10 B    test_case_2
      |      ^
a.cc:50:6: error: stray '#' in program
   50 | Case #3:        : Accepted      00.00 sec       1160 KB 85 B    36 B    test_case_3
      |      ^
a.cc:51:6: error: stray '#' in program
   51 | Case #4:        : Accepted      00.00 sec       1160 KB 297 B   163 B   test_case_4
      |      ^
a.cc:55:13: error: stray '#' in program
   55 | Judge Input #1 ( in1.txt | 8 B)         Judge Output #1 ( out1.txt | 2 B)
      |             ^
a.cc:55:54: error: stray '#' in program
   55 | Judge Input #1 ( in1.txt | 8 B)         Judge Output #1 ( out1.txt | 2 B)
      |                                                      ^
a.cc:41:1: error: 'Compile' does not name a type
   41 | Compile Error Logs:
      | ^~~~~~~
Language: C++

#include <iostream>
using namespace std;
int main(){
int n,x;
int a=0;
while(1){
cin>>n>>x;
if(n==0&&x==0){
break;
}
for(int i=1;i<=n;i++){
 for(int j=i+1;j<=n;j++){
   for(int k=j+1;k<=n;k++){
      if(i+j+k=x){
           a++;
        }
  }
}
cout<<a<<endl;
}
return 0;
}

 

Compiler output:
a.cc: In function 'int main()':
a.cc:14:13: error: lvalue required as left operand of assignment
   14 |       if(i+j+k=x){
      |          ~~~^~
a.cc:22:2: error: expected '}' at end of input
   22 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^