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 <stdlib.h>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>
using namespace std;

#define FOR(i,s,e) for (int i = int(s); i != int(e); i++)
#define REP(i,e) for (int i = 0; i != int(e); i++)
#define FORIT(i, A) for (auto i : A)
#define ISEQ(c) (c).begin(), (c).end()
#define PRINT(x) cout << (x) << endl
#define SZ(x) ((int)(x).size())

int func(int sum, int depth)
{
	if (sum < 0)
	{
		return 0;
	}
	if (sum == 0)
	{
		return 1;
	}
	if (depth == 3)
	{
		if (sum < 10)
			return 1;
		else
			return 0;
	}
	int ans = 0;
	for (int i = 0; i < 10 && i <= sum; i++)
	{
		ans += func(sum - i, depth+1);
	}
	return ans;
}

int main(int argc, char const *argv[])
{
	int n;
	while (scanf("%d", &n) != EOF)
	{
		if (n > 36)
		{
			printf("0\n");
			continue;
		}
		int num = func(n, 0);
		printf("%d\n", num);
	}
	return 0;
}

C++: #include <stdio.h>

int main(void){
	int n;
	int a,b,c,d;
	int cnt;
	int i,j,k,l;

	while(scanf("%d",&n) != EOF){
		cnt = 0;
		if(n <= 36){
			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);
		}
		else
			printf("0\n");
	}
	return 0;
}

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<iomanip>
using namespace std;
#define pi 3.141592653589793283462
int main(){
    int c;
	int d=0;
	while (cin>>c)
	{
		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==c)
						   d++;
					}
				}
			}
		}
		cout<<d<<endl;
		d=0;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;
int N;
int Sum = 0;
int main()
{
    while(cin >> N)
    {
    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++;
                    }
                }
            }
        }
    }   
    }



    cout << Sum << endl;
}

C++: #include<iostream>

using namespace std;

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

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

C++: #include <stdio.h>

int main(void)
{
	int n;
	int i, j, k, l;
	int ans = 0;
		
	while(scanf("%d", &n) != EOF){
			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 += 1; }
						}
					}
				}
			}
			
			printf("%d\n", ans);
		}
		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+1)*(n+2)*(n+3))/6 - 4*((n-9)*(n-8)*(n-7))/6;
		else if (n<=27) count = ((37-n)*(38-n)*(39-n))/6 - 4*((27-n)*(28-n)*(29-n))/6;
		else count = ((37-n)*(38-n)*(39-n))/6;
		
		cout << count << endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
int main(){

	int a,b,c,d,n,i;

	while(std::cin>>n&&n){
	i=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){
						i++;
			

						}
					}
				}
			}
		}

	std::cout<<i<<std::endl;
}
	return 0;
	}

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 ++;
							}
					}
			}
	}

	cout << ans << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;


int main()
{

	int n,count;
	int a,b, c,d;
	while(cin >> n){

		//a>=b>=c>=dと仮定
		count = 0;
		for( a = 0; a < 10; a++ ) {
			if ( a > n ) 
				continue;
			for( b = 0; b < a+1; b++ ) {
				if( a + b > n )
					continue;
				for( c = 0; c < b+1; c++ ) {
					if( a + b + c > n ) 
						continue;
					d = n - a - b- c;
					if( d > c )
						continue;
				if( a == d )//全部同じ
					count += 1;
				else if( a == c || b == d)//１つ異なる
					count += 4;
				else if( a == b && c == d )//2つずつ同じ
					count += 6;
				else if( a == b || b == c || c == d )//2つ同じ
					count += 12;
				else
					count += 24;
				}
			}
		}
		cout << count << endl;

	}

	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int n;
	while(cin>>n){
		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 <stdlib.h>

int main()
{
    int n,a,b,c,d,i,j,k,l,cnt=0;
    scanf("%d",&n);
    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=cnt+1;
                    else
                        continue;
                }
            }
        }
    }
    printf("%d\n",cnt);
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    for (int i = 0; i = 10; i++) {
      for (int j = 0; j = 10; j++) {
        for (int k = 0; k = 10; k++) {
          if (0 <= n - i - j - k && n - i - j - k < 10) cnt++;
        }
      }
    }
    cout << cnt << endl;
  }
}

C++: #include<iostream>
int main(){
	int n;
	int a, b, c, d;
	int count;
	while (std::cin >> n){
		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++;
							break;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}
	return 0;
}