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 <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(){
	int n;
	while(cin>>n){
		int ret=0;
		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 <bits/stdc++.h>
using namespace std;

using ll = long long;
#define debug(x) cerr << #x << ": " << x << endl;
#define line() cerr << "---------------" << endl;

int main() {
   while (1) {
      int n;
      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++;
                  }
               }

      cout << cnt << endl;
   }

   return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

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

C++: #include <stdio.h>

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

C++: #include <iostream>

using namespace std;

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

C++: #include<iostream>

using namespace std;

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

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

using namespace std;

int main(){
	int n, count;
	count = 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){
							count++;
						}
					}
				}
			}
		}
		cout << count << endl;
		count = 0;
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<ll> VL;
typedef vector<VL> VVL;
typedef pair<int, int> PII;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()
#define MP make_pair
#define PB push_back
#define MOD 1000000007
#define INF (1LL<<30)
#define LLINF (1LL<<60)
#define PI 3.14159265359
#define EPS 1e-12
#define int ll

signed main(void)
{
  int n, ret = 0;
  while(cin >> n) {
    ret = 0;
    REP(i1, 10) REP(i2, 10) REP(i3, 10) REP(i4, 10) {
      if(i1 + i2 + i3 + i4 == n) ++ret;
    }
    cout << ret << endl;
  }

  return 0;
}

C++: #include<cstdio>
int main(){
    int n;
    while(scanf("%d",&n)!=EOF){
        int x=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){
                            x++;
                        }
                    }
                }
            }
        }
        printf("%d\n",x);
    }

    return 0;
}

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

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

	while(cin){
		count=0;
		cin >> n;
		if(n>36){
			cout << "0" << endl;
			continue;
		}
		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(a+b+c+d==n) count++;
					}
				}
			}
		}
		cout << count << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
    int num;
    int count;
    while(cin >> num){
        count = 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(num == i + j + k + l) count++;
                    }
                }
            }
        }
        cout << count << "\n";
    }
    cout << endl;
    return 0;
}

C++: #include <stdio.h>

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