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 "bits/stdc++.h"
using namespace std;

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

C++: #include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <iomanip>
#include <string>
#include <cmath>
#define PI 3.14159265359
using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
	int n;
	while(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 q=0;q<10;q++)
						if(i + j + k + q == n)
							cnt++;
							
						
		cout<<cnt<<endl;
	}
}

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

#define REP(i,n) for(int i=0;i<n;++i)
#define rep(n) REP(i,n)


int main()
{
	int n; 
	while(cin>>n)
	{
		int ans=0;

		REP(i,10) REP(j,10) REP(k,10)
		{
			if( (i+j+k)<n && (i+j+k)+9>=n ) ++ans;
		}

		cout<<ans<<endl;
	}

	return 0;
}

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

int main(){
	int n,num = 0;
	cin >> n;
	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){
						++num;
						break;
					}
				}
			}
		}
	}
	cout << num << '\n';
	return 0;
}

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

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

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  int n;
  while(cin >> n){
    int res = 0;
    rep(i, 10){
      rep(j, 10){
        rep(k, 10){
          rep(l, 10){
            if(i + j + k + l == n)res++;
          }
        }
      }
    }
    cout << res << endl;
  }
	return 0;
}

C++: V#include<iostream>

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

C++: #include<stdio.h>
#include<math.h>

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

			if (n - a>27)continue;

			for (b = a; b < 10; b++)
			{
				if (n - a - b > 18)continue;

				for (c = b; c < 10; c++)
				{
					if (n - a - b - c > 9)continue;

					for (d = c; d < 10; d++)
					{

						if (a + b + c + d == n)
						{
							if ((a == b) && (a == c) && (a == d))cnt++;
							else if (((a == b) && (b == c)) | ((b == c) && (c == d)))cnt += 4;
							else if ((a == b) && (c == d))cnt += 6;
							else if ((a == b) | (b == c) | (c == d))cnt += 12;
							else cnt += 24;
						}
					}
				}
			}
		}

		printf("%d\n", cnt);
	}
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
for(){
ans=0;
cin>>x;
if(x=<0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
ans++;
}
}
}
}
cout<<ans;
}
return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a, b;
	while (cin >> a ) {
		b = 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){
								b = b + 1;
						}
					}
				}
			}
		}
		cout << b << endl;
	}
}

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

C++: #include<bits/stdc++.h>
#define loop(i, a, b) for(int i = a; i < b; i++) 
#define rep(i, a) loop(i, 0, a)
using namespace std;
const int MOD = 1000000007;
const int inf = 1e8;
using vi = vector <int>;
using vvi = vector <vi>;
using vc = vector <char>;
using vvc = vector <vc>;
using vs = vector <string>;
using vvs = vector <vs>;
//g++ -std==c++14
//setprecision(10)
int n, ans;

int main(){
    while(cin >> n){
        ans = 0;
        rep(i, 10)rep(j, 10)rep(k, 10)rep(l, 10)if(i + j + k + l == n)ans++;
        cout << ans << endl;
    }
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstdio>
#include <cmath>
#include <stdint.h>
using namespace std;

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

  return 0;
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	for(int i = 0; i < 1000; i++){
		a[i] = 1;
	}
	while(cin >> n){
		if(n > 36 || n < 0){
			a[t] = 0;
		}
		else if(n > 18){
			n = 36-n;
		}
		for(int i = n+3; i > n; i--){
			a[t] = a[t]*i;
		}
		a[t] = a[t]/6;
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i] << endl;
	}
}

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

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