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 <bits/stdc++.h>

#define FOR(i,a,b) for(int i= (a); i<((int)b); ++i)
#define RFOR(i,a) for(int i=(a); i >= 0; --i)
#define FOE(i,a) for(auto i : a)
#define ALL(c) (c).begin(), (c).end()
#define RALL(c) (c).rbegin(), (c).rend()
#define DUMP(x)  cerr << #x << " = " << (x) << endl;
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v,x) (std::find(v.begin(), v.end(), x) != v.end())
#define BIT_ON(bit, i) (((bit >> i) & 1) > 0)

typedef long long LL;
template<typename T> std::vector<T> make_v(size_t a){return std::vector<T>(a);}
template<typename T,typename... Ts> auto make_v(size_t a, Ts... ts){ return std::vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));}    // C++14
template<typename T,typename V> typename std::enable_if<std::is_class<T>::value==0>::type fill_v(T &t,const V &v){t=v;}
template<typename T,typename V> typename std::enable_if<std::is_class<T>::value!=0>::type fill_v(T &t,const V &v){for(auto &e:t) fill_v(e,v);}
template<class T> inline T ceil(T a, T b) { return (a + b - 1) / b; }
template<class T> inline void print(T x) { std::cout << x << std::endl; }
template<class T> inline void print_vec(const std::vector<T> &v) { for (int i = 0; i < v.size(); ++i) {  if (i != 0) {std::cout << " ";} std::cout << v[i];} std::cout << "\n"; }
template<class T> inline bool inside(T y, T x, T H, T W) {return 0 <= y and y < H and 0 <= x and x < W; }
template<class T> inline double euclidean_distance(T y1, T x1, T y2, T x2) { return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); }
template<class T> inline double manhattan_distance(T y1, T x1, T y2, T x2) { return abs(x1 - x2) + abs(y1 - y2); }
template<typename T> T &chmin(T &a, const T &b) { return a = std::min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = std::max(a, b); }

template<class T> inline std::vector<T> unique(std::vector<T> v) {
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    return v;
}
// 初項s, 交差dのn個の数列の和
long long sum_of_arithmetic_progression(long long s, long long d, long long n) {
    return n * (2 * s + (n - 1) * d) / 2;
}

const int INF = 1 << 30;
const double EPS = 1e-9;
const long double PI = acos(-1.0);
//const std::vector<int> dy4 = {0, -1, 0, 1}, dx4 = {1, 0, -1, 0};
const std::vector<int> dy8 = { 0, -1, 0, 1, 1, -1, -1, 1 }, dx8 = { 1, 0, -1, 0, 1, 1, -1, -1 };


using namespace std;


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int N;
    while (cin >> N) {
        LL ans = 0;
        FOR(a, 0, 10) {
            FOR(b, 0, 10) {
                FOR(c, 0, 10) {
                    FOR(d, 0, 10) {
                        ans += (a + b + c + d == N);
                    }
                }
            }
        }
        print(ans);
    }
    return 0;
}

C++: #include<iostream>
#define FOR(x) for(int x=0;x<=9;x++)
using namespace std;

int main(){
  int n;
  while(cin>>n){
    int count=0;
    FOR(a){
      FOR(b){
	FOR(c){
	  FOR(d){
	    if(a+b+c+d==n) count++;
	  }
	}
      }
    }
    cout<<count<<endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int a=0,b=0,c=0,d=0,e=0,n,count;
	while(1){
		cin>>n;
		do{
		if((a+b+c+d)==n){
			count++;
		}
		if(a==9 && b==9 && c==9 && d==9){
			e=1;
		}
	
		else if(b==9 && c==9 && d==9){
			a++;
			b=0,c=0,d=0;
		}
		else if(c==9 && d==9){
			b++;
			c=0,d=0;
		}
		else if(d==9){
			c++;
			d=0;
		}
		else{
			d++;
		}
	
		}while(e==0);
		cout<<count<<endl;
		count=0,a=0,b=0,c=0,d=0,e=0;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int a,b,c,d,n,C;
while(cin>>n){
C=0;
a=0;
b=0;
c=0;
d=0;
for(int i=0;i<9;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(a+b+c+d=n)C++;
l++;}
k++;}
j++;}
i++;}
cout<<C;}
}

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

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

C++: #include "stdio.h"

int main()
{
    int a, b, c, d, n;
    while(scanf("%d", &n) != EOF)
    {
        int count = 0;
        for (int i = 0; i <= 9; i++)
        {
            for (int j = 0; j <= 9; j++)
            {
                for (int m = 0; m <= 9; m++)
                {
                    for (int i = 0; i <= 9; i++)
                    {
                        if (a + b + c + d == n)
                            count++;
                    }
                }
            }
        }
        printf("%d\n", count);
    }
    return 0;
}

C++: #include <cstdio>  
  #include<iostream>
#include<algorithm>
  
int main()  
{  
    int n, cnt, i, j, k, l;  
  
    while(cin >> n) {  
        cnt = 0;  
        for(i=0; i<=9; i++)  
            for(j=0; j<=9; j++)  
                for(k=0; k<=9; k++)  
                    for(l=0; l<=9; l++)  
                        if(i + j + k + l == n)  
                            cnt++;  
  
      cout << cnt << endl;
    }  
  
    return 0;  
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <functional>
#include <sstream>
#include <stdio.h>
using namespace std;

// Sum of 4 Integers(0008)
int main()
{
	int n;
	while (cin >> n) {
		int ans = 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)
							++ans;
					}
				}
			}
		}
		cout << ans << endl;
	}
	return 0;
}

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

C++: #include <iostream>
using namespace std;
int main() {
  int n, cnt = 0;
  while(cin >> n) {
	for(int i = 0; i <= 9; ++i) {
	  if(i > n) break;
	  for(int j = 0; j <= 9; ++j) {
		if(i+j > n) break;
		for(int k = 0; k <= 9; ++k) {
		  if(i+j+k > n) break;
		  for(int l = 0; l <= 9; ++l) {
			if(i+j+k+l > n) break;
			else if(i+j+k+l == n) cnt++;
		  }
		}
	  }
	}
	cout << cnt << endl;
  }
  return 0;
}

C++: #include<iostream>
#define REP(i,n) for(int i=1;i<=n;i++)
using namespace std;

#define N 10

int main()
{
    int t;
    while(cin >> t)
    {
        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)==t)ans++;

        cout << ans << endl;
    }

    return 0;
}

C++: #include<iostream>
int main()
{
	int result[50];
	int num;
	for(int i = 0;; i++)
	{
		result[i] = 0;
		int n;
		std::cin >> n;
		if(std::cin.eof())
		{
			num = i;
			break;
		}
		for(int j = 0; j <= 9; j++)
		{
			for(int k = 0; k <= 9; k++)
			{
				for(int l = 0; l <= 9; l++)
				{
					for(int m = 0; m <= 9; m++)
					{
						if(j + k + l + m == n)
						{
							result[i]++;
						}
					}
				}
			}
		}
	}
	for(int i = 0; i < num; i++)
	{
		std::cout << result[i] << std::endl;
	}
	return 0;
}