Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

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++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n[50];
    int comb[50];
    int m = 0;
    while (cin >> n[m]) {
        if(n[m] <= 18){
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else if(n[m] <= 36){
            n[m] = 36 - n[m];
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 10; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else{
            comb[m] = 0;
        }
        m++;
    }
    
    for (int i = 0; i < m; i++) {
        printf("%d\n", comb[i]);
    }
    printf("\n");
    
    return 0;
}

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

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	int out=0;
	while(cin>>in){
	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==in){
					out++;	
					}	
				}
			}
		}
	}
	}
	cout <<out;
	
	return 0;
}

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

using namespace std;

int n,ans;
int a[4];

int main(){
	while(cin >> n){
		ans = 0;
		for(a[0]=0;a[0]<10;a[0]++){
			for(a[1]=0;a[1]<10;a[1]++){
				for(a[2]=0;a[2]<10;a[2]++){
					for(a[3]=0;a[3]<10;a[3]++){
						if(a[0]+a[1]+a[2]+a[3] == n){
							ans += 1;
							break;
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
	return 0;
}

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

C++: /*-*-coding:utf-8-*-*/
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <iterator>
#include <cmath>
#include <stack>
#include <functional>
#include <iomanip>
using namespace std;

int main()
{
  int n;
  
  while(cin >> n, !cin.eof()) {
    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(n == i + j + k + l) ans++;
	  }
	}
      }
    }
    cout << ans << endl;
  }

  return 0;
}

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

using namespace std;

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

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

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


        while(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 << endl;
        }
}

C++: #include<stdio.h>

int main(void)
{
	int i, j, k, l;
	int a, cont = 0;
	scanf("%d",&a);
	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 == a){
						cont++;
					}
				}
			}
		}
	}
	printf("%d",cont);
	fflush(stdin);
	fflush(stdout);	
	return 0;
}

C++: /*****include*****/
#include <iostream>
#include <fstream>

/*****デバッグ定義*****/
//#define DEBUG
/*****マクロ定義*****/

/*****名前空間*****/
using namespace std;

/*****グローバル変数置き場*****/

/*****その他関数置き場*****/

/*****main関数*****/
int main(){
	/*****ファイルオープン*****/
#ifdef DEBUG
	ofstream fout("output.txt");
	ifstream fin("input.txt");
	if(!fout || !fin){
		cout << "Can't open the file.\n";
		return;
	}
#endif
	/*****変数置き場*****/
	int a,b,c,d,n;
	int num;
	/*****処理部*****/
	while(1){
		num = 0;
		cin >> n;
		for(a=0;a<=9;a++){
			for(b=0;b<=9;b++){
				for(c=0;c<=9;c++){
					d = n-a-b-c;
					if(d >= 0 && d <= 9){
						//cout << d << endl;
						num++;
					}
				}
			}
		}
		cout << num << endl;
	}
	/*****処理終了後*****/
#ifdef DEBUG
	fout.close();
	fin.close();
#endif
	return 0;
}

C++: #include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <string>
#include <functional>
#include <array>
#include <stack>
#include <queue>
#include <chrono>
#include <numeric>
#include <memory.h>
#include <map>
#include <math.h>


#pragma warning(disable:4996)
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
typedef long long Int;
const double PI = 3.141592653589793238;
const Int INF = 999999999999;
using namespace std;

int dx[4] = { 0, -1, 0, 1 };
int dy[4] = { 1, 0, -1, 0 };

int  dp[10000];

int main()
{
	REP(i, 10){
		REP(j, 10){
			REP(k, 10){
				REP(l, 10){
					dp[i * 1000 + j * 100 + k * 10 + l] = i + j + k + l;
				}
			}
		}
	}
	int n;
	while (cin >> n){
		cout << count_if(dp, dp + 10000, [n](int o){return o == n; }) << endl;
	}

	return 0;
}

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

long long int gcd(long long int l, long long int r) {
	assert(l > 0 && r > 0);
	if (l > r)return gcd(r, l);
	else {
		const long long int num = r%l;
		if (num) {
			return gcd(l, num);
		}
		else {
			return l;
		}
	}
}
long long int lca(long long int l, long long int r) {
	return l / gcd(l, r)*r;
}
int getans(const int num, const int rest) {
	if (rest) {
		int ans = 0;
		for (int i = 0; i <= 9; ++i) {
			if (num >= i) {
				ans += getans(num - i, rest - 1);
			}
		}
		return ans;
	}
	else {
		return num == 0;
	}
}
int main() {
	int N;
	while (cin >> N) {
		cout << getans(N, 4) << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	while(true){
		int count = 0;
		cin >> n;
		if(cin.eof()) return 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;
	}

	return 0;
}

C++: #include <cstdio>

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	int n;
	while(scanf("%d", &n) != EOF){
		if(n > 36){
			printf("0\n");
			continue;
		}
		int 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 == n)
							count ++;
		printf("%d\n", count);
	}

	return 0;
}