Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

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

int main(){
  int a,b,c,d;
  int temp;
  while(cin>>temp){
    int 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==temp)count++;
	  }
	}
      }
    }
    cout<<count<<endl;
  }
  return 0;
}

C++: #include <stdio.h>

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

C++: #include <iostream>

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

using namespace std;

int main(void){
	for(int n, count = 0; cin >> n; cout << count << endl, count = 0)
		rep(a, 9) rep(b, 9) rep(c, 9) rep(d, 9)
			if(a + b + c + d == n) count ++;
					
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,k,l;
	int cnt;
	int n;

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

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;

}