Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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

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


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

                cout << count << endl;
        }
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define BOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;

int main(){
    
    
    
    
    int n;
    while(cin>>n){
        int ans=0;
    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<stdio.h>
int main(){
  int a,b,c,d,n,z;
  z=0;
  scanf("%d",&n);
  if(n<=50){
    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){
            z++;
          }
          }
        }
      }
    }
    printf("%d\n",z);
  }
  return 0;
}

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

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

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