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"
using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> veci;
typedef vector<ll> vecll;
typedef vector<string> vecs;
template<class T,class U> using Hash=unordered_map<T,U>;

#define REP(i, a, n) for(ll i = a; i < (ll)n; i++)
#define RREP(i, a, n) for(ll i = n-1; i >= (ll)a; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define MD 1000000007

template<class T> T read(){T a;cin >> a;return a;}
template<class T> void read(T& a){cin >> a;}
template<class T, class ...Args> void read(T& a, Args&... args){cin >> a; read(args...);} 
template<class T> void rarr(T a, int n){for(int i = 0; i < n; i++) {cin >> a[i];}}
template<char c = ' ',class T> void write(T a){cout << fixed << setprecision(4) << a << endl;}
template<char c = ' ',class T,class ...Args> void write(T a, Args... args){cout << fixed << setprecision(4) << a << c; write<c>(args...);}
template<class T> void warr(vector<T> a, const char* c = " "){cout << a[0];for(int i = 1; i < (int)a.size(); i++)cout << c << a[i];cout << endl;;}
template<class T> void warr(T a, int n, const char* c = " "){cout << a[0];for(int i = 1; i < n; i++)cout << c << a[i];cout << endl;}
void split(string s, string delim, veci& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(atoi(s.substr(pos).data()));break;}else {result.push_back(atoi(s.substr(pos, p - pos).data()));}pos = p + delim.size();}}
void split(string s, string delim, vecs& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(s.substr(pos));break;}else {result.push_back(s.substr(pos, p - pos));}pos = p + delim.size();}}
ull gcd(ull a, ull b){while(true){ull k = a % b;if(k == 0)return b;a = b;b = k;}}
ull comb(ull n, ull m){ull p=1;m=min(m,n-m);for(ull i=1;i<=m;i++){p*=n-i+1;p/=i;}return p;}

int main(void)
{
    int dp[5][100]={0};
    dp[0][0]=1;
    rep(i,4){
        rep(j,10){
            rrep(k,55){
                dp[i+1][k+j]+=dp[i][k];
            }
        }
    }
    while(!cin.eof()){
        string n;
        cin>>n;
        if(n=="")break;
        write(dp[4][atoi(n.c_str())]);
    }
    return 0;
}

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>
#include <iterator>
using namespace std;

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

#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i, a, cont, next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i, a, b, step) repfn(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 main(int argc, char **argv)
{
  int n;
  vi v;
  using ti4 = tuple<int, int, int, int>;
  set<ti4> accm;

  while (cin >> n) {
    repab (a, 0, 10) {
      repab (b, a, 10) {
        repab (c, b, 10) {
          repab (d, c, 10) {
            if (a + b + c + d == n) {
              accm.insert(ti4(a, b, c, d));
            }
          }
        }
      }
    }
  }
  return 0;
}

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

using namespace std;

int solve(const int n) {
	set< vector<int> > s;

	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) {
						s.insert({ a,b,c,d });
						break;
					}
	return s.size();
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while (cin) {
		int n;
		cin >> n;
		cout << solve(n) << endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;


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

	while (cin >> 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++;
					}
				}
			}
		}

		cout << count << endl;
	}
}

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

int main(){
	int n, a, b, c, d, t;
	while( cin >> n){
		t = 0;
		for(a = 0; a < 10; ++a){
			if( a > n ) break;
			for(b = 0; b < 10; ++b){
				if (a + b > n) break;
				for(c = 0; c < 10; ++c){
					if (a + b + c > n) break;
					d = n - ( a + b + c );
					if( 0 <= d && d <= 9)
						++t;
				}
			}
		}
		cout << t << "\n";
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int a[10001];
int main()
{
	int n,m,i,j,k,p,l=1,s=0;
	for(i=0;i<=9;i++)
	{
		for(k=0;k<=9;k++)
	    {
	    	for(j=0;j<=9;j++)
	        {
	        	for(p=0;p<=9;p++)
	            {
		             a[l]=i+k+j+p;
		             l++;
	            }
		
	        }
	    }
	}
	while(cin>>n)
	{
		s=0;
		for(i=1;i<=10000;i++)
		{
			if(a[i]==n)s++;
		}
		cout<<s<<endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    int a=0,b=0,c=0,d=0;
    int num;
    while(cin>>num)
    {
        int n=0;
       // int min=num/4;
        for(a=0;a<10&&a<=num;a++){
            for(b=0;b<10&&a<=num;b++){
                for(c=0;c<10&&a<=num;c++){
                    for(d=0;d<10&&a<=num;d++){
                        if(a+b+c+d==num){
                            n++;
                        }
                    }
                }
            }
        }
        cout<<n<<endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int d;
	int ans;
	while (cin >> d) {
		ans = 0;
		for (size_t a = 0; a < 10; a++)
		{
			for (size_t b = 0; b < 10; b++)
			{
				for (size_t c = 0; c < 10; c++)
				{
					for (size_t e = 0; e < 10; e++)
					{
						if (a + b + c + e == d) { ans++; }
					}
				}
			}
		}
		cout << ans << endl;
	}
	return 0;
}

C++: #include <iostream>

int main(){
	int n;
	
	while(std::cin >> n){
		int count = 0;
		for(int a = 0; a < 10; ++a){
			for(int b = 0; a < 10; ++b){
				for(int c = 0; a < 10; ++c){
					for(int d = 0; a < 10; ++d){
						if(a + b + c + d == n){
							++count;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int a,b,c,d;

int main(){
    int input;
    while (cin >> input) {
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){
                        count+=a+b+c+d==input;
                    }
                }
            }
        }
        cout << count << endl;
    }
}