Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

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;
#define RENT 100000
int main(){
	int n;
	while(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++){
						if(a+b+c+d==n)ans++;
					}
				}
			}
		}
		
		cout<<ans<<endl;
	}
}

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

int a,b,x;

int mySet(int d){
  for(int i=0;i<10;i++){
    if(d<3){
      mySet(d+1);
    }else if(d==3){
      if(a==x){
      b++;
      }
    }
    a++;
  }
  return a=a-10;
}

int main(void){
  while(scanf("%d",&x)!=EOF){
  mySet(0);
  cout<<b<<endl;
  return 0;
  }
}

C++: #include<iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
int main(){
	int n,ans;
	while(cin>>n){
		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<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int count=0;
	int n;
	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 x=0;x<10;x++){
					if(i+j+k+x==n)count++;
				}
			}
		}
	}
		cout<<count<<endl;
	}
			
	return 0;
	}

C++: #include <iostream>
using namespace std;
int main(void)
{
  int n;
  int a, b, c, d;
  int com;

  while(1)
    {
      cin >> n;
      if(n == EOF) break;
      com = 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(n == a + b + c + d) com++;
		    }
		}
	    }
	}
      cout << com << endl;;
    }
  return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N;
	while(cin>>N){
		int num=0;
		for(int a=0,ea=min(9,N);a<=ea;a++){
			for(int b=0,eb=min(9,N);b<=eb;b++){
				for(int c=0,ec=min(9,N);c<=ec;c++){
					int d=N-a-b-c;
					if(0<=d && d<=9) num++;
				}
			}
		}
		out(num);
	}

	return 0;
}

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

	return 0;
}

C++: #include <iostream>

using namespace std;
int countSolve(int a,int b,int n);
void solve(int n);

int main() {
	int n;
	while (1) {
		cin >> n ;
		solve(n);
	}
	return 0;
}

int countSolve(int a, int b, int n) {
	int x = n-a-b;
	int count = 0, i = 0 , j=0;
	for (i=0; i<10; i++) {
		for (j=0; j<10; j++) {
			if (x == i+j)
				count++;
		}
	 }
	return count;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			count += countSolve(a,b,n);
		}
	}
	cout << count << endl;
}

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++) {
          if (0 <= n - i - j - k && n - i - j - k < 10) cnt++;
        }
      }
    }
    cout << cnt << endl;
}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0;
    int n[];
    while( true ){
    

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

    printf( "%d\n",nCount );
    }
    return 0;
}

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

int main() {
	int n;
	while (cin >> n) {
		int num = 0;
		if (n > 36) {
			cout << "0" << endl;
		}
		else {
			for (int i = 0; i < 10; i++) {
				if (i > n) {
					break;
				}
				for (int j = 0; j < 10; j++) {
					if (i + j > n) {
						break;
					}
					for (int k = 0; k < 10; k++) {
						if (i + j + k > n) {
							break;
						}
						for (int l = 0; l < 10; l++) {
							if (i + j + k + l > n) {
								break;
							}
							if (i + j + k + l == n) {
								num++;
							}
						}
					}
				}
			}
			cout << num << endl;
		}
	}
	return 0;
}

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

int main()
{
    int i,j,k,l,n,counter;
    while(cin>>n)
    {
        counter=0;
        if(n<37)
        {
            for(i=0;i<=9;i++)
                for(j=0;j<=9;j++)
                  for(k=0;k<=9;k++)
                    for(l=0;l<=9;l++)
            {
                if(i+j+k+l==n)
                    counter++;
            }
        }
        cout<<counter<<endl;
    }


    return 0;
}

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

int cnt=0;
int n;

int forf(int t,int ti){
    if(ti<4){
        for(int i=0;i<10;i++){
            forf(t+i,ti+1);
        }
    }else if(t==n)cnt++;
    return 0;
}

int main(){
    while(scanf(" %d",&n)){
        cnt=0;
        forf(0,0);
        cout << cnt << endl;
    }
    return 0;
}

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

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

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

int Permutation(int a, int b, int c, int d)
{
	if(a==d)
		return 1;
	else if(a==c || b==d)
		return 4;
	else if(a==b || b==c || c==d)
		return 12;
	else
		return 24;
}

int main()
{
	int n;
	while(cin>>n)
	{
		int count=0;
		if(9+9+9+9 < n)
				break;
		for(int i=0; i<10; ++i)
		{
			if(i+9+9+9 < n)
					continue;
			for(int j=i; j<10; ++j)
			{
				if(i+j+9+9 < n)
						continue;
				for(int k=j; k<10; ++k)
				{
					if(i+j+k+9 < n)
							continue;
					for(int l=k; l<10; ++l)
					{
						if(i+j+k+l == n)
						{
							count+=Permutation(i,j,k,l);
							break;
						}
					}
					if(i+j+k > n)
						break;
				}
				if(i+j > n)
					break;
			}
			if(i > n)
				break;
		}
		cout << count << '\n';
	}
}