Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

C++: #include <iostream>
using namespace std;
int main() {
  int n, count = 0;
  while (cin >> n) {
    for (int a = 0; a <= 9; a++)
      for (int b = 0; b <= 9; b++)
        for (int c = 0; c <= 9; c++)
          for (int d = 0; d <= 9; d++)
            if (a+b+c+d == n)
              count++;
    cout << count << endl;
    count = 0;
  }
}

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

int x;

int mySet(int d,int e){
	int a=0;
	if(d==4){
		if(e==x){
			return 1;
		}else{
			return 0;
		}
}
	for(int i=0;i<=9;i++){
		a+=mySet(d+1,e+i);
	}
	return a;
}

int main(void){
	while(scanf("%d",&x)!=EOF){
		cout<<mySet(0,0)<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;

int main()
{
	int n;
	
	while(cin >> n){
	int ans = 0;
		for(int a = 0; a <= 9; a++){
			for(int b = 0; b <= 9; b++){
				for(int c = 0; c <= 9; c++){
					for(int d = 0; d <= 9; d++){
						if(a+b+c+d==n){
							ans++;
						}
					}
				}
			}
		}
	cout << ans << endl;
	}
}

C++: #include <iostream>
using namespace std;
void sumOf()
{
	int N;
	while (cin >> N)
	{
		int count = 0;
		for (int a = 0; a < 10; a++)
		{
			for (int b = 0; b < 10; b++)
			{
				for (int c = 0; c < 10; c++)
				{
					for (int d = 0; d < 10; d++)
					{
						if (a + b + c + d == N)
						{
							count++;
						}
					}
				}
			}
		}

		cout << count << endl;

	}

}
int main()
{
	sumOf();
	return 0;
}

C++: #include <cstdio>
int main() {
	int n;
	while(scanf("%d",&n)!=EOF) {
		int ans=0;
		for(int i=0;i<=9;i++) for(int j=0;j<=9;j++) for(int k=0;k<=9;k++) for(int l=0;l<=9;l++) {
			ans+=(n==(i+j+k+l));
		}
		printf("%d\n",ans);
	}
}

C++: #include <iostream>
using namespace std;
int main(){
	int n;
	while(cin >> n){
	int x = 0;
	for(int a=0;a<10;a++){
	for(int b=0;b<10;b++){
	for(int c=0;c<10;c++){
	for(int d=0;d<10;d++){
		if(a+b+c+d==n) x++;
	}}}}
	cout << x << endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
const ll inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;

int n;

int main()
{
    while (cin >> n)
    {
        int ans = 0;
        for (int i = 0; i < 10; i++)
        {
            for (int j = 0; j < 10; j++)
            {
                for (int k = 0; k < 10; k++)
                {
                    for (int l = 0; l < 10; l++)
                    {
                        if (i + j + k + l == n)
                            ans++;
                    }
                }
            }
        }
        cout << ans << endl;
    }
}

C++: #include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>

using namespace std;

int main()
{
	int n;
	while (scanf("%d", &n) != EOF)
	{
		int res = 0;
		for (int a = 0; a <= 9; ++a)
			for (int b = 0; b <= 9; ++b)
				for (int c = 0; c <= 9; ++c)
					for (int d = 0; d <= 9; ++d)
						if (a+b+c+d == n)
							++res;
		printf("%d\n", res);
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int MAX = 9;

vector <int> v;

int main() {
	int n;
	
	while (cin>>n) {
		v.clear();
		
		for (int i=0; i<=MAX; i++) v.push_back(n-i);
		sort(v.begin(), v.end());
		
		int ans = 0;
		
		for (int i=0; i<=MAX; i++) {
			for (int j=0; j<=MAX; j++) {
				for (int k=0; k<=MAX; k++) {
					if (binary_search(v.begin(), v.end(), i+j+k)) ans++;
				}
			}
		}
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
    int n;
    while(scanf("%d",&n)!=EOF)
    {
        int cnt=0;
        for(int i=0;i<10;i++)for(int j=0;j<10;j++)for(int k=0;k<10;k++)for(int l=0;l<10;l++)if(i+j+k+l==n)cnt++;
        cout<<cnt<<endl;
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

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

	while(cin>>num){
		int answer = 0;
		for(int a = 0;a != 10;++a){
			for(int b = 0;b != 10;++b){
				for(int c = 0;c != 10;++c){
					for(int d = 0;d != 10;++d)
						if(a+b+c+d==num)
							answer++;
				}
			}
		}
	}

	return 0;	
}

C++: #include <bits/stdc++.h>

using namespace std;

#define Vi vector<int>
#define FOR(i,s,e) for (int i=s; i<e; i++)
#define ITER(v) v.begin(), v.end()

constexpr int n_ints = 4;
constexpr int min_int = 0;
constexpr int max_int = 9;

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

    int n;
    cin >> n;

    int res = 0;
    FOR(a,min_int,max_int+1)
    FOR(b,a,max_int+1)
    FOR(c,b,max_int+1)
    FOR(d,c,max_int+1) {
        int sum = a + b + c + d;
        if (sum == n) {
            ++res;
            cout << a << b << c << d << endl;
        }
    }
    cout << res << endl;

    return 0;
}

C++: #include<iostream>
#include<stdio.h>

using namespace std;

#define MAX 256

int kai (int x){
	if(x == 1 || x == 0)return 1;
	return x * kai(x - 1);
}

int miku(int x){
	if(x > 36)return 0;
	if(x < 10)return kai(x + 3) / ( kai(x) * 6);
	if(x > 19)return miku(36 - x);
	if(x > 9 && x < 19)return kai(x + 3) / ( kai(x) * 6) - (miku(x - 10) * 4);
}

int main(void){
	int n,i = 0;
	int ans[MAX];
	
	while( cin >> n != EOF){
		ans[i] = miku(n);
		i++;
	}
	
	for(int j = 0;j < i;j++){
		cout << ans [j] <<endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;

int main(void)
{
	int num, total = 0;

	while (cin >> num) {
		int C[11] = {0};
		C[10] = 4;
		for (int i = 9; i > 0 && num; i--) {
			while (num-i >= 0) {
				C[10]--;
				C[i]++;
				num -= i;
			}
		}
		if (num == 0) {
			total = 24;
			for (int i = 0; i < 11; i++) {
				while (C[i] > 0) {
					total /= C[i];
					C[i]--;
				}
			}
		}
		cout << total << endl;
	}
	
	return 0;
}