Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		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{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define repn(i, n) for(int i = 1; i <= (int)n; ++i)
#define pb push_back
#define lb lower_bound
#define mp make_pair
#define ite iterator
#define max2(x, y) ((x) > (y)) ? (x) : (y)
#define max3(x,y,z) max2((x), max2((y),(z)))
#define max4(v,w,x,y) max2(max2((v),(w)), max2((x),(y)))
#define min2(x, y) ((x) > (y)) ? (y) : (x)
#define min3(x,y,z) min2((x), min2((y),(z)))
#define min4(v,w,x,y) min2(min2((v),(w)), min2((x),(y)))
#define ul unsigned long
#define ull unsigned long long
#define INF 1000000007
#define MOD 1000000007
#define fs first
#define sd second

template<typename T>
bool elem(set<T> st, T val){
	return (st.find(val) != st.end());
}

template<typename T>
void printv(vector<T> vt){
    rep(i, vt.size() - 1)
        cout << vt[i] << " ";
    cout << vt[vt.size() - 1] << endl;
}

typedef vector<int> vint;
typedef vector<ul> vul;
typedef vector<ull> vull;
typedef pair<int, int> pii;


int ans[51];
int main(void){
    int n;
    rep(i, 51) ans[i] = -1;
    while(cin >> n){
        int ret = 0;
        if(ans[n] >= 0){
            cout << ans[n] << endl;
            continue;
        }
        rep(a,10){
            rep(b,10){
                rep(c,10){
                    rep(d,10)
                        if(a+b+c+d==n) ret++;
                }
            }
        }
        cout << ret << endl;
        ans[n] = ret;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int counter=0;
for(int a=0;a<10;a++){
for(int b=0;b<10;b++){
for(int c=0;c<10;c++){
if(0<=n-a-b-c && n-a-b-c<=9){
counter++;
}
}
}
}
cout<<counter<<endl;
return 0;
}

C++: #include <iostream>
#include <functional>

using namespace std;


int count2=0;

void saiki(int a, int b,int n){
	
}

int main(){
	int n;
	int count2 = 0;
	

	function<int(int, int, int)> x = [=,&count2](int a, int b, int n)->int{
		if (b == 0){
			if (n == a)count2++;
		}
		else{
			for (int i = 0; i < 10; i++){
				saiki(a + i, b - 1, n);
			}
		}
	};

	
	while (cin >> n){
		x(0, 4, n);

		cout << count2 << endl;
	}
	return 0;
}

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

int main(){
  
  vector<int> count_array;
  int count;
  int in_num;
  int a,b,c,d,i=0;
  while(cin>>in_num){
    count=0;
    if(in_num>36)break;
    else{
      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)==in_num){
		count++;
	      }
	    }
	  }
	}
      }
      count_array.push_back(count);
      ++i;
    }
  }
  for(int j=0;j<i;j++){
    cout<<count_array[j]<<endl;
  } 
}

C++: #include <math.h>
#include <iostream>
#include <ios>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <string>

#define YES "YES"
#define NO "NO"
#define space ' '

using namespace std;

void func();

int main(void)
{
	
	func();

	return 0;
}


void func()
{
	

	int n, cnt;
	
	while (cin >> n, !cin.eof()){
		cnt = 0;

		for (int i = 0; i < 10; i++)
		{
			for (int ii = 0; ii < 10;ii++)
			{
				for (int iii = 0; iii < 10;iii++)
				{
					for (int iiii = 0; iiii < 10;iiii++)
					{
						if ((i + ii + iii + iiii) == n)
						{
							cnt++;
							break;
						}

					}
				}
			}
		}

		cout << cnt << endl;
	}
}

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

int main(){
    int n;
    
    while(cin>>n){
    int count=0;
    for(int i=0;i<10; i++){
        for(int s=0;s<10; s++){
            for(int t=0;t<10; t++){
                for(int w=0;w<10; w++){
                    if(i+s+t+w==n)count++;
                }
            }
        }
    }
        cout<<count<<endl;
    }
    return 0;
}

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 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++) {
	  int d = n - a - b- c;
	  if (0 <= d && d <= 9) cnt++;
	}
      }
    }
    cout << cnt << endl;
  }
  

  return 0;
}

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

int main() {
    int cnt;
    while (1) {
        int num;
        cin >> num;
        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==num) {
                            cnt++;
                        }
                    }
                }
            }
        }
        printf("%d\n",cnt);
    }
    return 0;
}

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

C++: #include<iostream>

using namespace std;

int main(void)
{
  int n;

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

  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
	int a;
	while (cin>>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++;
					
			
			cout<<ans;
		
	}
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>

int main(){

	int n,x;
	int i,j,k,l;

	while(std::cin >> n){
		x = 0;
		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){
				x++;
			}
		}
		}
		}
		}
		std::cout << x << std::endl;
	}
}

C++: #include <iostream>

using namespace std;

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

    int num = 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) num++;
          }
        }
      }
    }

    cout << num << '\n';
  }

  return 0;
}

C++: #include <cstdio>

int solve(int n, int r)
{
  if (n == 1) {
    if (r < 10) return 1;
    else return 0;
  } else {
    int a=0;
    for(int i=0;i<10&&r-i>=0;i++){
      a+=solve(n-1,r-i);
    }
    return a;
  }
}

int main()
{
  int n;
  while(~scanf("%d",&n)){
    printf("%d\n",solve(4,n));
  }
}

C++: #include <iostream>

using namespace std;
int main(void){

int input=0;
int output=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++){
			int abcd=a+b+c+d;
				if(abcd==input){
					output++;
				}
			}
		}
	}
}

	cout << output;
}