Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

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<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<ll,ll> P;
const ll MOD=1234567;
const ll INF=1000000010;
const ll LINF=1000000000000000010LL;
const int MAX=500010;
const double EPS=1e-3;
int dx[4]={0,1,0,1};
int dy[4]={0,0,1,1};
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>
#include <vector>

void calc(std::vector<int> &v) {
    std::vector<int> g(10, 0);
    for (int i = 1; i <= 9; i++) {
        v[i] = 4 * i; 
    }
    for (int i = 0; i <= 9; i++) {
        g[i + 9] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i + 8] * 3 + (v[i + 8] - g[i + 8]);
    }
    return; 
}

int main(void) {
    std::vector<int> v(19, 0);
    calc(v);
    int total;

    while (std::cin >> total) {
        if (total > 36) {
            std::cout << '0' << std::endl;
            return 0;
        } else if (total > 18){
            total = 36 - total; 
        }
        std::cout << v[total] << std::endl;
    }
    return 0;
}

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

int main()
{
        int n,count = 0;
        cin >> n;
        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)count++;
                                }

        cout << count << "\n";

        return 0;
}

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

int num ;
int count = 0 ;

int main()
{
	cin >> num ;

		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(){
	int N, a,b,c,d,count=0;
	cin >> N;
	
	for(int i=0; i<10;i++){
		if((N-i)/3 >9) continue;
		for(int j=0; j<10;j++){
			if((N-i-j)/2 > 9) continue;
			for(int k=0; k<10;k++){
				if((N-i-j-k) > 9 || (N-i-j-k)<0) continue;
				cout << i<< " " << j << " " << k << " "<< N-i-j-k <<endl;
				count++;
			}
		}
	}
	cout << count << endl;
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n, t; int cnt = 0;

	cin >> n;

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			for (int k = 0; k < 10; k++)
			{
				t = n - (i + j + k);

				if (0 <= t && t < 10) { cnt++; }
			}
		}
	}

	cout << cnt << endl;

	return 0;
}

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

int dp[51][4];
int rec( int mul, int idx){
  if(mul < 0) return 0;
  if(idx == 4) return mul == 0;
  if(~dp[mul][idx]) return dp[mul][idx];

  int ret = 0;
  for(int i = 0 ; i < 10 ; i++ ){
    ret += rec( mul - i, idx + 1);
  }
  return dp[mul][idx] = ret;
}
int main(){
  int n;
  fill_n( *dp, 51 * 4, -1);
  while(cin >> n){
    cout << rec( n, 0) << endl;
  }
}

C++: #include "stdafx.h"
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{
	int count = 0, num;

	

	while (cin >> num)
	{
		count = 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)
							count++;
					}
				}
			}
		}
		cout << count << endl;
	}

	

}

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

int main () {

int n, count = 0;

    cin >> n;

for (int a = 0; a < 10 && a <= n; a++){
    for (int b = 0; b < 10 && b <= n-a; b++){
        for (int c = 0; c < 10 && c <= n-a-b; c++){
            if (n-a-b-c >=0 && n-a-b-c < 10) {
                count++;
            }
        }
    }
}


    cout << count;


    return 0;

}

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

int main(){

  int n;

  while(cin>>n){
    int cnt=0;

    for(int i=0;i<=9;++i){
      for(int j=0;j<=9;++j){
        for(int k=0;k<=9;++k){
          if(n-i-j-k<10&&n-i-j-k>=0) ++cnt;
        }
      }
    }

    cout<<cnt<<endl;
  }

  return EXIT_SUCCESS;
}

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

int main(){
  int n,i,S;
  while(1){
    i=0;
    cin>>n;
    for(S=1;S<=9999;S++){
      if((S/1000)+((S-S/1000*1000)/100)+((S-S/100*100)/10)+(S-S/10*10)==n)
	i=i+1;
    }
    cout<<i<<endl;
  }
  return 0;
}

C++: #include <iostream>

int main()
{
	int n;
	while( std::cin >> n )
	{
		int num = 0;
		for( int i1=0; i1<=9; ++i1 )
		{
			for( int i2=0; i2<=9; ++i2 )
			{
				for( int i3=0; i3<=9; ++i3 )
				{
					for( int i4=0; i4<=9; ++i4 )
					{
						num += (i1+i2+i3+i4 == n);
					}
				}
			}
		}

		std::cout << num << '\n';
	}
}

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

#define MIN(a,b) ((b<a)?b:a)
#define MAX(a,b) ((b>a)?b:a)

int main(){
	int n;
	while(scanf("%d", &n)!=EOF){
	int c=0;
	int i,j,k;
	int t=n;
	for(i=MAX(t-27,0);i<=MIN(t,9);i++){
		t-=i;
		for(j=MAX(t-18,0);j<=MIN(t,9);j++){
			t-=j;
			for(k=MAX(t-9,0); k<=MIN(t,9) ;k++){
				c++;
			}
			t+=j;
		}
		t+=i;
	}
	printf("%d\n", c);
}
}

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

int main()
{
    int n;
    while(cin >> n)
    {
        int num = 0;
        for(int i = 0; i < 10; i++)
        {
            for(int j = 0; j < 10; i++)
            {
                for(int k = 0; k < 10; i++)
                {
                    for(int l = 0; l < 10; i++)
                        {
                            if(i+j+k+l == n) num++;
                        }
                }
            }
        }
        cout << num << endl;
    }
}

C++: #include<stdio.h>
int main()
{
	int n;
	while(scanf("%d",&n))
	{
		int count=0;
		for(int i=0;i<=9;i++)
			for(int j=0;j<=9;j++)
				for(int k=0;k<=9;k++)
						if(9>=n-i-j-k && n-i-j-k >=0)
							count++;
		printf("%d\n",count);
	}
	return 0;
}