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 <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<9){
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;}


}

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

int main(){
	
	int n;
	int a, b, c, d;
	int combsum=0;

	while(cin >> n){
		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 )
							combsum++;

		cout << combsum << endl;
	}
	return 0;
}

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

C++: #include <iostream>
#include <stdio.h>
using namespace std;
  
int main(){
  int a,b,c,d,n,count = 0;
  while(scanf("%d",&n)!=EOF){
      
    count=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)count++;
    }
      }
    }
    }
    cout << count <<endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

bool calc(int a, int b, int n) {
	n -= a-b;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (n == c+d) return true;
		}
	}
	return false;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			if (calc(a,b,n)) count++;
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

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

using namespace std;

int comb(int a,int num){
    if(num == 1){
        return 1;
    }
    else{
        int count = 0;
        for(int i = 0; i <= min(a,9); i++){
            if(a - i <= 9*(num-1)) count = count + comb(a-i, num-1);
        }
        return count;
    }

}

int main(){
    int n,k;
    while(cin >> n){
        cout << comb(n,4) << endl;
    }

}

C++: 
/* vo00_08.cpp */
#include <iostream>
using namespace std;

int main()
{
	int n, count;

	while (true) {
		cin >> n;
		if (cin.eof()) { break; }

		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 (n == a + b + c + d) { count++; }

		cout << count << '\n';

	}
	return 0;
}

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

int main()
{
	int n, iCount;

	cin >> n;

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

	cout << iCount << endl;

	return 0;
}

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

int main()
{
	int num;
	int c = 0;
	while (cin >> num)
	{
		c = 0;
		if (num > 36 || num < 0)
		{
			cout << 0 << endl;
			continue;
		}
		else
		{
			for (int i = 0; i <= 9; i++)
				for (int j = 0; j <= 9; j++)
					for (int k = 0; k <= 9; k++)
						for (int v = 0; v <= 9; v++)
						{
							if (i + j + k + v == num)
								c++;
						}
			cout << c << endl;
		}
	}
	
	return 0;
}

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



int main() {

//変数の宣言

	int nom=0,n,x,i,j,k,l;


/////メイン処理/////

	while(cin>>x){
		
		for(i=0;i<10;i++){
			for(j=0;j<10;j++){
				for(k=0;k<10;k++){
					for(l=0;l<10;l++){
						if (i+j+k+l==x){
							nom++;
							break;
						}
					}
				}
			}
		}
		
		//出力
		cout << nom << endl;
		nom = 0;
	}
	return 0;
}

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

int main()
{
	int n,a,b,cnt=0;
	cin >> n;
	for(a=0;a<=18;a++){
		for(b=0;b<=18;b++){
			if(a+b==n) cnt+= (10-(int)abs(a-9)) * (10-(int)abs(b-9));
		}
	}
	cout << cnt << endl;
	return 0;	
}

C++: #include <iostream>
#include <stdio.h>
int main(){

	int a,b,c,d,n,i;

	std::cin>>n;
	i=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){
						i++;
						
						
						}
					}
				}
			}
		}

		std::cout<<i<<std::endl;

	
		return 0;
		}

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

int main(){
  int n;

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

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef  long long LL;
typedef  vector<int> VI;
typedef  vector<double> VD;
typedef  string STR;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
#define POW2(a) pow(a, 2.0)
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{

	int n;
	while (cin >> n)
	{
	int count=0;
	REP(a, 10)
	{
		REP(b, 10)
		{
			REP(c, 10)
			{
				REP(d, 10)
				{
					if ((a + b + c + d) == n)count++;
				}
			}
		}
	}
	COUT(count);
	}
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}

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

int main(void){
    //n<=50
    int n,i,j,k,l,cnt;
    while(cin>>n){
        cnt = 0;
        for(i=0;i<=9;i++){
            for(j=i;j<=9;j++){
                for(k=j;k<=9;k++){
                    for(l=k;l<=9;l++) if(i+j+k+l==n) cnt+=4;
                }
            }
        }
        cout << cnt << endl;
    }
    return 0;
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
int main(){
  int n;
  while(cin>>n){
    int co=0;
    rep(a,10){
      rep(b,10){
	rep(c,10){
	  if(n-a-b-c>=0&&n-a-b-c<10)co++;
	}
      }
    }
    cout<<co<<endl;
  }

}

C++: #include<stdio.h>

int main(void){

	int a,b,c,d,n,count,i,j,z;
	int	maji[1000];

	i=0;
	
	while(1){
	
		scanf("%d",&n);
		maji[i]=n;
		if(n>50||n<=0||i>999){
			break;
		}
		i++;
			
	}
	
	z=0;
	
	for(j=0;j<i;j++){	
		
		count=0;
		n=maji[z];
		
		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(n==a+b+c+d){
							count++;
						}
					}
				}
			}
		}
		z++;
		printf("%d\n",count);
	}
	return 0;
}