Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

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 <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, 0, 10) {
        repab (c, 0, 10) {
          repab (d, 0, 10) {
            if (a + b + c + d == n) {
              accm.insert(ti4(a, b, c, d));
            }
          }
        }
      }
    }
    cout << sz(accm) << endl;
    accm.clear();
  }
  return 0;
}

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

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

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define erep(i, n)    for(int (i)=1; (i)<=(n); (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

int n;
int res;

int main()
{

  while(cin >> n){
    erep(a,9) erep(b,9) erep(c,9) erep(d,9) if(a+b+c+d==n) res += 1;
    cout << res << endl;
  }

  return 0;
}

C++: #include <iostream>

using namespace std;

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

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

int main()
{
	int n;
	while(scanf("%d",&n) != EOF) {
		int cnt=0;
		for(int a=0;a<10;++a) {
			if(n-a>27) continue;
			for(int b=0;b<10;++b) {
				if(n-a-b>18) continue;
				for(int c=0;c<10;++c) {
					if(n-a-b-c>9) continue;
					for(int d=0;d<10;++d) {
						if(n == (a+b+c+d)) {
							++cnt;
						}
					}
				}
			}
		}
		printf("%d\n",cnt);
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int count(int []);
int fctr(int);

int main(void){
	int n,a[4],type;

	while(cin >> n){
		type=0;
		for(a[0]=9;a[0]>=0&&a[0]*4>=n;a[0]--)
			for(a[1]=a[0];a[1]>=0&&a[0]+a[1]*3>=n;a[1]--)
				for(a[2]=a[1];a[2]>=0&&a[0]+a[1]+a[2]*2>=n;a[2]--)
					for(a[3]=a[2];a[3]>=0;a[3]--)
						if(a[0]+a[1]+a[2]+a[3]==n){
							type+=count(a);
							continue;
						}
		cout << type << endl;
	}

	return 0;
}

int count(int a[]){
	int dpl=1;

	for(int i=0;i<3;i++)
		dpl+=(a[i]==a[i+1]);

	return dpl==3?(a[1]==a[2]?4:1):fctr(4)/fctr(dpl);
}

int fctr(int n){
	return n==1?1:n*fctr(n-1);
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int sum = 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){sum++;}
	  }
	}
      }
    }
    cout <<sum<<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, ans = 0;
	while(cin >> n){
		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>
using namespace std;

int main(){
  int n;
  while(cin >> n){
    int num=0;
    for(int i=0; i<=9; i++)
      for(int j=0; j<=9; j++)
	for(int k=0; k<=9; k++){
	  if((n-i-j-k)>=0 && (n-i-j-k)<=9)
	    num++;
	}
    cout << num << endl;
  }
  return 0;
}

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

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

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

int main(){
	int n;

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

	return 0;
}

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

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

int main(){
  int n, cnt;
  while(cin >> n){
    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<iostream>
using namespace std;

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

C++: #include <iostream>

int main() {
	int n;
	while( std::cin >> n ) {
		int ans = 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 )
						ans += (a+b+c+d==n)?1:0;
		std::cout << ans  << std::endl;
	}
}

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

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