Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime>
using namespace std;

int main(void){
	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;
	}
    return 0;
}

C++: #include<iostream>
using namespace std;
#define rep(i,j) for(i=0;i<j;i++)
int main()
{

  int n;

  while(cin>>n)
    {

      int a,b,c,d;
      int cnt=0;
      rep(a,10)rep(b,10)rep(c,10)rep(d,10)
        {
          if(a+b+c+d==n)cnt++;
        }
      cout << cnt<<endl;
    }
  return 0;

}

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

int main(){
	int n;
	int 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>

int main(int argc, char const* argv[])
{
	unsigned  n{};
	while (std::cin >> n) {
		unsigned sum{};
		for (int i = 0; i < 10000; i++) {
			auto a = i / 1000;
			auto b = (i - a * 1000) / 100;
			auto c = (i - a * 1000 - b * 100) / 10;
			auto d = i % 10;
			auto e = a + b + c + d;
			if (n == e) {
				sum++;
			}
		}
		std::cout << sum << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>

#define rep(i, j) for(int i = 0; i < j; i++)
// sp_rep
#define sp_rep(i, j) for(int i = 0; i <= j; i++)
#define all(i) i.begin(), i.end()
#define ll long long

using namespace std;

string Num2Str(int num)
{
	stringstream ss;
	ss << num;
	return ss.str();
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	// code
	int n;
	while (cin >> n) {
		int cnt = 0;
		sp_rep(a, 9) {
			sp_rep(b, 9) {
				sp_rep(c, 9) {
					sp_rep(d, 9) {
						if (n == (a + b + c + d)) cnt++;
					}
				}
			}
		}
		cout << cnt << endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int solve = 0;
    for(int i=0; i<10; i++)
      for(int j=0; j<10; j++)
	for(int k=0; k<10; k++)
	  if(n-i-k-j>=0 && n-i-j-k<10) solve++;
    cout <<solve<<endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

main(){
		int l;
		while(cin>>l){
			int o=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==l){
								o=o+1;
							}
						}
					}
				}
			}
			printf("%d\n",o);
		}
}

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

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

C++: #include<iostream>
#include<cmath>
using namespace std;
int main() {
	int n, a, b, c, d;
	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++) {
					for (int l = 0; l <= 9; l++) {
						if (i + j + k + l == n) cnt++;
					}
				}
			}
		}
		cout << cnt << endl;
	}
	cin >> n;
}

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

using namespace std;


int count2=0;

void saiki(int a, int b,int n){
	
}

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

	function<int(int, int, int)> x = [=,&count2](int a, int b, int n)->int{
		if (b == 0){
			if (n == a)count2++;
		}
		else{
			for (int i = 0; i < 10; i++){
				saiki(a + i, b - 1, n);
			}
		}
	};

	
	/*while (cin >> n){
		
	}*/
	x(0, 4, n);

	cout << count2;
	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;
	while(cin >> n){
		ans=0;
		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>
using namespace std;

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

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
#define C(_Dis) cout<<_Dis<<endl;

using namespace std;

typedef long long int lli;

int main() {
	int n,Count=0;
	while (cin >> n) {
		L(i, 10)L(j, 10)L(k, 10)L(l, 10)if (i + j + k + l == n) Count++;
		C(Count);
		Count = 0;
	}
	return 0;
}

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

int dp[51];

int main(void)
{

	int n;
	while(cin >> n, !cin.eof()){

		for(int i = 1; i <= n; i++){
			for(int j = 1; i * j <= 50; j++)
				dp[i*j]++;
		}

		cout << dp[n] << endl;

	}


	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n;
while(scanf("%d,"&n)){
int ans=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)ans++;
}
}
}
}
printf("%d\n",ans);
}
return 0;
}

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

#define rep(i,b) for(int i=0;i<=b;i++)
int main(){int n,r;while(cin>>n){r=0;rep(a,9)rep(b,9)rep(c,9)rep(d,9)if(a+b+c+d==n)r++;cout<<r<<endl;}}

C++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n[50];
    int comb[50];
    int m = 0;
    while (cin >> n[m]) {
        if(n[m] <= 18){
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else if(n[m] <= 36){
            n[m] = 36 - n[m];
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 10; i--) {
                    comb[m] -= powl(3, n[m] - i) * 4;
                }
            }
        }else{
            comb[m] = 0;
        }
        m++;
    }
    
    for (int i = 0; i < m; i++) {
        printf("%d\n", comb[i]);
    }
    printf("\n");
    
    return 0;
}