Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		// 37以上のとき組み合わせは存在しないが省くのめんどくさいのでまとめて計算
		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{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

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

void calc(std::vector<int> &v) {
    std::vector<int> g(10, 0);
    for (int i = 1; i <= 9; i++) {
        v[i] = 4 * i; 
    }
    for (int i = 0; i <= 9; i++) {
        g[i] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i] * 3 + (v[i + 8] - g[i - 1]);
    }
    return; 
}

int main(void) {
    std::vector<int> v(19, 0);
    calc(v);
    int total;

    while (std::cin >> total) {
        if (total > 36) {
            std::cout << 0 << std::endl;
        } else if (total > 18){
            total = 36 - total; 
            std::cout << v[total] << std::endl;
        } else {
            std::cout << v[total] << std::endl;
        }
    }
    return 0;
}

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

int main(){
	int n;
	int count;

	while (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 (a + b + c + d == n)count++;
					}
				}
			}
		}
		
		cout << count << endl;
	
	}

	return 0;
}

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>
#include <iomanip>


using namespace std;

typedef unsigned long long ull;
int main(void) {
	int n, res = 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(a + b + c + d == n)res++;
	}	
	}	
	}	
	}
	cout << res << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#ifndef typeof
#define typeof __typeof__
#endif // typeof

#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(typeof((c).begin()) i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(typeof((c).rbegin()) i = (c).rbegin(); i != (c).rend(); i++)
#define repby(i, a, b, step) for(typeof(b) i = (a); i < (b); i += (step))
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

int nsums(int n, int x)
{
  int res = 0;

  for (int a = 0; a < x; a++) {
    for (int b = a; b < x; b++) {
      for (int c = b; c < x; c++) {
        for (int d = c; d < x; d++) {
          if (a + b + c + d == n) {
            vi v;
            v.pb(a); v.pb(b); v.pb(c); v.pb(d);
            do {
              res++;
            } while (next_permutation(all(v)));
          }
        }
      }
    }
  }
  return res;
}

int main(int argc, char **argv)
{
  int n;

  while (cin >> n) {
    cout << nsums(n, 10) << endl;
  }

  return 0;
}

C++: #include <iostream>
using namespace std;
int solve(int n){
    int ans=0;
    for(int i=0;i<10;i++){
        for(int j=0;j<10;j++){
            for(int k=0;k<10;k++){
                if(n-i-j-k>-1&&n-i-j-k<10)ans++;
            }
        }
    }
    return ans;
}
int main(){
    int n;
    while(cin>>n){
        cout<<solve(n)<<endl;
    }
    return 0;
}

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

int main(){

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


  return 0;
}

C++: #include <iostream>

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

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

int main(){

  int n,count=0;

  while(cin >> n){

    count=0;

    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	for(int s=0;s<10;s++){
	  for(int t=0;t<10;t++){
	    if(i+j+s+t==n) count++;
	  }
	}
      }
    }

    cout << count << endl;
  }
}

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

int main()
{
int n;
while(cin>>n){
int res=0;
for(int n1=0;n1<=9;n1++)
for(int n2=0;n2<=9;n2++)
for(int n3=0;n3<=9;n3++)
for(int n4=0;n4<=9;n4++)
if(n1+n2+n3+n4==n) res++;
cout<<res<<endl;
}
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define _CRT_SECURE_NO_WARNINGS
#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

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

C++: #include<bits/stdc++.h>
using namespace std;
int n,cnt;
void sach(int x,int sum){
  if(x==4){
    if(sum==n) cnt++;
    return;
  }
  for(int i=0;i<10;++i) sach(x+1,sum+i);
}
int main(){
  while(cin>>n){
    cnt=0;
    sach(0,0);
    cout<<cnt<<endl;
  }
  return 0;
}

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

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

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

int main() {
	int n, t = 0;
	cin >> n;
	for(int i = 1;i < 10;++i){
     	for(int o = 1;o < 10;++o){
     		for(int p = 1;p < 10;++p){
     		   for(int l = 1;l < 10;++l){
     		   	 if(i + o + p + l == n)
     		   	   t++;
     		   }
     		}
     	    }
	}
	cout << t << endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n, a, b, c, d, count,p[1000],l=0;
	while (cin >> n){
		count=0;
		for (a = 0; a < 10; a++){
			if (n - a >= 27){
				for (b = 0; b < 18; b++){
					if (n - a - b >= 18){
						for (c = 0; c < 9; c++){
							if (n - a - b - c >= 9){
								for (d = 0; d < 9; d++){
									if (n - a - b - c - d == 0)
										count++;
								}
							}
						}
					}
				}
			}
		}
		p[l] = count;
		l++;
	}
	for (int m = 0; m < l; m++)
		cout << p[m] << endl;
}