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>
int n, count = 0;

void f(int, int, int, int);
int main()
{
	/*
	int i,array[SIZE], sum = 0;
	for (i = 0; i < SIZE; i++)
	{
		array[i] = (i + 1) * 10;
		printf("%d???????????????:%d\n", (i + 1), array[i]);
		sum += array[i];
	}
	printf("%d\n", sum);
	return 0;
	
	*/
	/*
	double debt = 100000,add,n,p = 0.05;
	std::cin >> n;
	for (int i = 0; i < n; i++)
	{
		add = (double)(int)(((debt * 0.05)/1000)+0.999)*1000;
		debt += add;
	}
	std::cout << debt;
	*/
	/*
	int num[SIZE],i;
	for (i = 0; i < SIZE;i++)
		scanf("%d", &num[i]);
	for (i = 1; i <= SIZE; i++)
		printf("%d\n", num[SIZE - i]);
		*/
	
	std::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++)
					f(a, b, c, d);

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

void f(int a, int b, int c, int d)
{
	if (a + b + c + d == n)
	{
		count++;
	}
}

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

using namespace std;

#define MAX 256

int kai (int x){
	if(x == 1 || x == 0)return 1;
	return x * kai(x - 1);
}

int miku(int x){
	if(x > 36)return 0;
	if(x < 10)return kai(x + 3) / ( kai(x) * 6);
	if(x > 19)return miku(36 - x);
	if(x > 9 && x < 19)return kai(x + 3) / ( kai(x) * 6) - (miku(x - 10) * 4);
}

int main(void){
	int n,i = 0;
	int ans[MAX];
	
	while( cin >> n != EOF){
		ans[i] = miku(n);
		i++;
	}
	
	for(int j = 0;j < i;j++){
		cout << ans [j] <<endl;
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define all(vec) vec.begin(),vec.end()
typedef long long int ll;
typedef pair<ll,ll> P;
const ll MOD=1234567;
const ll INF=1000000010;
const ll LINF=1000000000000000010LL;
const int MAX=500010;
const double EPS=1e-3;
int dx[4]={0,1,0,1};
int dy[4]={0,0,1,1};
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>
#include <vector>

void calc(std::vector<int> &v) {
    std::vector<int> g(10, 0);
    for (int i = 1; i <= 9; i++) {
        v[i] = 4 * i; 
    }
    for (int i = 0; i <= 9; i++) {
        g[i + 9] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i + 8] * 3 + (v[i + 8] - g[i + 8]);
    }
    return; 
}

int main(void) {
    std::vector<int> v(19, 0);
    calc(v);
    int total;

    while (std::cin >> total) {
        if (total > 36) {
            std::cout << '0' << std::endl;
            return 0;
        } else if (total > 18){
            total = 36 - total; 
        }
        std::cout << v[total] << std::endl;
    }
    return 0;
}

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

int main()
{
        int n,count = 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)count++;
                                }

        cout << count << "\n";

        return 0;
}

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

int num ;
int count = 0 ;

int main()
{
	cin >> num ;

		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) == num )
						{
							count ++ ;
						}
					}
				}
			}
		}

	cout << count ;

	return 0 ;
}

C++: #include<iostream>

using namespace std;

int main(){
	int N, a,b,c,d,count=0;
	cin >> N;
	
	for(int i=0; i<10;i++){
		if((N-i)/3 >9) continue;
		for(int j=0; j<10;j++){
			if((N-i-j)/2 > 9) continue;
			for(int k=0; k<10;k++){
				if((N-i-j-k) > 9 || (N-i-j-k)<0) continue;
				cout << i<< " " << j << " " << k << " "<< N-i-j-k <<endl;
				count++;
			}
		}
	}
	cout << count << endl;
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main()
{
	int n, t; int cnt = 0;

	cin >> n;

	for (int i = 0; i < 10; i++)
	{
		for (int j = 0; j < 10; j++)
		{
			for (int k = 0; k < 10; k++)
			{
				t = n - (i + j + k);

				if (0 <= t && t < 10) { cnt++; }
			}
		}
	}

	cout << cnt << endl;

	return 0;
}

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

int dp[51][4];
int rec( int mul, int idx){
  if(mul < 0) return 0;
  if(idx == 4) return mul == 0;
  if(~dp[mul][idx]) return dp[mul][idx];

  int ret = 0;
  for(int i = 0 ; i < 10 ; i++ ){
    ret += rec( mul - i, idx + 1);
  }
  return dp[mul][idx] = ret;
}
int main(){
  int n;
  fill_n( *dp, 51 * 4, -1);
  while(cin >> n){
    cout << rec( n, 0) << endl;
  }
}

C++: #include "stdafx.h"
#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++: #include <iostream>
using namespace std;

int main () {

int n, count = 0;

    cin >> n;

for (int a = 0; a < 10 && a <= n; a++){
    for (int b = 0; b < 10 && b <= n-a; b++){
        for (int c = 0; c < 10 && c <= n-a-b; c++){
            if (n-a-b-c >=0 && n-a-b-c < 10) {
                count++;
            }
        }
    }
}


    cout << count;


    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<=9;++i){
      for(int j=0;j<=9;++j){
        for(int k=0;k<=9;++k){
          if(n-i-j-k<10&&n-i-j-k>=0) ++cnt;
        }
      }
    }

    cout<<cnt<<endl;
  }

  return EXIT_SUCCESS;
}

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

int main(){
  int n,i,S;
  while(1){
    i=0;
    cin>>n;
    for(S=1;S<=9999;S++){
      if((S/1000)+((S-S/1000*1000)/100)+((S-S/100*100)/10)+(S-S/10*10)==n)
	i=i+1;
    }
    cout<<i<<endl;
  }
  return 0;
}

C++: #include <iostream>

int main()
{
	int n;
	while( std::cin >> n )
	{
		int num = 0;
		for( int i1=0; i1<=9; ++i1 )
		{
			for( int i2=0; i2<=9; ++i2 )
			{
				for( int i3=0; i3<=9; ++i3 )
				{
					for( int i4=0; i4<=9; ++i4 )
					{
						num += (i1+i2+i3+i4 == n);
					}
				}
			}
		}

		std::cout << num << '\n';
	}
}

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

#define MIN(a,b) ((b<a)?b:a)
#define MAX(a,b) ((b>a)?b:a)

int main(){
	int n;
	while(scanf("%d", &n)!=EOF){
	int c=0;
	int i,j,k;
	int t=n;
	for(i=MAX(t-27,0);i<=MIN(t,9);i++){
		t-=i;
		for(j=MAX(t-18,0);j<=MIN(t,9);j++){
			t-=j;
			for(k=MAX(t-9,0); k<=MIN(t,9) ;k++){
				c++;
			}
			t+=j;
		}
		t+=i;
	}
	printf("%d\n", c);
}
}