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

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		// 37以上のとき組み合わせは存在しないが省くのめんどくさいのでまとめて計算
		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<string>
using namespace std;

int main(void) {

	//0005
	/*
	int a, b, G, R, L, r;
	while (cin >> a >> b) {
		R = a;
		L = b;
		int tmp;
		if (b > a) {
			tmp = a;
			a = b;
			b = tmp;
		}
		while (1) {
			r = a%b;
			if (r == 0)break;
			a = b;
			b = r;
		}
		G = b;
		R = R / G;
		L = L / G;
		cout << G << " " << R*L * G << endl;
	}
	*/
	//0006
	/*
	string name;
	cin >> name;
	int L = name.size();
	string Ans;
	for (int i = 0; i < L; i++) {
		Ans += name.substr(L-i-1, 1);
	}
	cout << Ans << endl;
	*/
	//0007
	/*
	int Dept = 100000;
	int week;
	cin >> week;
	for (int i = 0; i < week; i++) {
		Dept = Dept * 1.05;
		if (Dept % 1000 == 0) {
			Dept = (Dept / 1000);
		}
		else {
			Dept = (Dept / 1000 + 1);
		}
		Dept = Dept * 1000;
	}
	cout << Dept << endl;
	*/
	//0008
	int a, b, c, d;
	int n;
	int count[51];
	for (int i = 0; i < 51; i++) {
		count[i] = 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++) {
					count[a + b + c + d]++;
				}
			}
		}
	}
	while (cin >> n) {
		cout << count[n] << endl;
	}
	return 0;
}

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

#define REP(i, n) for(int i = (0); i < (n); ++i)

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

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

int main(){
  int n;
  int count=0;
  cin >> n;

  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) count++;
        }
      }
    }
  }
  cout << count<<endl;
}

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

int n, res = 0;

void dfs(int sum, int count)
{
    if (sum == n) {
        res++;
      	return ;
    }
    if (num == 4) return;
    for (int i = 0; i <= 9; i++) {
	dfs(sum + i, count + 1);
    }
}

int main(void)
{
    while (cin >> n) {
	res = 0;
        dfs(0, 0);
        cout << res << endl;
    }

    return 0;
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
while(cin>>x){
ans=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<cstdio>

using namespace std;

int main()
{
	int n = 0;

	while(scanf("%d", &n) != EOF)
	{
		int sum = 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)
						{
							sum++;
						}
					}
				}
			}
		}

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

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,count=0;
	scanf("%d",&n);
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count++;
					}
				}
			}
		}
	}
	printf("%d\n",count);
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
int main(){
	int sum,ans=0;
	while(cin>>sum){
		for(int i=0;i<10;i++){
			for(int j;j<10;j++){
				for(int k;k<10;k++){
					for(int l;l<10;l++){
						if(sum==i+j+k+l) ans++;
					}
				}
			}
		}
		cout<<ans<<endl;
	}
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>

using namespace std;

int main()
{
	int n, a, b, c, d;
	double  ans = 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)
									ans ++;
							}
					}
			}
	}

	printf("%.0f\n", ans);

	return 0;
}

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

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
	int n, ans;
	ans=0;
	while(cin >> n){
		rep(i,10) rep(j,10) rep(k,10) rep(l,10) if(i+j+k+l==n) ans++;
		cout << ans << endl;
	}
    return 0;
}

C++: ///
// File:  0008.cpp
// Author: ymiyamoto
//
// Created on Wed Nov  8 22:24:12 2017
//

#include <cstdint>
#include <iostream>

using namespace std;

int32_t main()
{
  while (true) {
    uint32_t n;
    cin >> n;
    if (cin.eof()) break;
    uint32_t count = 0;
    for (uint32_t a = 0; a < 10; a++) {
      for (uint32_t b = 0; b < 10; b++) {
        for (uint32_t c = 0; c < 10; c++) {
          for (uint32_t d = 0; d < 10; d++) {
            if (a + b + c + d == n) {
              count++;
            }
          }
        }
      }
    }
    cout << count << endl;
  }

  return 0;
}

C++: #include<iostream>

int main()
{
	int n, count{};
	while (std::cin >> n)
	{
		count = 0;
		for (int a = 0; a < 10 && a < n; ++a)
		{
			if (a + 27 < n) continue;
			for (int b = 0; b < 10 && a + b < n; ++b)
			{
				if (a + b + 18 < n) continue;
				for (int c = 0; c < 10 && a + b + c < n; ++c)
				{
					if (a + b + c + 9 < n) continue;
					count++;
				}
			}
		}
		std::cout << count << std::endl;
	}
	return 0;
}

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

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

int main()
{
  int n;

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

C++: #include<stdio.h>
#include<iostream>

int main(){
	int n,a,b,c,d,count;
	count = 0;
	while(scanf("%d",&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 = count + 1;
				}
			}
		}
	}
	printf("%d\n",count);
	}
	return 0;
}

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