Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

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

#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,s,n) for(int i=(s);i<=(n);i++)
#define repr(i,n) for(int i=n-1;i>=0;i--)
#define REPR(i,s,n) for(int i=(s);i>=(n);i--)
#define all(a) (a).begin(),(a).end()
#define rall(a) (a).rbegin(),(a).rend()
#define Eunique(v) v.erase(unique(all(v)),v.end())
#define Eback(s) s.erase(s.end()-1,s.end())
#define rev(v) reverse(all(v))
#define minvec(v) *min_element(all(v))
#define maxvec(v) *max_element(all(v))
#define sumvec(v) accumulate(all(v),0LL)
#define mapmin(v) v.rbegin()->first
#define mapmax(v) v.begin()->first
#define pb push_back
#define pf push_front
#define m_p make_pair
#define DOUBLE fixed << setprecision(15)
#define OK cerr<<"OK\n"
#define OK1 cerr<<"OK1\n"
#define OK2 cerr<<"OK2\n"
#define SIZE(s) (int)s.size()
#define INF ((1LL<<62)-(1LL<<31))
#define zero(x,n) setw(x) << setfill('0') << n
#define endl '\n'

typedef long long ll;

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long> vll;
typedef vector<vll> vvll;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<string> vs;

typedef pair<ll,ll> pll;
typedef pair<int,int> pii;
typedef vector<pair<int,int>> vpii;
typedef vector<pair<ll,ll>> vpll;

const double pi = acos(-1.0);
const ll mod=1000000007;
const ll mod2=998244353;

template<class A, class B>
ostream& operator<<(ostream& ost, const pair<A, B>&p) {
	ost << "{" << p.first << ", " << p.second << "} ";
	return ost;
}

template<class T>
ostream& operator<<(ostream& ost, const vector<T>&v) {
	ost << "{";
	for (int i = 0; i<(int)v.size(); i++) {
		if (i)ost << " ";
		ost << v[i];
	}
	ost << "} \n";
	return ost;
}

template<class A, class B>
ostream& operator<<(ostream& ost, const map<A, B>&v) {
	ost << "{";
	for (auto p:v) {
		ost << "{" << p.first << ", " << p.second << "} ";
	}
	ost << "} ";
	return ost;
}

template<class T>
inline bool chmax(T& a, T b){if(a<b){a=b;return true;} return false;}

template<class T>
inline bool chmin(T& a, T b){if(a>b){a=b;return true;} return false;}

void YES(bool b) {cout << ((b)?"YES\n":"NO\n");}
void Yes(bool b) {cout << ((b)?"Yes\n":"No\n");}
void yes(bool b) {cout << ((b)?"yes\n":"no\n");}
void Yay(bool b) {cout << ((b)?"Yay!\n":":(\n");}

ll powmod(ll a,ll b){ll c=1; while(b>0){ if(b&1){ c=a*c%mod; } a=a*a%mod; b>>=1; } return c;}
ll nCrmod(ll n,ll r){ll x=1,y=1; rep(i,r){x=x*(n-i)%mod; y=y*(i+1)%mod;} return x*powmod(y,mod-2)%mod;}
ll gcd(ll x, ll y) {return __gcd(x,y);}
ll lcm(ll x, ll y) {return x/__gcd(x,y)*y;}

int main()
{
	ll n;
	while(cin >> n){
		ll cnt=0;
		rep(i,10)rep(j,10)rep(k,10)rep(l,10){
			if(i+j+k+l==n) cnt++;
		}
		cout << cnt << endl;
	}
	return 0;
}

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

bool binary_search(vector<int> a, int x){
	int left = 0, right = a.size() - 1;

	while (left <= right){
		int mid = (left + right) / 2;
		if (a[mid] == x) return true;
		else if (a[mid] < x) left = mid + 1;
		else right = mid - 1;
	}
	return false;
}

int main()
{
	vector<int> vec(19);
	int cnt = 0;
	for (auto& x : vec) x = cnt++;
	int n;
	cnt = 0;
	while (cin >> n){
		for (int i = 0; i < 10; i++){
			for (int j = 0; j < 10; j++){
				if (binary_search(vec, n - i - j)){
					if (n - i - j < 10) cnt += n - i - j + 1;
					else cnt += 19 - n + i + j;
				}
			}
		}
		cout << cnt << "\n";
		cnt = 0;
	}
	cout.flush();
}

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

int main() {
  int a, b, c, d;
  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++) {
          int tmp = n - (a + b + c);
          for (int d = 0; d <= 9; d++) {
            if (tmp == d) {
              ans++;
            }
          }
        }
      }
    }
    cout << ans << endl;
  }
}

C++: #include <iostream>

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

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>

using namespace std;

int calc(int i, int count,int sum){
	if (count == 0){
		if (sum == i){
			return 1;
		}
		else{
			return 0;
		}
	}
	else{
		int count2 = 0;
		for (int j = 0; j < 10; j++){
			count2+=calc(i, count - 1, sum + j);
		}
		return count2;
	}

}

int main(){
	int i;
	while (cin >> i){
		cout << calc(i, 4, 0) << endl;
	}
	return 0;
}

C++: using System;

class aoj
{
	static void Main()
	{
		int[] ans = new int[50];
		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++)
					{
						ans[i + j + k +l] += 1;	
					}
				}
			}
		}

		while (true)
		{
			string input = Console.ReadLine();
			if (input == null) { break; }

			int inputNumber = int.Parse(input);
			Console.WriteLine(ans[inputNumber]);
		}
	}
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, total;

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

C++: #include<iostream>

int main(){
	int a,b,c,d,i,n;
	
	i=0;
	while(std::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){
						i++;
						}
					}
				}
			}
		}
	std::cout<<i<<std::endl;
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
//ranker
using namespace std;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;


int main(){
    int n, ans;

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