Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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++: #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++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <stdint.h>
using namespace std;

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

  return 0;
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	for(int i = 0; i < 1000; i++){
		a[i] = 1;
	}
	while(cin >> n){
		if(n > 36 || n < 0){
			a[t] = 0;
		}
		else if(n > 18){
			n = 36-n;
		}
		for(int i = n+3; i > n; i--){
			a[t] = a[t]*i;
		}
		a[t] = a[t]/6;
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i] << endl;
	}
}

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

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

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

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	while(cin >> n){
	
	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 == n){
						ans++;
					}
				}
			}
		}
	}
	
	cout << ans << endl;
	
	}
	
	return 0;
}

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

int main(){
  int memo[51] = {0};
  for(int i = 0; i < 10; i++)
    for(int j = 0; j < 10; j++)
      memo[i + j]++;
  int n;
  while(cin >> n){
    int res = 0;
    for(int i = 0; i <= n; i++)
      res += memo[i] * memo[n - i];
    cout << res << endl;
  }
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.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();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//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())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

int main(){
	while(!cin.eof()){
		int ret=0;
		int n;
		cin >> n;
		REP(i,10){
			REP(j,10){
				REP(k,10){
					REP(l,10){
						if(i+j+k+l==n)ret++;
					}
				}
			}
		}
		cout<<ret<<endl;
	}

	return 0;
}

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

using namespace std;

int main(){
 	
  int c,n,i,j,k,l;
  while(cin>>n){
    c=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(n<i+j+k+l)break;
	    if(n==(i+j+k+l))c++; 
	   
	  }
	}
      }
    }
    
    cout<<c<<endl;
  } 
  return 0;
}

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

#define REP(i, n) for(int i = (0); i < (n); ++i)

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

C++: #include<iostream>

int main( void )
{
	int n, count;

	while( std::cin >> n ){
		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( n == a + b + c + d ){
							count++;
							break;
						}
					}
				}
			}
		}

		std::cout << count << std::endl;
	}

	return 0;
}

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

int main(){
	int 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 << "\n";
}
	return 0;
	
}

C++: #include<stdio.h>

int main(){
    int i,a,b,c,d,n;
    int stack[50],sp=0;
    while(scanf("%d",&stack[sp++])!=EOF);
    for(i=0;i<sp-1;i++){
        n=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(stack[i]==a+b+c+d)n++;
        printf("%d\n",n);
    }
    return 0;
}

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

int main(){
 int n;
 int ans = 0;
 while(true){
 scanf("%d\n",&n);
 if(n == EOF) break;
 ans = 0;
 for(int a = 9;a >= 0;a--){
   for(int b = 9;b >= 0;b--){
     for(int c = 9;c >= 0;c--){
       for(int d = 9;d >= 0;d--){
        if(a+b+c+d == n){ans++; break;}
        if(a+b+c+d < n) break;
       }
     }
   }
 }
 printf("%d\n",ans);
 }
}

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

int main(){

  int n;
  int comb[4][51] = {0};

  for(int i=0; i<10; i++){
    comb[0][i] = 1;
  }

  for(int i=1; i<4; i++){
    for(int j=0; j<9*i+10; j++){
      for(int k=0; k<10; k++){
        if(j-k>=0){
          comb[i][j] += comb[i-1][j-k];
        }
      }
    }
  }

/*  for(int i=0; i<4; i++){
    for(int j=0; j<51; j++){
      cout << comb[i][j] << " ";
    }
    cout << endl;
  }
*/

  while(cin >> n){
    cout << comb[3][n] << endl;
  }

  return 0;
}