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 <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <float.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <vector>
#include <map>
#include <utility>
#define LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define Lfmax DBL_MAX
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int> 
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n",a)
#define debugdd(a,b) printf("--%d %d\n",a,b)
#define debugarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i]);printf("\n")
#define newline printf("\n")
#define forin(a,b,c) for(int a=b ; a<c ; a++)
#define forde(a,b,c) for(int a=b ; a<c ; a--)


inline void scd(int &a){scanf("%d",&a);}
inline void scdd(int &a,int &b){scanf("%d %d",&a,&b);}
inline void sctd(int &a,int &b,int &c){scanf("%d %d %d",&a,&b,&c);}
inline void scdlld(long int &a,long int &b){scanf("%I64d %I64d",&a,&b);}
inline void sclld(long long int &a){scanf("%I64d",&a);}

#define scarrd(a,b) for(int index=0 ; index<b ; index++)scanf("%d",&a[index])
#define prdlld(a,b) printf("%I64d %I64d",a,b)
#define prdd(a,b) printf("%d %d",a,b)
#define prd(a) printf("%d",a)
#define prarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i])
#define iniarr(a,b) for(int i=0 ; i<b ;i++)a[i]=0
#define arr(a,b) int *a=(int *)malloc(b*sizeof(int))
#define llarr(a,b) long long int *a=(long long int *)malloc(b*sizeof(long long int))
#define st(a,b) char *a=(char *)malloc(b*sizeof(char))
#define grav 9.8
#define pi 3.14159265

int main()
{
	float n;
	while(scanf("%f",&n)!=EOF)
	{
		int d=0;
		for(int i=0 ; i<=ceil(n/4) ; i++)
		{
			for(int j=0 ; j<=ceil(n/4) ; j++)
			{
				for(int k=0 ; k<=ceil(n/4) ; k++)
				{
					for(int l=0 ; l<=ceil(n/4) ; l++)
					{
						int x=i+j+k+l;
						//printf("--%d %d %d %d == %d\n",i,j,k,l,x);
						if(x==n)
						{
							//printf("%d %d %d %d\n",i,j,k,l);
							d++;
							break;
						}
						
					}
				}
			}
		}
		printf("%d\n",d);
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{
	int count = 0, num;

	

	while (cin >> num)
	{
		count = 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)
							count++;
					}
				}
			}
		}
		cout << count << endl;
	}

	

}

C++: #define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>

using namespace std;

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

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

int ans;

void SofI(int num, int n) {
	if (num > n * 9) { return; }
	else if (num < 0) { return; }
	else if (num != 0 && n == 0) { return; }
	else if (num == 0) {
		ans++;
		return;
	}
	else {
		for (int i = 0; i < 10; i++) {
			SofI(num - i, n - 1);
		}
	}

}

int main(void) {
		int num;
		while (cin >> num) {
			int ans = 0;
			SofI(num, 4);
			cout << ans << endl;
		}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int table[36 + 1] = {};
    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];
		}
	    }
	}
    }
    int in;
    while (cin) {
	cin >> in;
	if (0 <= in && in <= 36)
	    cout << table[in] << endl;
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


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

C++: #include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	while ( cin >> n ) {
		int count;
		if (n>36) count = 0;
		else if (n<=9) count = ((n+1)*(n+2)*(n+3))/6;
		else if (n<=18) count = -((n-9)*(n-8)*(n-7))/6 + 27*n - 23;
		// 220 - ((n-10+1)*(n-10+2)*(n-10+3))/6 + 27 * (n-9)
		else if (n<=27) count = -((27-n)*(28-n)*(29-n))/6 + 27*(36-n) - 23;
		else count = ((37-n)*(38-n)*(39-n))/6;
		
		cout << count << endl;
	}
	
	return 0;
}

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

int main(void){
  int c;
  while(cin >> c){
    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 == c)
	      cnt++;
    cout << cnt << endl;
  }
  return 0;
}

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 n;while(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;}