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

int SuperSum(int k, int n){
    int sum = 0;
    
    if (k == 0) return n;
    
    for(int i=1; i<=n; i++)
        sum += SuperSum(k-1, i);

    return sum;
}

int main() {
    int k, n;
    // scanf("%d %d", &k, &n);
    // printf("%d\n", SuperSum(k, n));
    while( scanf("%d %d", &k, &n) != EOF )
        printf("%d\n", SuperSum(k, n));
    return 0;
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: