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>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>

#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl bool
#define nn printf("\n");
#define mod 1000000007

using namespace std;

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n = 0;
	while (cin >> n)
	{
		int a = 0, b = 0, c = 0, d = 0;
		int num = 0;

		rep(i, 10)
		{
			rep(j, 10)
			{
				rep(k, 10)
				{
					rep(l, 10)
					{
						if(i + j + k + l == n)
						{
							num += 1;
						}
					}
				}
			}
		}
		printf("%d\n", num);
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int n=0,cnt=0;
    cin >> n;
    for(int i=0;i<10;i++){
        for(int r=0;r<10;r++){
            for(int l=0;l<10;l++){
                for(int k=0;k<10;k++){
                    if(n==i+r+l+k)cnt++;
                }
            }
        }
    }
    cout << cnt;
    return 0;
}

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

int main () {

int n, count = 0;

while(cin >> n){

    for (int a = 0; a < 10 && a <= n; a++){
        for (int b = 0; b < 10 && b <= n-a; b++){
            for (int c = 0; c < 10 && c <= n-a-b; c++){
                if (n-a-b-c >=0 && n-a-b-c < 10) {
                    count++;
                }
            }
        }
    }


    cout << count << endl;

    count = 0;


}



    return 0;

}

C++: #include <iostream>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<map>
#include<algorithm>
#include<vector>
using namespace std;
map <int,int>mp;
void precalculation()
{
    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++){
                    mp[a+b+c+d]++;
                }
            }
        }
    }
}

int main()
{
    for(int i=0;i<=50;i++) mp[i]=0;
    precalculation();
    int n;
    while(scanf("%d",&n)==1){
        printf("%d\n",mp[n]);
    }
    return 0;
}

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

int cnt=0;
int n;

int forf(int t,int ti){
    if(t>n)return 0;
    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)){
        if(n>36){
            cout << '0' << endl;
        }else{
            cnt=0;
            forf(0,0);
            cout << cnt << endl;
        }
    }
    return 0;
}

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

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

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
 int n, a, b, c, d, count = 0;
 
 while(cin >> n){
  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) count++;
        }
      }
    }
  }
  cout << count << endl;
  count = 0;
 }

 return 0; 
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<int,int>
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)

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

C++: #include<stdio.h>
 
int main(){
    int a;
    while(~scanf("%d",&a)){
        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==a)ans++;
        printf("%d\n",ans);
    }
}

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

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

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

	while(scanf("%d", &n)){

	for(i=0, 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) i++;	
				}
			}
		}
	}

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

C++: #include<stdio.h>
#include<stdlib.h>
#include<math.h>
#include<iostream>
#include<string>
using namespace std;


int main() {

	int n;

	int min;
	int d;
	int count;
	while (cin >> n) {
		if (n < 9) {
			min = n;
		}
		else {
			min = 9;
		}
		count = 0;

		for (int i = 0; i <= min; i++) {
			for (int j = 0; j <= min; j++) {
				for (int k = 0; k <= min; k++) {
					d = n - i - j - k;
					if (d >= 0 && d <= 9) count++;

				}
			}
		}

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

	//system("pause");
	return 0;
}