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

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt() + 1;
            if (n < 990) {
                System.out.println((n * (n + 1) * (n + 2)) / 6);
            } else {
                n--;
                n=n>2000?4000-n:n;
                int a=1;
                int b=3;
                int c=3;
                for(int i=0;i<n;i++){
                    a+=b;
                    b+=c;
                    if(i<998){
                        c++;
                    }else{
                        c-=3;
                    }
                }
                System.out.println(a);
            }
        }
    }
}



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

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

typedef long long lli;

int main() {
  lli n;
  while(cin >> n) {
    int ans = 0;
    for(lli a = 0; a <= n; ++a) {
      for(lli b = 0; a+b <= n; ++b) {
        ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: no matching function for call to 'max(int, lli)'
   13 |         ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      |                                     ~~~^~~~~~~~~~~~~~~~~
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:13:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'lli' {aka 'long long int'})
   13 |         ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      |                                     ~~~^~~~~~~~~~~~~~~~~
/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:13:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |         ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      |                                     ~~~^~~~~~~~~~~~~~~~~
Language: C++

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

typedef long long lli;

int main() {
  lli n;
  while(cin >> n) {
    lli ans = 0;
    for(lli a = 0; a <= n; ++a) {
      for(lli b = 0; a+b <= n; ++b) {
        ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      }
    }
    cout << ans << endl;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: no matching function for call to 'max(int, lli)'
   13 |         ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      |                                     ~~~^~~~~~~~~~~~~~~~~
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:13:40: note:   deduced conflicting types for parameter 'const _Tp' ('int' and 'lli' {aka 'long long int'})
   13 |         ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      |                                     ~~~^~~~~~~~~~~~~~~~~
/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:13:40: note:   mismatched types 'std::initializer_list<_Tp>' and 'int'
   13 |         ans += min(1000LL, n-a-b) - max(0, n-1000LL-a-b) + 1;
      |                                     ~~~^~~~~~~~~~~~~~~~~
Language: C++

#include <iostream>
using namespace std;

int memo[4][4001];

int rec(int idx, int left)
{
	if(idx == 3) return (left <= 1000 ? 1 : 0);
	if(memo[idx][left] != -1) return memo[idx][left];

	int ans = 0;
	for(int i=0; i <= min(1000, left); i++){
		ans += rec(idx+1, left - i);
	}

	return ans;
}

int main()
{
	for(int n = 0; cin >> n; ){
		memset(memo, -1, sizeof memo);
		cout << rec(0, n) << endl;
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:17: error: 'memset' was not declared in this scope
   22 |                 memset(memo, -1, sizeof memo);
      |                 ^~~~~~
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>
long long dp[5][4001];
int main(){
	dp[0][0]=1;
	for(int i=0;i<4;i++)
		for(int j=0;j<=4000;j++){
			if(dp[i][j]){
				for(int k=0;k<=1000;k++)dp[i+1][j+k]+=dp[i][j];
			}
		}
	while(~scanf("%d",&a))
	for(int i=0;i<a;i++){
		int b;
		scanf("%d",&b);
		printf("%lld\n",dp[4][b]);
	}}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: 'a' was not declared in this scope
   11 |         while(~scanf("%d",&a))
      |                            ^
a.cc: At global scope:
a.cc:17:1: error: expected declaration before '}' token
   17 | }
      | ^
Language: C++

#include<stdio.h>
long long dp[5][4001];
int main(){
	dp[0][0]=1;
	for(int i=0;i<4;i++)
		for(int j=0;j<=4000;j++){
			if(dp[i][j]){
				for(int k=0;k<=1000;k++)dp[i+1][j+k]+=dp[i][j];
			}
		}
	while(~scanf("%d",&a)){
	for(int i=0;i<a;i++){
		int b;
		scanf("%d",&b);
		printf("%lld\n",dp[4][b]);
	}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:28: error: 'a' was not declared in this scope
   11 |         while(~scanf("%d",&a)){
      |                            ^
Language: C++

T = 1000
def f(x):
    return max(0, T + 1 - abs(T - x))
while True:
    try:
        n = input() 
    except EOFError:
        break
    cnt = 0
    for i in range(n):
        cnt += f(i) * f(n-i)
    print cnt

#O(n), 

Compiler output:
a.cc:14:2: error: invalid preprocessing directive #O
   14 | #O(n),
      |  ^
a.cc:1:1: error: 'T' does not name a type
    1 | T = 1000
      | ^
Language: C++

main(m,n){for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
n=n>36?0:n>18?38-n:n+2,m=n>11?n-10:0;}

Compiler output:
a.cc:1:5: error: expected constructor, destructor, or type conversion before '(' token
    1 | main(m,n){for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
      |     ^
Language: C++

main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
n=n>36?0:n>18?38-n:n+2,m=n>11?n-10:0;}

Compiler output:
a.cc:1:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    1 | main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
      | ^~~~
a.cc: In function 'int main()':
a.cc:1:22: error: 'scanf' was not declared in this scope
    1 | main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
      |                      ^~~~~
a.cc:1:37: error: 'printf' was not declared in this scope
    1 | main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
      |                                     ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | main(){int m,n;for(;~scanf("%d",&n);printf("%d\n",(n*n*n-n-4*m*m*m+4*m)/6))
Language: C++

#include <stdio.h>

long N(long x){
  return (x+1)*(x+2)*(x+3)/6;
}

int main(){
  long n;
  while(~scanf("%ld",&n)){
    if (n > 2000)　n = 4000 - n;
    if (n < 1001) printf("%d\n",N(n));
    else printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
    }
  }
  return 0;
}

Compiler output:
a.cc:10:18: error: extended character 　 is not valid in an identifier
   10 |     if (n > 2000)　n = 4000 - n;
      |                  ^
a.cc: In function 'int main()':
a.cc:10:18: error: '\U00003000n' was not declared in this scope
   10 |     if (n > 2000)　n = 4000 - n;
      |                  ^~~
a.cc:12:55: error: expected ')' before ';' token
   12 |     else printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
      |                ~                                      ^
      |                                                       )
a.cc: At global scope:
a.cc:15:3: error: expected unqualified-id before 'return'
   15 |   return 0;
      |   ^~~~~~
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include <stdio.h>

long N(long x){
  return (x+1)*(x+2)*(x+3)/6;
}

int main(){
  long n;
  while(~scanf("%ld",&n)){
    if (n > 2000)　n = 4000 - n;
    if (n < 1001) printf("%d\n",N(n));
    else printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
  }
  return 0;
}

Compiler output:
a.cc:10:18: error: extended character 　 is not valid in an identifier
   10 |     if (n > 2000)　n = 4000 - n;
      |                  ^
a.cc: In function 'int main()':
a.cc:10:18: error: '\U00003000n' was not declared in this scope
   10 |     if (n > 2000)　n = 4000 - n;
      |                  ^~~
a.cc:12:55: error: expected ')' before ';' token
   12 |     else printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
      |                ~                                      ^
      |                                                       )
Language: C++

#include <stdio.h>

long N(long x){
  return (x+1)*(x+2)*(x+3)/6;
}

int main(){
  long n;
  while(~scanf("%ld",&n)){
    if (n > 2000)
      　n = 4000 - n;
    if (n < 1001)
        printf("%d\n",N(n));
    else
        printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
  }
  return 0;
}

Compiler output:
a.cc:11:7: error: extended character 　 is not valid in an identifier
   11 |       　n = 4000 - n;
      |       ^
a.cc: In function 'int main()':
a.cc:11:7: error: '\U00003000n' was not declared in this scope
   11 |       　n = 4000 - n;
      |       ^~~
a.cc:15:54: error: expected ')' before ';' token
   15 |         printf("%ld\n", N(n)-(N(2*(n-1000)-n-1001)/2);
      |               ~                                      ^
      |                                                      )
Language: C++

#include <iostream>
using namespace std;

int main() {

  long long int n;
  while( cin >> n ) {
    long long int ans = (n+3)*(n+2)*(n+1)/3/2/1;
    if ( n > 1000 ) {
      ans -= (n-1000+3)*(n-1000+2)*(n-1000+1)/3/2/1*4;
    }
    cout <<  << endl;
  }

  return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:14: error: expected primary-expression before '<<' token
   12 |     cout <<  << endl;
      |              ^~
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 0 から 100 の数字から異なる n 個の数を取り出して合計が s となる組み合わせの数を出力する
 * n 個の数はおのおの 0 から 100 までとし、１つの組み合わせに同じ数字は使えません。
 * @author sugawara-a2
 *
 */

public class main
{

  final private static int LIMIT = 100;

  public static void main(String[] args) throws NumberFormatException, IOException
  {
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

    while (input.ready())
    {
      String[] INPUT_STR = input.readLine().split(" ");
      int numCount = Integer.valueOf(INPUT_STR[0]);
      int sumNumber = Integer.valueOf(INPUT_STR[1]);

      if (numCount == 0 && sumNumber == 0)
      {
        break;
      }

      long ans = solver(numCount, sumNumber);
      System.out.println(ans);
    }
  }

  private static long solver(int numCount, int sumNumber)
  {
    // n個（numCount）の重複しない0以上の整数を足し合わせた際の最小値が
    // sumNumberより大きい場合は組合せなし
    if (sumNumber < sumUp(numCount - 1))
    {
      return 0;
    }

    // n個（numCount）の重複しないLIMIT以下の整数を足し合わせた際の最大値が
    // sumNumberより小さい場合は組合せなし
    if ((LIMIT * numCount) - sumUp(numCount - 1) < sumNumber)
    {
      return 0;
    }

    // n個(numCount)の重複しない0以上の整数を足し合わせた際の最小値をsumNumberから除算した値とLIMITを比較し小さい値を開始数にする
    int startIndex = Math.min(LIMIT, sumNumber - sumUp(numCount - 1));
    sumNumber = sumNumber - sumUp(numCount - 1);
    return solver(numCount, sumNumber, 0, startIndex);
  }

  private static long solver(int numCount, int sumNumber, int currentSum, int startIndex)
  {
    long ret = 0;
    for (int i = numCount; i > 0; i--)
    {
      startIndex = startIndex / 2;
      ret += startIndex;
    }
    return ret;
  }

  private static int sumUp(int num)
  {
    // ZeroOrigin
    num--;
    return (int) ((int) (num + 1) * num * 0.5);
  }
}



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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 0 から 100 の数字から異なる n 個の数を取り出して合計が s となる組み合わせの数を出力する
 * n 個の数はおのおの 0 から 100 までとし、１つの組み合わせに同じ数字は使えません。
 * @author sugawara-a2
 *
 */

public class AOJ_0097
{

  final private static int LIMIT = 100;

  public static void main(String[] args) throws NumberFormatException, IOException
  {
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

    while (input.ready())
    {
      String[] INPUT_STR = input.readLine().split(" ");
      int numCount = Integer.valueOf(INPUT_STR[0]);
      int sumNumber = Integer.valueOf(INPUT_STR[1]);

      if (numCount == 0 && sumNumber == 0)
      {
        break;
      }

      long ans = solver(numCount, sumNumber);
      System.out.println(ans);
    }
  }

  private static long solver(int numCount, int sumNumber)
  {
    // n個（numCount）の重複しない0以上の整数を足し合わせた際の最小値が
    // sumNumberより大きい場合は組合せなし
    if (sumNumber < sumUp(numCount - 1))
    {
      return 0;
    }

    // n個（numCount）の重複しないLIMIT以下の整数を足し合わせた際の最大値が
    // sumNumberより小さい場合は組合せなし
    if (((LIMIT * numCount) - sumUp(numCount - 1)) < sumNumber)
    {
      return 0;
    }

    return solver2(numCount, sumNumber);
  }

  private static long solver2(int numCount, int sumNumber)
  {
    int ret = 1;
    int newSumNumber = sumNumber - sumUp(numCount-1);
    for (int i = 2; i <= numCount; i++)
    {
      ret +=newSumNumber / numCount;
    }
    return ret;
  }

  private static int sumUp(int num)
  {
    return (int) ((int) (num + 1) * num * 0.5);
  }
}



Compiler output:
Main.java:12: error: class AOJ_0097 is public, should be declared in a file named AOJ_0097.java
public class AOJ_0097
       ^
1 error
Language: Java

import java.util.*;

public class main {

	public static void Main(String[] args) {
		int n,s,max,count;
		
		count = 0;
		n=9;
		max=100;
		s=200;
		Scanner sc = new Scanner(System.in);
		
		for(;;){
		
			n = sc.nextInt();
			s = sc.nextInt();
		
			if(n==0&&s==0)break;
				
			count = check(n,s,max);
		
			System.out.println(count);
		}
	}

	private static int check(int n, int s,int max) {
		int count = 0;
		
		if(s<max) max=s;
		
		for(;max>=0;max--){
		if(n>1)			count += check(n-1,s-max,max-1);
		else if(s==max) 	return 1;
		else			return 0;
		}
		
		return count;
	}

}

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

import import java.util.*;

public class Main {

	public static void main(String[] args) {
		int n,s,max,count;
		
		count = 0;
		n=9;
		max=100;
		s=200;
		Scanner sc = new Scanner(System.in);
		
		for(;;){
		
			n = sc.nextInt();
			s = sc.nextInt();
		
			if(n==0&&s==0)break;
				
			count = check(n,s,max);
		
			System.out.println(count);
		}
	}

	private static int check(int n, int s,int max) {
		int count = 0;
		
		if(s<max) max=s;
		
		for(;max>=0;max--){
		if(n>1  && (s-max) <= n*max)			count += check(n-1,s-max,max-1);
		else if(n==1 && s==max) 	return 1;
		else if(n==1)				return 0;
		}
		
		return count;
	}

}

Compiler output:
Main.java:1: error: <identifier> expected
import import java.util.*;
      ^
1 error
Language: Java

import java.util.*;

public class main {

	public static void main(String[] args) {
		int n,s,max,count;
		
		count = 0;
		n=9;
		max=100;
		s=200;
		Scanner sc = new Scanner(System.in);
		
		for(;;){
		
			n = sc.nextInt();
			s = sc.nextInt();
		
			if(n==0&&s==0)break;
				
			count = check(n,s,max);
		
			System.out.println(count);
		}
	}

	private static int check(int n, int s,int max) {
		int count = 0;
		
		if(s<max) max=s;
		
		for(;max>=0;max--){
		if(n>1  && (s-max) <= n*(max-1))			count += check(n-1,s-max,max-1);
		else if(n==1 && s==max) 	return 1;
		else if(n==1)				return 0;
		}
		
		return count;
	}

}

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

import java.util.*;

public class main {

	public static void Main(String[] args) {
		int n,s,max,count;
		
		count = 0;
		n=9;
		max=100;
		s=200;
		Scanner sc = new Scanner(System.in);
		
		for(;;){
		
			n = sc.nextInt();
			s = sc.nextInt();
		
			if(n==0&&s==0)break;
			if(s>864) s=864;
			
			count = check(n,s,max);
		
			System.out.println(count);
		}
	}

	private static int check(int n, int s,int max) {
		int count = 0;
		
		if(s<max) max=s;
		
		if(n==1 && s==max) 	return 1;
		else if(n==1)		return 0;
		
		for(;max>=0;max--)
			if(n>1  && (s-max) <= (n-1)*(max-1))			count += check(n-1,s-max,max-1);
		
		
		return count;
	}

}

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

import java.util.Scanner;

//Sum of Integers II
public class AOJ0097 {

	void run(){
		Scanner sc = new Scanner(System.in);
		long[] dp = new long[2001];
		for(int i=0;i<=1000;i++)for(int j=0;j<=1000;j++)dp[i+j]++;
		while(sc.hasNext()){
			int N = sc.nextInt();
			long res = 0;
			for(int s=0;s<=2000;s++)if(0 <= N-s && N-s <= 2000)res+=dp[s]*dp[N-s];
			System.out.println(res);
		}
	}
	
	public static void main(String[] args) {
		new AOJ0097().run();
	}
}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args)throws IOException{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader reader = new BufferedReader(isr);
		String string;
		
		long res[][] = new long[11][1001], n , s;
		res[0][0] = 1;
		for(int i = 0; i <= 100; i++){
			for(int j = 9; j >= 0; j--){
				for(int k = 0; k + i <= 1000; k++){
					res[j + 1][i + k] += res[j][k];
				}
			}
		}
		
		while(!(string = reader.readLine()).equals("0 0")){
			n = Integer.valueOf(string.split(" ")[0]);
			s = Integer.valueOf(string.split(" ")[1]);
			
			System.out.println(res[n][s]);
		}
		reader.close();
	}
}

Compiler output:
Main.java:25: error: incompatible types: possible lossy conversion from long to int
			System.out.println(res[n][s]);
			                       ^
Main.java:25: error: incompatible types: possible lossy conversion from long to int
			System.out.println(res[n][s]);
			                          ^
2 errors
Language: Java

import java.util.Scanner;

//Sum of Integers II
public class Main {

	long[][][] dp;
	
	long get(int rest, int x, int s){
		if(rest==0 && s==0)return 1;
		if(rest<0 || x<0 || s<0)return 0;
		if(dp[rest][x][s]!=-1)return dp[rest][x][s];
		long res = 0;
		for(int nx=x;nx>=0;nx--)res+=get(rest-1, nx-1, s-nx);
		return dp[rest][x][s] = res;
	}
	
	void run(){
		Scanner sc = new Scanner(System.in);
		dp = new long[10][101][1001];
		for(int i=0;i<10;i++)for(int j=0;j<=100;j++)for(int k=0;k<=1000;k++)dp[i][j][k]=-1;
		for(;;){
			int n = sc.nextInt(), S = sc.nextInt();
			if((n|S)==0)break;
			System.out.println(get(n, 100, S));
		}
	}
	
	public static void main(String[] args) {
		new AOJ0097().run();
	}
}

Compiler output:
Main.java:29: error: cannot find symbol
		new AOJ0097().run();
		    ^
  symbol:   class AOJ0097
  location: class Main
1 error
Language: Java

public class Main {

	public static void main(String[] args){
		
	    int[][] allData = new int[10][1001];

	    allData[0][0] = 1;

	    for (int iRang = 0; iRang <= 100; iRang++){
	        for (int iSum = 1000; iSum >= 0; iSum--){
	            for (int item = 9; item >= 1; item--){
	                if (iSum - iRang >= 0) allData[item][iSum] += allData[item - 1][iSum - iRang];
	            }
	        }
	    }

	    Scanner input = new Scanner(System.in);
	    while (input.hasNext()){
	    	String[] nAnds = input.nextLine().split(" ");
	    	int valueN = Integer.parseInt(nAnds[0]);
	    	int valueS = Integer.parseInt(nAnds[1]);
	    	
	        System.out.printf("%d\n", allData[valueN][valueS]);
	    }

	    input.close();
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
	    Scanner input = new Scanner(System.in);
	    ^
  symbol:   class Scanner
  location: class Main
Main.java:17: error: cannot find symbol
	    Scanner input = new Scanner(System.in);
	                        ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class AOJ_0097
{

  final private static int LIMIT = 100;

  public static void main(String[] args) throws NumberFormatException, IOException
  {
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

    while (input.ready())
    {
      String[] INPUT_STR = input.readLine().split(" ");
      int numCount = Integer.valueOf(INPUT_STR[0]);
      int sumNumber = Integer.valueOf(INPUT_STR[1]);

      if (numCount == 0 && sumNumber == 0)
      {
        break;
      }

      long ans = solver(numCount, sumNumber);
      System.out.println(ans);
    }
  }

  private static long solver(int numCount, int sumNumber)
  {
    int startIndex = Math.min(LIMIT, sumNumber - sumUp(numCount - 1));
    return solver(numCount, sumNumber, 0, startIndex);
  }

  private static long solver(int numCount, int sumNumber, int currentSum, int startIndex)
  {
    long ret = 0;

    int currentLimit = sumNumber - currentSum;

    if (numCount == 1)
    {
      if (currentLimit <= startIndex)
      {
        return 1;
      }
      return 0;
    }
    else
    {
      int i = startIndex;
      while (true)
      {
        int nextStartIndex = sumNumber - (currentSum + i);
        if (nextStartIndex >= i)
        {
          nextStartIndex = i - 1;
        }
        ret += solver(numCount - 1, sumNumber, currentSum + i, nextStartIndex);
        if (sumNumber - (currentSum + i) >= (i - 1) * (numCount - 1))
        {
          break;
        }
        if (numCount > i)
        {
          break;
        }
        i--;
        
        if (sumNumber - (currentSum + i) < sumUp(numCount - 2))
        {
          break;
        }      }
    }
    return ret;
  }

  private static int sumUp(int num)
  {
    int ret = 0;
    for (int i = 1; i < num; i++)
    {
      ret += i;
    }
    return ret;
  }
}

Compiler output:
Main.java:5: error: class AOJ_0097 is public, should be declared in a file named AOJ_0097.java
public class AOJ_0097
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

import static java.lang.Integer.parseInt;

/**
 * Sum of Integers II
 */
public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line;
		String[] words;

		while ((line = br.readLine()) != null && !line.isEmpty()) {

			int n, s;
			n = parseInt(line.substring(0, line.indexOf(' ')));
			s = parseInt(line.substring(line.indexOf(' ') + 1));
			if ((n | s) == 0) return;

			long[][] dp = new long[n + 1][s + 1];

			dp[0][0] = 1;
			//dp[1][0] = 1;

			for (int i = 0; i <= 100; i++) {
				for (int j = 1; j < n; j++) {
					for (int k = i; k <= s; k++) {
						dp[n][s] += dp[n - 1][s - i];
					}
				}
			}

			System.out.println(dp[n][s]);
		}
	}

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

#include <stdio.h>
#include <string.h>

typedef long LONG;

LONG memo[10][1001][101];

LONG comb(int *use, int n, int s, int m)
{
	int i;
	LONG c;

// printf("<%d %d %d>\n", n, s, m);
    
	if (memo[n][s][m] != -1){
		return (memo[n][s][m]);
	}
	
	if (n == 1){
    	if (0 <= s && s <= 100 && s >= m && use[s] == 0){
//			printf("[");
//			for (i = 0; i <= 100; i++){
//				if (use[i])printf("%d ", i);
//			}
//			printf("%d]", s);

			memo[n][s][m] = 1;
			return (1);
		}
		memo[n][s][m] = 0;
		return (0);
	}
	
	c = 0;
	for (i = m; i <= 100; i++){
		if (s - i >= 0){
			c += comb(use, n - 1, s - i, i + 1);
		}
	}
	
	memo[n][s][m] = c;
	return (c);
}

int main(void)
{
	int n, s;
	int c;
	int i;
	
    
	while (1){
		scanf("%d%d", &n, &s);
		if (n == 0 && s == 0){
			break;
		}
		memset(memo, -1, sizeof(memo));

		printf("%ld\n", comb(use, n, s, 0));
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:59:38: error: 'use' undeclared (first use in this function)
   59 |                 printf("%ld\n", comb(use, n, s, 0));
      |                                      ^~~
main.c:59:38: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
#include <string.h>

int comb(int N, int S, int num);

int n, s;
int memo[101][1001][101];

int main(void)
{
	int i, j;
	
	while (1){
		
		
		memset(memo, -1, sizeof(memo));
		
		
		scanf("%d %d", &n, &s);
		if (!n && !s)return 0;
		
		printf("%d\n", comb(n, 0, 0));
		
		
	}
	
}

long comb(int N, int S, int num)
{
	int i, j;
	
	if (s == S && !N)return 1;
	
	if (num == 101 || !N || S > s) return 0;
	
	if (memo[N][S][num] != -1) return memo[N][S][num];
	
	
	return memo[N][S][num] = comb(N - 1, S + num, num + 1) + comb(N, S, num + 1);
	
}

Compiler output:
main.c:29:6: error: conflicting types for 'comb'; have 'long int(int,  int,  int)'
   29 | long comb(int N, int S, int num)
      |      ^~~~
main.c:4:5: note: previous declaration of 'comb' with type 'int(int,  int,  int)'
    4 | int comb(int N, int S, int num);
      |     ^~~~
Language: C

#include <stdio.h>
#include <string.h>
??
int comb(int N, int S, int num);
??
int n, s;
long memo[11][1001][101];
??
int main(void)
{
????????int i, j;
??????????
????????while (1){
??????????????????
??????????????????
????????????????memset(memo, -1, sizeof(memo));
??????????????????
??????????????????
????????????????scanf("%d %d", &n, &s);
????????????????if (!n && !s)return 0;
??????????????????
????????????????printf("%ld\n", comb(n, 0, 0));
??????????????????
??????????????????
????????}
??????????
}
??
int comb(int N, int S, int num)
{
????????int i, j;
??????????
????????if (s == S && !N)return 1;
??????????
????????if (num == 101 || !N)return 0;
??????????
????????if (memo[N][S][num] != -1)return memo[N][S][num];
??????????
??????????
????????return memo[N][S][num] = comb(N - 1, S + num, num + 1) + comb(N, S, num + 1);
??????????
}

Compiler output:
main.c:3:1: error: expected identifier or '(' before '?' token
    3 | ??
      | ^
main.c:5:1: error: expected identifier or '(' before '?' token
    5 | ??
      | ^
main.c:8:1: error: expected identifier or '(' before '?' token
    8 | ??
      | ^
main.c:28:1: error: expected identifier or '(' before '?' token
   28 | ??
      | ^
Language: C

#include<stdio.h>
#define MAX 101
int j;
int A[MAX];
for(j=0;j<MAX;j++)A[j]=j;
int cnt=0;

void dfs(int i,int rest,int d,int n){

 if(i<MAX){
    if(d==n){
      if(rest==0){cnt++;return;}
      else return;
    }

    if(rest<0)return;/*sを超える*/

    dfs(i+1,rest-A[i],d+1,n);/*A[i]を選ぶ*/
    dfs(i+1,rest,d,n);/*A[i]を選ばない*/

 }

return;
}




int main(){
 int n,s;

 while(1){

      scanf("%d %d",&n,&s);
      if(n==0 && s==0)break;
      if(s > 55)printf("0\n");
      else {
            cnt=0;
            dfs(0,s,0,n);
            printf("%d\n",cnt);

      }
 }

 return 0;
}


Compiler output:
main.c:5:1: error: expected identifier or '(' before 'for'
    5 | for(j=0;j<MAX;j++)A[j]=j;
      | ^~~
main.c:5:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    5 | for(j=0;j<MAX;j++)A[j]=j;
      |          ^
main.c:5:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
    5 | for(j=0;j<MAX;j++)A[j]=j;
      |                ^~
Language: C++

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * 0 から 100 の数字から異なる n 個の数を取り出して合計が s となる組み合わせの数を出力する
 * n 個の数はおのおの 0 から 100 までとし、１つの組み合わせに同じ数字は使えません。
 * @author sugawara-a2
 *
 */

public class Main
{

  final private static int LIMIT = 100;

  public static void main(String[] args) throws NumberFormatException, IOException
  {
    BufferedReader input = new BufferedReader(new InputStreamReader(System.in));

    while (input.ready())
    {
      String[] INPUT_STR = input.readLine().split(" ");
      int numCount = Integer.valueOf(INPUT_STR[0]);
      int sumNumber = Integer.valueOf(INPUT_STR[1]);

      if (numCount == 0 && sumNumber == 0)
      {
        break;
      }

      long ans = solver(numCount, sumNumber);
      System.out.println(ans);
    }
  }

  private static long solver(int numCount, int sumNumber)
  {
    // n個（numCount）の重複しない0以上の整数を足し合わせた際の最小値が
    // sumNumberより大きい場合は組合せなし
    if (sumNumber < sumUp(numCount - 1))
    {
      return 0;
    }

    // n個（numCount）の重複しないLIMIT以下の整数を足し合わせた際の最大値が
    // sumNumberより小さい場合は組合せなし
    if ((LIMIT * numCount) - sumUp(numCount - 1) < sumNumber)
    {
      return 0;
    }

    // n個(numCount)の重複しない0以上の整数を足し合わせた際の最小値をsumNumberから除算した値とLIMITを比較し小さい値を開始数にする
    int startIndex = Math.min(LIMIT, sumNumber - sumUp(numCount - 1));
    sumNumber = sumNumber - sumUp(numCount - 1);
    return solver(numCount, sumNumber, 0, startIndex);
  }

  private static long solver(int numCount, int sumNumber, int currentSum, int startIndex)
  {
    long ret = 0;
    for (int i = numCount; i > 0; i--)
    {
      startIndex = startIndex / 2;
      ret += startIndex;
    }
    return ret;
  }

  private static int sumUp(int num)
  {
    // ZeroOrigin
    num--;
    return (int) ((int) (num + 1) * num * 0.5);
  }
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.BufferedReader;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.io.IOException;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.InputStreamReader;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: expected unqualified-id before 'public'
   12 | public class Main
      | ^~~~~~
Language: C++

#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <deque>
#include <complex>
#include <stack>
#include <queue>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <ctime>
#include <iterator>
#include <bitset>
#include <numeric>
#include <list>
#include <iomanip>

#if __cplusplus >= 201103L
#include <array>
#include <tuple>
#include <initializer_list>
#include <unordered_set>
#include <unordered_map>
#include <forward_list>

#define cauto const auto&
#else

#endif

using namespace std;


namespace{
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<LL,LL> pll;

typedef vector<int> vint;
typedef vector<vector<int> > vvint;
typedef vector<long long> vll, vLL;
typedef vector<vector<long long> > vvll, vvLL;

#define VV(T) vector<vector< T > >

template <class T>
void initvv(vector<vector<T> > &v, int a, int b, const T &t = T()){
    v.assign(a, vector<T>(b, t));
}

template <class F, class T>
void convert(const F &f, T &t){
    stringstream ss;
    ss << f;
    ss >> t;
}


#define reep(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n) reep((i),0,(n))
#define ALL(v) (v).begin(),(v).end()
#define PB push_back
#define F first
#define S second
#define mkp make_pair
#define RALL(v) (v).rbegin(),(v).rend()


#define MOD 1000000007LL
#define EPS 1e-8
static const int INF=1<<24;
ll dp[11][110][1010];
void mainmain(){
	rep(i,101){
		dp[1][i][i]=1;
	}
	reep(i,2,10){
		reep(j,0,101){
			reep(k,0,1001){
				reep(l,j+1,101){
					if(k-l<0) break;
					dp[i][l][k]+=dp[i-1][j][k-l];
				}
			}
		}
	}
	int n,s;
	while(cin>>n>>s,n||s){
		ll ans=0;
		rep(i,101){
			ans+=dp[n][i][s];
		}
		cout<<ans<<endl;
	}
}



}
main() try{
    mainmain();
}
catch(...){
}

Compiler output:
a.cc:48:14: error: 'LL' was not declared in this scope; did you mean 'll'?
   48 | typedef pair<LL,LL> pll;
      |              ^~
      |              ll
a.cc:48:17: error: 'LL' was not declared in this scope; did you mean 'll'?
   48 | typedef pair<LL,LL> pll;
      |                 ^~
      |                 ll
a.cc:48:19: error: template argument 1 is invalid
   48 | typedef pair<LL,LL> pll;
      |                   ^
a.cc:48:19: error: template argument 2 is invalid
a.cc:111:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
  111 | main() try{
      | ^~~~
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
using namespace std;
__int64 dp[101][1001][10];
	int main(){
	int n,s;
		dp[0][0][0]=1;
		for(int i=0;i<100;i++){
			for(int j=0;j<=1000;j++){
				for(int k=0;k<=9;k++){
					if(k<9)dp[i+1][i+j][k+1]+=dp[i][j][k];
					dp[i+1][j][k]+=dp[i][j][k];
				}
			}
		}
	while(cin>>n>>s,(n||s) ){
		cout<<dp[100][s][n]<<endl;
	}
	
	return 0;
}

Compiler output:
a.cc:5:1: error: '__int64' does not name a type; did you mean '__int64_t'?
    5 | __int64 dp[101][1001][10];
      | ^~~~~~~
      | __int64_t
a.cc: In function 'int main()':
a.cc:8:17: error: 'dp' was not declared in this scope
    8 |                 dp[0][0][0]=1;
      |                 ^~
Language: C++

#define _crt_secure_no_warnings

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif


#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

//int data[10][1001][11] = {};

long long int saiki(int a, int b, int c)
{
	if (b < 0)return 0;
	if (a == 0)return b == 0;
	long long int count = 0;
	for (size_t i = c; i < 101&&b-i>=0; i++)
	{
		if (i+1 < 11)
		{
			//if (!data[a - 1][b - i][i + 1])
			{
				data[a - 1][b - i][i + 1] = saiki(a - 1, b - i, i + 1);
			}
			count += data[a - 1][b - i][i + 1];
		} else
		{
			count += saiki(a - 1, b - i, i + 1);
		}
	}
	return count;
}

int main()
{
	int a, b;
	while (1)
	{
		cin >> a >> b;
		if (a == 0)break;
		cout << saiki(a, b, 0) << endl;;
	}
}

Compiler output:
a.cc: In function 'long long int saiki(int, int, int)':
a.cc:103:37: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
  103 |                                 data[a - 1][b - i][i + 1] = saiki(a - 1, b - i, i + 1);
      |                                     ^
a.cc:105:38: error: invalid types '<unresolved overloaded function type>[int]' for array subscript
  105 |                         count += data[a - 1][b - i][i + 1];
      |                                      ^
Language: C++

#include <stdio.h>

typedef long ll;

ll memo[10][1010];
ll dfs(int n, int s, int x)
{
	ll pat = 0;
	if (n == 0) return s == 0;
	if (s < 0) return 0;
	if (x > 100) return 0;
	if (memo[n][s] != -1) return memo[n][s];
	
	for (; x <= 100; x++){
		pat += dfs(n - 1, s - x, x + 1);
	}
	return pat;
}

int main(void)
{
	int N, S;
	while (scanf("%d %d", &N, &S), N || S){
		memset(memo, -1, sizeof(memo));
		printf("%ld\n", dfs(N, S, 0));
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: 'memset' was not declared in this scope
   24 |                 memset(memo, -1, sizeof(memo));
      |                 ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <stdio.h>
  +++ |+#include <cstring>
    2 |
Language: C++

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


int n,s;

ll dp[10][1010];

int main(void){
	dp[0][0]=1LL;
	rep(i,101){
		for(int j=8;j>=0;j--)rep(k,1010){
			if(k+i<=1010)
				dp[j+1][k+i]+=dp[j][k];
		}
	}
	while(cin >> n >> s,n){
		cout << dp[n][s] << endl;
	}
	return 0;
}

Compiler output:
a.cc:9:1: error: 'll' does not name a type
    9 | ll dp[10][1010];
      | ^~
a.cc: In function 'int main()':
a.cc:12:9: error: 'dp' was not declared in this scope; did you mean 'dup'?
   12 |         dp[0][0]=1LL;
      |         ^~
      |         dup
Language: C++

#include <string>
#include <iostream>

using namespace std;

int main()
{
	int n[50], s[50], c = 0, dp[101][901][101];

	long long SUM = 0;

	memset(dp, 0, sizeof(dp));

	for (int i = 0; i <= 100; i++)
	{
		dp[1][i][i] = 1;
	}

	for (int N = 2; N <= 100; N++)
	{
		for (int i = 1; i <= 100; i++)
		{
			for (int j = 1; j <= 900; j++)
			{
				if (j - i >= 0)
				{
					for (int k = 0; k < i; k++)
					{
						dp[N][i][j] += dp[N - 1][k][j - i];
					}
				}
			}
		}
	}

	while (true)
	{
		cin >> n[c] >> s[c];

		if (n[c] == 0 && s[c] == 0) { goto Exit; }

		c++;
	}

Exit:;

	for (int p = 0; p < c; p++)
	{
		SUM = 0;

		for (int i = 0; i < 100; i++)
		{
			SUM += dp[n[p]][i][s[p]];
		}

		cout << SUM << endl;
	}

	return 0;
}

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

#include <string>
#include <iostream>

using namespace std;

int main()
{
	int n[50], s[50], c = 0, dp[101][101][901];

	long long SUM = 0;

	memset(dp, 0, sizeof(dp));

	for (int i = 0; i <= 100; i++)
	{
		dp[1][i][i] = 1;
	}

	for (int N = 2; N <= 100; N++)
	{
		for (int i = 1; i <= 100; i++)
		{
			for (int j = 1; j <= 900; j++)
			{
				if (j - i >= 0)
				{
					for (int k = 0; k < i; k++)
					{
						dp[N][i][j] += dp[N - 1][k][j - i];
					}
				}
			}
		}
	}

	while (true)
	{
		cin >> n[c] >> s[c];

		if (n[c] == 0 && s[c] == 0) { goto Exit; }

		c++;
	}

Exit:;

	for (int p = 0; p < c; p++)
	{
		SUM = 0;

		for (int i = 0; i < 100; i++)
		{
			SUM += dp[n[p]][i][s[p]];
		}

		cout << SUM << endl;
	}

	return 0;
}

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

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

using namespace std;

typedef long long ll;

ll dp[1001][10][101];//???????????£?????°????????°????????£?????????????????§???

int main() {
	int n, s;
	while (cin >> n >> s, n+s) {
		memset(dp, 0, sizeof(dp));

		for (int j = 0; j <= n; j++) {
			for (int i = 0; i <= s; i++) {
				for (int k = 0; k <= s; k++) {
					if (i - k >= 0)
						dp[i][j][k] += dp[i - k][j - 1][k - 1];

					if (i == k && j == 1)
						dp[i][j][k]++;

					if (k > i)
						dp[i][j][k] += dp[i][j][k - 1];

//					cout << i << " " << j << " " << k << " " << dp[i][j][k] << endl;
				}
			}
		}
		int ans = 0;
		for (int i = 0; i <= s; i++) {
			ans += dp[s][n][i];
		}
		cout << ans << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:17: error: 'memset' was not declared in this scope
   14 |                 memset(dp, 0, sizeof(dp));
      |                 ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<functional>
  +++ |+#include <cstring>
    4 |
Language: C++

#include<bits/stdc++.h>
using namespace std;
int dp[11][1001]
int serch(int i,int j,int n)
{
    if(dp[i][j]>-1)return dp[i][j];
    else if(!n&&!j)return 1;
    else if(i==10||!n)return 0;
    return dp[i][j]=serch(i+1,j-i,n-1)+serch(i+1,j,n);
}
int main()
{
    int n,s;
    memset(dp,-1,sizeof(dp));
    while(cin>>n>>s&&n!=0)cout<<serch(0,s,n)<<endl;
}

Compiler output:
a.cc:4:1: error: expected initializer before 'int'
    4 | int serch(int i,int j,int n)
      | ^~~
a.cc: In function 'int main()':
a.cc:14:12: error: 'dp' was not declared in this scope; did you mean 'dup'?
   14 |     memset(dp,-1,sizeof(dp));
      |            ^~
      |            dup
a.cc:15:33: error: 'serch' was not declared in this scope; did you mean 'strchr'?
   15 |     while(cin>>n>>s&&n!=0)cout<<serch(0,s,n)<<endl;
      |                                 ^~~~~
      |                                 strchr
Language: C++

#include <bits/stdc++.h>
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)

typedef long long ll;


int main()
{
  ll dp[11][1001]={};
  dp[0][0] = 1;
  FOR(k,0,101) DOWN(i,10,1) FOR(j,k,1000)
    dp[i][j] += dp[i-1][j-k];
  int n, s;
  while(cin>>n>>s,n) cout << dp[n][s] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   16 |   while(cin>>n>>s,n) cout << dp[n][s] << endl;
      |         ^~~
      |         std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:16:22: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   16 |   while(cin>>n>>s,n) cout << dp[n][s] << endl;
      |                      ^~~~
      |                      std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:16:42: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   16 |   while(cin>>n>>s,n) cout << dp[n][s] << endl;
      |                                          ^~~~
      |                                          std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/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;
long long x,s,dp[11][1001];
int main(void){
    dp[0][0] = 1;
    
    for(int i=0;i<101;i++)
        for(int j=9;j>=0;j--)
            for(int k=0;i+k<1001;k++)
                dp[j+1][k+i]+=dp[j][k];
    while(cin >> x >> s, n|s)
        cout << dp[x][s] << endl;
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:26: error: 'n' was not declared in this scope
   12 |     while(cin >> x >> s, n|s)
      |                          ^