Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

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

using ll = long long;
#define debug(x) cerr << #x << ": " << x << endl;
#define line() cerr << "---------------" << endl;

int main() {
   int n;
   while (scanf("%d", &n) != EOF) {
      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 l = 0; l < 10; l++) {
                  if (i+j+k+l == n) {
                     cnt++;
                  }
               }

      cout << cnt << endl;
   }

   return 0;
}

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

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

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

int main()
{

	int d;
	
	while (cin >> d)
	{
		int c = 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++)
					{
						bool ju = i + j + k + l == d;
						if (ju)
						{
							c++;
						}
					}
				}
			}
		}
		cout << c << endl;
	}
	return 0;
}

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

C++: #include <stdio.h>
int main(void){
int n;
while(scanf("%d",&n)!=EOF){
int count=0;
for(int a=9;a>=0;a--){
for(int b=9;b>=0;b--){
for(int c=9;c>=0;c--){
for(int d=9;d>=0;d--){
if(a+b+c+d==n){
count++;
}
}
}
}
}
printf("%d\n",count);
}
return 0;
}

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

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

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

C++: #include<stdio.h>
int main(void)
{
	int i,j,k,l,n,cnt;
	while(scanf("%d",&n)!=EOF){
		cnt=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){
							cnt++;
						}
					}
				}
			}
		}
	}
	printf("%d\n",cnt);
	return 0;
}

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

int main(void) {
  int ans = 0;
  int in;
  int table[51];

  memset(table, 0, sizeof(table));
  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++) {
          table[a + b + c + d]++;
        }
      }
    }
  }
  while(cin) {
    cin >> in;
    cout << table[in] << endl;
  }
  return 0;
}

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

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

	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<iostream>
using namespace std;
int main() {
  int n;
  while(cin>>n) {
  if(n>37)
    cout<<0<<endl;
  else {
    int count=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) count++;
	  }
	}
      }
    }
    cout<<count<<endl;;
  }
  }
  return 0;
}

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

int main(){
  int n,res=0,count;
  int a=0,b=0,c=0,d=0;
  
  
  while( scanf("%d",&n) != EOF){
     
     for( a = 0 ; a < 10 ; a++){
       //if( (a+b+c+d) == n)res++;

       for( b = 0 ; b < 10 ; b++){
	 //if( (a+b+c+d) == n)res++;
	 for( c = 0 ; c < 10 ; c++){
	   //if( (a+b+c+d) == n)res++;
	   for( d = 0 ; d < 10 ; d++){
	     if( (a+b+c+d) == n)res++;
	     //cout << res <<endl;
	   }

	 }
	 

       }

     }
     // count = a;
     //if(count > 9)break;
     cout << res<<endl;
     res =0;
   }

  
  return 0;
}

C++: #include <cstdio>

using namespace std;

int main(void){
	int i, j, k, l, ans = 0, n;
	scanf("%d",&n);
	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++;
					}
				}
			}
		}
	}
	printf("%d\n",ans);
	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)
		{
				cout << count << '\n';
				continue;
		}
		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';
	}
}

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

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    in >> var;
    if (in.fail()) {
        cerr << "no var" << endl;
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        cerr << "no line" << endl;
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    int n;
    while (!streamvar(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++) 
                    for (int d = 0; d < 10; d++) 
                        if (a + b + c + d == n)
                        counter++;
        cout << counter << endl;
    }
    return 0;
}