Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		// 37以上のとき組み合わせは存在しないが省くのめんどくさいのでまとめて計算
		for a:=0; a<=9; a++{
			for b:=0; b<=9; b++{
				for c:=0; c<=9; c++{
					for d:=0; d<=9; d++{
						if a+b+c+d==n{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

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

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

int main(){
int a[5][51];
int b;
int c;
int d;
b=1;
while(b<5){
c=0;
while(c<51){
a[b][c]=0;
c=c+1;}
b=b+1;}

b=0;
while(b<10){
a[1][b]=1;
b=b+1;}

b=2;
while(b<5){
c=0;
while(c<51){
d=0;
while(d<10){
if(c>=d){a[b][c]=a[b][c]+a[b-1][c-d];}
d=d+1;}
c=c+1;}
b=b+1;}
int n;
while(cin >> n){
cout << a[4][n] << endl;}


}