Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

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<iostream>

using namespace std;

int main()
{
	int n;
	while (cin>>n)
	{
		int combo = 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)
					++combo;
			}
			}
			}
		}
		cout<<combo<<endl;
	}
	return 0;

}

C++: 

#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;
typedef long long int ll;

int main(){
    int n;
    while (cin >> n) {
        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++) {
                        if(i+j+k+l==n) ans++;
                    }
                }
            }
        }
        cout << ans <<endl;
    }
}

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

int main()
{
	int n[50],i = 0, inp = 0, out[50]={0}, a = 0, b = 0, c = 0, d = 0;

	//??\???
	while( cin >> inp){
		if(inp >= 1 && inp <= 50){
	  		n[i] = inp;
			i++;
	  }
	}

	//??????
	for(int j = 0;j < i;j++){

		//?§£
		for(a = 0;a <= 9;a++){
			if(n[j] == (a + b +c +d) && (b <= 9 || c <= 9 || d <= 9)){
				out[j]++;
				//cout << a << " " << b << " "  << c << " "  << d << endl;
			}

			for(b = 0;b <= 9;b++){
				if(n[j] == (a + b +c +d) && (c <= 9 || d <= 9)){
					out[j]++;
					//cout << a << " " << b << " "  << c << " "  << d << endl;
				}

				for(c = 0;c <= 9;c++){
					if(n[j] == (a + b +c +d) && (d <= 9)){
						out[j]++;
						//cout << a << " " << b << " "  << c << " "  << d << endl;
					}

					for(d = 0;d <= 9;d++){
						if(n[j] == (a + b +c +d)){
							out[j]++;
							//cout << a << " " << b << " "  << c << " "  << d << endl;
						}
					}
				}
			}
		}

		cout << out[j] << endl;
	}	

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>

using namespace std;

int main(){
   int a,b,c,n;
   int ans = 0;
   while(cin>>n){
      ans = 0;
      for(a=0;a<=9;a++){
         for(b=0;b<=9;b++){
            for(c=0;c<=9;c++){
               if(n-(a+b+c) <= 9 && n-(a+b+c)>=0)
                  ans++;
            }
         }
      }
      printf("%d\n",ans);
   }
   return 0;
}

C++: #include <cstdio>
#include <cstdlib>
 
int main(){
 int n;
 int ans = 0;
 while(true){
 n = 0;
 scanf("%d\n",&n);
 if(n == 0) break;
 ans = 0;
 for(int a = 9;a >= 0;a--){
   for(int b = 9;b >= 0;b--){
     for(int c = 9;c >= 0;c--){
       for(int d = 9;d >= 0;d--){
        if(a+b+c+d == n){ans++; break;}
        if(a+b+c+d < n) break;
       }
     }
   }
 }
 printf("%d\n",ans);
 }
}

C++: #include <iostream>

using namespace std;

int main() {
    int n;


    while (cin >> n) {
        int num = 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) ++num;
                    }
                }
            }
        }

        cout << num << endl;
    }
}

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

#define times(n, i) uptil(0, n, i)
#define upto(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i <= _##i poi i++)
#define uptil(f, t, i) for(auto _##i = (t), i = decltype(_##i)(f) poi i < _##i poi i++)
#define downto(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i >= _##i poi i--)
#define downtil(f, t, i) for(auto i = (f), _##i = decltype(i)(t) poi i > _##i poi i--)

#define unless(c) if(!(c))
#define until(c) while(!(c))
#define loop while(true)

#define poi ;
#define poipoi << "\n"

using namespace std;

#define fuwafuwa(n, c) dokidoki((n) + (c) - 1, c)
#define dokidoki(n, c) ((n) / (c) * (c))

template<class T> T lov_yet(T t){
    if(t) return t poi
    else return 0 poi
}

template<class T> T gcd(T a, T b){
    if(b) return gcd(b, a % b) poi
    else return a poi
}

int main(){
    int n poi
    while(cin >> n){
        int pyon = 0 poi
        times(10, a) times(10, b) times(10, c) times(10, d) if(a + b + c + d == n) pyon++poi
        cout << pyon poipoi poi
    }
    return 0 poi
}

C++: #include<iostream>
#include<cstdio>

using namespace std;


int main(void)
{
	int n = 0;

	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++)
					{
						if (n == i + j + k + l)
						{
							ans++;
						}
					}
				}
			}
		}

		cout << ans << endl;
	}

	return 0;
}

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

int main() {
	int n;

	while (cin >> n) {
		int count = 0;
		
		if (n <= 36) {
			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;
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<cmath>
using namespace std;
int main(){
    int num,n;
    while(~scanf("%d",&n))
    {
        num=0;
        for(int i=0;i<=9;i++)
        {
            for(int j=0;j<=9&&i+j<=n;j++)
            {
                for(int k=0;k<=9&&i+j+k<=n;k++)
                {
                    for(int m=0;m<=9;m++)
                    {
                        if(i+j+k+m==n)
                        {
                            num++;
                            break;
                        }
                    }
                }
            }
        }
        cout<<num<<endl;
    }
    return 0;
}

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


int main () {

	int a;
	int ans;
	while (cin>>a && a) {
		ans=0;
		if(a<=36){
			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)==a)
								ans++;
						}
					}
				}
			}
				
		}
		cout << ans <<endl;
	}
    return 0;
}

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

int dp[2][51];

int main()
{
	while(1)
	{
		int n;
		if(0 == scanf("%d",&n))
		{
			break;
		}
		int now = 0;
		for(int i = 0; i <= 50; i++)
		{
			dp[now][i] = 0;
		}
		dp[now][0] = 1;
		for(int k = 0; k < 4; k++)
		{
			int nex = (now + 1) % 2;
			for(int i = 0; i <= 50; i++)
			{
				dp[nex][i] = 0;
			}
			for(int j = 0; j <= 50; j++)
			{
				for(int i = 0; i <= 9; i++)
				{
					if(j + i <= 50)
					{
						dp[nex][j + i] += dp[now][j];
					}
				}
			}
			now = nex;
		}
		printf("%d\n",dp[now][n]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
 
int solve(){
    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){
                    int tmp = i + j + k + l;
                    if(tmp == N) ans++;
                }
            }
        }
    }
    return ans;
}
 
int main(){
    int N;
    while(cin >> N){
        int ans = solve();
        cout << ans << endl;
    }
}