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;
    while (!cin.eof()) {
        int count = 0;
        cin >> n;
        for (int i=0; i<10; i++) {
            for (int j=0; j<10; j++) {
                for (int k=0; k<10; k++) {
                    int d = n-i-j-k;
                    if (0 <= d && d < 10) {
                        count++;
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
#include<memory.h>
#include<string>
using namespace std;

int DP[10][100];
int N;

int main()
{
	while(scanf("%d",&N)!=EOF)
	{
		memset(DP,0,sizeof(DP));
		DP[0][0]=1;
		for(int i= 0;i<=4;i++)
		{
			for(int j=0;j<=N;j++)
			{
				for(int k=0;k<10;k++)
				{
					DP[i+1][j+k]+=DP[i][j];
				}
			}
		}
		printf("%d\n",DP[4][N]);
	}

}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
  int n=0;
  int C=0;
  int a,b,c,d;
  
  while(scanf("%d",&n)!=EOF){
  
  for(a=0;a<10;a++){
	  for(b=0;b<10;b++){
		  for(c=0;c<10;c++){
			  for(d=0;d<10;d++){
				  if(a+b+c+d==n){
					  C++;
				  }
			  }
		  }
	  }
  }
  cout<<C<<endl;
  }
  return 0;
}

C++: #define _USE_MATH_DEFINES

#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

struct dat
{
	int n;
	int p;

	dat(int n, int p)
	{
		this->n = n;
		this->p = p;
	}
};

int binary_search(int x, vector<dat> &d)
{
	int l = 0;
	int r = d.size();

	int c = 0;

	for (; r > l;)
	{
		int i = (l + r) / 2;
		if (d.at(i).n == x)
		{
			return d.at(i).p;
		}
		else if (d.at(i).n < x)
		{
			l = i + 1;
		}
		else
		{
			r = i;
		}
	}

	return 0;
}

int main()
{
	int n;
	for (; cin >> n;)
	{
		int count = 0;
		vector<int> a;
		
		for (int i = 0; i <= 9; i++)
		{
			for (int j = 0; j <= 9; j++)
			{
				a.push_back(i + j);
			}
		}

		sort(a.begin(), a.end());

		int old = a.at(0);
		int p = 1;
		vector<dat> d;
		for (int i = 1; i < a.size(); i++)
		{
			if (old == a.at(i))
			{
				p++;
			}
			else
			{
				d.push_back(dat(old, p));
				p = 1;
			}

			old = a.at(i);
		}

		d.push_back(dat(old, p));

		for (int i = 0; i <= 9; i++)
		{
			for (int j = 0; j <= 9; j++)
			{
				count += binary_search(n - i - j, d);
			}
		}
		
		cout << count << endl;
	}
}

C++: #include <iostream>

using namespace std;

int main(void) {
  int n = 0;
  cin >> n;

  int num = 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) num++;
        }
      }
    }
  }

  cout << num << '\n';

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);

int main(void){
	int dp[4][40];
	fill_n(*dp, 4*40, 0);
	rep(i, 10)dp[0][i] = 1;
	for(int i = 1; i <= 3; i++){
		for(int j = 36; j >= 0; j--){
			for(int k = 0; k <= 9; k++){
				if(j-k < 0)break;
				dp[i][j] += dp[i-1][j-k];
			}
		}
	}
	int n;
	while(cin >> n)
		FIN(dp[3][n]);

	return 0;
}

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

int main(){
int n,ans;
while(cin>>n){
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<iostream>

int main(){

  int n,k;

  while(std::cin >> n){
    k=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){
              ++k;
            }
          }
        }
      }
    }
    std::cout << k << std::endl;
  }
}

C++: #include <iostream>
using namespace std;
int main()
{
int n;
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;
}
return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n;
	while(cin >> n){
		int count=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)
							count++;
					}
				}
			}
		}
		cout << count << endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back

# define inOut(a,b) freopen(a,"r",stdin);freopen(b,"w",stdout);
# define RESET(a) memset(a,0,sizeof(a))
# define MEMO(a) memset(a,-1,sizeof(a))
# define DEBUG puts("Debug-Has-Come-Until-Here")


typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main(){
	cin.tie(NULL);
	
	int a,b,c,d, n, hitung = 0;
	while(scanf("%d", &n) != EOF){
		hitung = 0;
		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)hitung++;
		printf("%d\n", hitung);
	}
	

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,m=0;
	while(cin>>n){	
	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) m++;
					}
				}
			}
		}
	cout<<m<<endl;
	m=0;
	}
}

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

int num ;
int count = 0 ;

int main()
{
	cin >> num ;

	if( num <= 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) == num )
						{
							count ++ ;
						}
					}
				}
			}
		}
	}

	cout << count ;

	return 0 ;
}

C++: #include <iostream>

using namespace std;

int main()
{
	while (1)
	{
		int n;
		cin >> n;
		if (cin.fail()) break;

		int count = 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)
						{
							++count;
						}
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

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

int main(){
	int n;
	while(cin >> n){
		if(n>36 || n<4)
			cout << 0 << endl;
		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 <stdio.h>

int main()
{
	int n;
	
	while ( scanf ("%d", &n) != EOF)
	{
		int count = 0;
		
		for (int i = 1; i <= 9; i++)
			for (int j = 1; j <= 9; j++)
				for (int k = 1; k <= 9 ; k++)
					for (int l = 1; l <= 9; l++)
						if ( (i + j + k + l) == n)
							count ++;
							
		printf ("%d\n", count);
	}

        return 0;
}