Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                cnt := 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 a+b+c+d == n {
                                                        cnt++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

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

#define reps(v, f, l) for (int v = (f), v##_ = (l); v < v##_; ++v)
#define rep(v, n) reps(v, 0, n)
#define lep(v, n) reps(v, 1, n + 1)
#define rreps(v, f, l) for (int v = (l), v##_ = (f); v >= v##_; --v)
#define rrep(v, n) rreps(v, 0, n - 1)
#define rlep(v, n) rreps(v, 1, n)
#define show_a(a, size) rep(a##_it, size) std::cout << a[a##_it] << " \n"[a##_it == a##_it_ - 1];
#define show_v(v) show_a(v, v.size())
#define debug(x) std::cerr << #x << " = " << (x) << "\n";

using namespace std;

typedef long long int lint;

static inline int in(){ int x; scanf("%d", &x); return x; }
static inline lint inl(){ lint x; scanf("%lld", &x); return x; }

int main()
{
  int dp[5][99] = {};
  dp[0][0] = 1;
  lep(i, 4){
    rep(j, 99){
      rep(k, 10){
        if (j - k < 0) continue;
        dp[i][j] += dp[i - 1][j - k];
      }
    }
  }
  int n;
  while (~scanf("%d", &n)){
    printf("%d\n", dp[4][n]);
  }

  return 0;
}

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

int main(){
  int a,b,c,d,e,n,ans=0;
  while(cin >> n ){
  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;
        ans =0;
}
}

C++: #include <iostream>

int main() {
  int n;
  
  while(std::cin >> n) {
    int result = 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) {
              ++result;
            }

          }
        }
      }
    }

    std::cout << result << std::endl;
  }
}

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

#define add push_back
#define inf 2147000000

#define rep(i,n) for(int i=0;i<n;i++)
#define deb(a) cout<<a<<endl
#define out(a) cout<<a<<endl;

using namespace std;

int main(void){
	int a;
	int cont;
	while(scanf("%d",&a)!=EOF){
		cont=0;
	rep(i,10)rep(j,10)rep(k,10)rep(l,10){
		if(i+j+k+l == a){
			cont++;
		}
	}
	cout<<cont<<endl;
	}
}

C++: #include <list>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
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 vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-12;
const double PI = acos(-1.0);

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

	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,i=0,j;
	int kai[1000]={0},atai[1000];
	while(kai[0] ==0)
	{
		scanf("%d",&atai[i]);
		
		if(atai[i]<0 || 50<atai[i])break;

		i=i+1;
	}
	
	for(j=0;j<i;j++)
	{
		for(a=0;a<10;a++)
		{
			if(a>atai[j])break;
			for(b=0;b<10;b++)
			{
				if(a+b > atai[j])break;
				for(c=0;c<10;c++)
				{
					if(a+b+c>atai[j])break;
					for(d=0;d<10;d++)
					{
						if(a+b+c+d == atai[j])
						{
							kai[j]=kai[j]+1;
						}
						else if(a+b+c+d>atai[j])break;
					}
				}
			}
		}
	  printf("%d\n",kai[j]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int seach(int n,int m){
	if(m==4){
		return (n==0);
	}
	else{
	int res=0;
	for(int i=0;i<10;i++){
		res+=seach(n-i,m+1);
	}
	return res;
}
}

int main() {
	int n;
	while(cin >> n)
	cout << seach(n,0) << endl;
	return 0;
}

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 + 9] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i + 8] * 3 + (v[i + 8] - g[i + 8]);
    }
    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 k,n;
	while(cin>>n){
		k=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)k++;
						}
					}
				}
			}
		cout<<k<<endl;
	}
	return 0;
	}

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

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

C++: #include <cstdio>

using namespace std;

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

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

int main(void){
  int dp[50][4];
  for(int i = 0; i < 50; i++){
    for(int j = 0; i < 4; j++){
      if(i < 10 && j = 0)
	dp[i][j] = 1;
      else
	dp[i][j] = 0;
    }
  }
  
  for(int i = 1; i < 4; i++){
    for(int j = 0; j < 10; j++){
      for(int k = 0; k < 36; k++){
	if(k - j >= 0){
	  dp[k][i] += dp[k - j][i - 1];
	}
      }
    }
  }
  
  int n;
  while(cin >> n){
    cout << dp[n][3] << endl;
  }
  return 0;
}

C++: #include<stdio.h>
#include<math.h>
#include<string.h>
int main()
{   
    int x;
    int i;
    int a, b, c, d;
    while (scanf("%d", &x) != EOF) {
        i = 0;
        a = 9;
        b = 9;
        c = 9;
        d = 9;
        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) == x) {
                            i += 1;
                        }
                    }
                }
            }
        }
        printf("%d\n", i);
    }
    return 0;
}

C++: #include<iostream>

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

	std::cin>>n;

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

	std::cout<<ans;
	return 0;
}