Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

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