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 <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>


/*
	HOME-  Volume0-0008
	Submit Statistics
	 
	PCK 2003
	Sum of 4 Integers
	Time Limit : 1 sec, Memory Limit : 32768 KB
	English version is here

	Sum of 4 Integers

	50 ÈºÌ³Ì® n ðüÍµA0 ` 9 ÌÍÍÌ® a, b, c, d ÌgÅ

	        a + b + c + d = n

	ð½·àÌÌgÝí¹ðoÍ·évOðì¬µÄº³¢B

	á¦ÎAn ª 35 ÌÆ«A(a, b, c, d) Í (8,9,9,9)A(9,8,9,9)A(9,9,8,9)A(9,9,9,8) Ì 4 ÊèÅ·ÌÅA¦Í 4 ÆÈèÜ·B
	Input

	¡Ìf[^Zbgª^¦çêÜ·Bef[^ZbgÉ n ªPsÉ^¦çêÜ·BüÍÌÅãÜÅµÄº³¢B
	Output

	ef[^Zbg²ÆÉAa, b, c, d ÌgÝí¹ÂðPsÉoÍµÄº³¢B
	Sample Input

	35
	1

	Output for the Sample Input

	4
	4
*/

using namespace std;


int main()
{
	string s;
	
	while (getline(cin, s))
	{
		int n;
		sscanf(s.c_str(), "%ld", &n);
		
		int x = 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))
			{
				x++;
			}
		}
		
		printf("%d\n", x);
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n, result = 0;

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

					}	
				}	
			}
		}
		cout << result << endl;
	}

	return 0;
}

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <complex>
#include <math.h>
using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<long, long> PLL;
typedef long long LL;
//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#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())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(long i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

const long double EPS = 1e-12;
const double INF = 1e12;

LL gcd(LL a,LL b){
	if(b==0)return a;
	return gcd(b,a%b);
}

int main(){
	int n;
	while(cin>>n){
		long cnt=0;
		REP(a,10)REP(b,10)REP(c,10)REP(d,10)if(a+b+c+d==n)cnt++;
		cout<<cnt<<endl;
	}
	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int n;
	int a,b,c,d;
	int count;
		
	scanf("%d", &n);
	
	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++;
					}
				}
			}
		}
	}
	
	printf("%d\n", count);
	
	return (0);
}

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

int main(){
	int ans,a,b,c,d,n;

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

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

int a,b,x;

int mySet(int d){
  for(int i=0;i<10;i++){
    if(d<3){
      mySet(d+1);
    }else if(d==3){
      if(a==x){
      b++;
      }
    }
    a++;
  }
  return a=a-10;
}

int main(void){
  cin>>x;
  mySet(0);
  cout<<b<<endl;
  return 0;
}

C++: #include <cstdio>
#include <cstdlib>

using namespace std;

int hasil,input; 

int main()
{
	while(scanf("%d",&input) != EOF)
	{	
	hasil=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(input==a+b+c+d)
					{
						hasil++;
					}
				}
			}
		}
	}
	printf("%d\n",hasil);
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define loop(i, a, b) for(int i = a; i < b; i++) 
#define rep(i, a) loop(i, 0, a)
using namespace std;
const int MOD = 1000000007;
const int inf = 1e8;
using vi = vector <int>;
using vvi = vector <vi>;
using vc = vector <char>;
using vvc = vector <vc>;
using vs = vector <string>;
using vvs = vector <vs>;
//g++ -std==c++14
//setprecision(10)
int n, ans;

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

C++: /*http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0008&lang=jp*/

#include <iostream>

using namespace std;

int main(){
    int n;

    while(cin >> n) {
        int r = 0;
        for (int i = 0; i < n + 1 && i < 10; ++i) {
            for (int j = 0; i + j < n + 1 && j < 10; ++j) {
                for (int k = 0; i + j + k < n + 1 && k < 10; ++k) {
                    if (n < i + j + k + 10) {
                        r++;
                    }
                }
            }
        }
        cout << r << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <math.h>
#include <string>

int main(void);
int combination(int n);
bool combination_sub();

int main(){
	int n;				//入力されるデータセット
	int cnt = 0;		//データセット入力カウント
	int result[50];		//組み合わせ個数を格納する配列

	while (std::cin >> n){
	//while (cnt < 2){
		//std::cin >> n;
		result[cnt] = combination(n);
		cnt++;
	}

	for (int i = 0; i < cnt; i++){
		std::cout << result[i] << std::endl;
	}

	//while (1);
	return 0;
}

int combination(int n){
	int rtn = 0;
	
	//全部同じ場合
	for (int x = 0; x <= 9; x++){
		if (x * 4 == n){
			rtn++;
		}
	}

	//「全部同じ」以外の場合
	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) && (a == c) && (a == d))){
						if ((a + b + c + d) == n){
							rtn++;
						}
					}
				}
			}
		}
	}

	return rtn;
}

C++: #include<iostream>

int main()
{
	int n, count{};
	while (std::cin >> n)
	{
		count = 0;
		for (int a = 0; a < 10 && a <= n; ++a)
		{
			if (a + 27 < n) continue;
			for (int b = 0; b < 10 && a + b <= n; ++b)
			{
				if (a + b + 18 < n) continue;
				for (int c = 0; c < 10 && a + b + c <= n; ++c)
				{
					if (a + b + c + 9 < n) continue;
					count++;
				}
			}
		}
		std::cout << count << std::endl;
	}
	return 0;
}