Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

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;
}

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

int main(void){
	int n,a,b,c,d,count=0;
	scanf("%d",&n);
	for(a=1;a<=n;a++){
		for(b=1;b<=n;b++){
			for(c=1;c<=n;c++){
				for(d=1;d<=n;d++){
					if((a+b+c+d)==n){
						count++;
					}
				}
			}
		}
	}
	printf("%d\n",count);
}

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

int main() {
  unsigned int input;
  unsigned int count=0;
  cin >> input;

  for(int a0=0; a0<10; a0++) {
    for(int a1=a0; a1<10; a1++) {
      for(int a2=a1; a2<10; a2++ ) {
        for(int a3=a2; a3<10; a3++) {
          if(a0+a1+a2+a3==input) {
            count++;
          }
        }
      }
    }
  }
  cout << count << endl;

  return 0;
}

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

int main(){
	int sum = 0;
	int n;
	while(scanf("%d", &n)>0){
		sum = 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) sum++;
					}
				}
			}
		}
		printf("%d\n", sum);
	}

	return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int n;
	int i, j, k, l;
	int ans;
		
	while(scanf("%d", &n) != EOF){
		ans = 0;
			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 == n){ ans += 1; }
						}
					}
				}
			}
			
			printf("%d\n", ans);
		}
		return 0;
}

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