Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
long n;
long nn[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670,
660,633,592,540,480,415,348,282,220,165,120,84,56,35,20,10,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
for(;;){
cin>>n;
if(cin.eof())break;
cout<<nn[n]<<endl;
}
return 0;
}

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

int main()
{
    int n,a;
    while(cin>>n)
    {
        int x=0;
        for(int i=0;i<10;i++){
            for(int j=0;j<10;j++){
                for(int k=0;k<10;k++){
                    a=n-i-j-k;
                    if(a>=0&&a<=9)
                        x++;
                }
            }
        }
        cout<<x<<endl;
    }
    return 0;
}

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

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

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

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n;
  while(cin >> n) {
    ll cnt = 0;
    rep(i, 10) rep(j, 10) rep(k, 10) rep(l, 10) {
      if(i + j + k + l == n) cnt++;
    }
    cout << cnt << endl;
  }

	return 0;
}

C++: #include<iostream>

using namespace std;

int main() { 
    int sum; 

    while( cin >> sum ) {

	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 == sum)
    count++;
    
    cout << count << "\n";
	}
    return 0; 
}

C++: #include<stdio.h>
#include<string.h>
int main(void) {
	int  n, count = 0;
	while (1)
	{
		scanf("%d", &n);
		if (n==EOF)break;
		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;
	}
	return 0;
}

C++: #include<iostream>

int main(){
	int a,b,c,d,i,n;

	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<stdio.h>

int main(void)
{
	int a,b,c,d,i=0,j;
	int kai[1000]={0},atai[1000];
	while(kai[0] ==0)
	{
		scanf("%d",&atai[i]);
		
		if(atai[i]<=0 || 50<atai[i])break;

		i=i+1;
	}
	
	for(j=0;j<i;j++)
	{
		for(a=0;a<10;a++)
		{
			if(a>atai[j])break;
			for(b=0;b<10;b++)
			{
				if(a+b > atai[j])break;
				for(c=0;c<10;c++)
				{
					if(a+b+c>atai[j])break;
					for(d=0;d<10;d++)
					{
						if(a+b+c+d == atai[j])
						{
							kai[j]=kai[j]+1;
						}
						else if(a+b+c+d>atai[j])break;
					}
				}
			}
		}
	}
	for(j=0;j<i;j++)
	  printf("%d\n",kai[j]);

	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main() {
    int n;
    while (true) {
        int count = 0;
        cin >> n;
        if (cin.eof()) {
            return 0;
        }
        for (int i=0; i<10; i++) {
            for (int j=0; j<10; j++) {
                for (int k=0; k<10; k++) {
                    int d = n-i-j-k;
                    if (0 <= d && d < 10) {
                        count++;
                    }
                }
            }
        }
        cout << count << endl;
    }
}

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

using namespace std;

int main (int argc, char * const argv[]) {
    // insert code here...
    int n, a, b, c, d;
	
	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++;
						}else if(i+j+k+l>n){
							break;
						}
					}
				*/
				if(n-(i+j+k)>=0 && n-(i+j+k)<10)
					count++;
				}
			}
		}
		cout << count <<endl;
	}
	
	return 0;
}

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

bool listen_input(int &inputNum)
{
	using namespace std;
	
	cin>>inputNum;
	if(cin.eof())
	{
		return false;
	}
	else
	{
		return true;
	}
}

class Sums//コンストラクタで全10000通りの和を格納、count_~の呼び出しでこれらを数え上げる
{
private:
	int sum[10000];
	void calc_increase(int []);
	void increase_eachDigit(const int,int[]);
public:
	Sums();
	int count_combination(const int);
};

Sums::Sums()
{
	int nums[5]={};
	int tmp_sum=0;
	
	sum[0]=0;//(a,b,c,d)=(0,0,0,0)
	for(int roop=1;1;roop++)
	{
		calc_increase(nums);//(a,b,c,d)=(1,0,0,0)から全解探索
		if(nums[4])
		{
			break;
		}
		
		tmp_sum=0;
		for(int roop_sum=0;roop_sum<4;roop_sum++)
		{
			tmp_sum+=nums[roop_sum];
		}
		sum[roop]=tmp_sum;
	}
	
	std::sort(sum,sum+10000);
}

void Sums::calc_increase(int nums[])
{
	nums[0]++;
	for(int roop=0;roop<4;roop++)
	{
		increase_eachDigit(roop,nums);
	}
}

void Sums::increase_eachDigit(int digitNum,int nums[])
{
	if(nums[digitNum]==10)
	{
		nums[digitNum]=0;
		nums[digitNum+1]++;
	}
}

int Sums::count_combination(const int inputNum)
{
	int count=0;
	
	for(int roop=0;roop<10000;roop++)
	{
		if(sum[roop]==inputNum)
		{
			count++;
		}
		else if(sum[roop]>inputNum)
		{
			break;
		}
	}
	
	return count;
}

int main()
{
	Sums inst_sum;
	
	int inputNum;
	while(listen_input(inputNum))
	{
		std::cout<<inst_sum.count_combination(inputNum)<<std::endl;
	}
	
	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
#define F(i) for (int i=0; i<10; i++)
int main()
{
	int n;
	while(cin >> n){
		int count = 0;
		F(a)F(b)F(c)F(d)if(a+b+c+d==n) count++;
		cout << count << endl;
	}
	return(0);
}