Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

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>

int main(){
	int n,cnt;
	while(std::cin>>n){
		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++;
					}
				}
			}
		}
		std::cout<<cnt<<'\n';
	}
	return 0;
}

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

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

	while(~scanf("%d", &n)){

	for(i=0, 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) i++;	
				}
			}
		}
	}

	printf("%d\n", i);
	}
 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 rep2(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, cnt = 0;
	cin >> n;
	rep2(a, 9) {
		rep2(b, 9) {
			rep2(c, 9) {
				rep2(d, 9) {
					if (n == (a + b + c + d)) cnt++;
				}
			}
		}
	}
	cout << cnt << endl;

	return 0;
}

C++: #include"iostean.h"
#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;
	return 0;
}

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

int main(){
	
	int n;
	while(cin>>n){
		int ans=0;
		for(int i=0;i<10000;i++){
			if(i%10+i%100/10+i%1000/100+i/1000==n)ans++;
		}
		cout<<ans<<endl;
	}
	
	return 0;
}

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


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

C++: #include<cstdio>
main(){for(int i,c,k,n,j;scanf("%d",&n);k=0){for(i=0;i<1e4;c=0){for(j=i++;j>0;j/=10)c+=j%10;c-n?k:k++;}printf("%d\n",k);}}

C++: #include <iostream>

using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int counter=0;
for(int a=0;a<10;a++){
for(int b=0;b<10;b++){
for(int c=0;c<10;c++){
if(0<=n-a-b-c && n-a-b-c<=9){
counter++;
}
}
}
}
cout<<counter<<endl;
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 = 5*n*n - 3*n - 158;
		// ((n+1)*(n+2)*(n+3))/6 - ((n-10+1)*(n-10+2)*(n-10+3))/6 + 27 * (n-9)
		else if (n<=27) count = 5*(36-n)*(36-n) - 3*(36-n) - 158;
		else count = ((37-n)*(38-n)*(39-n))/6;
		
		cout << count << endl;
	}
	
	return 0;
}

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

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        _i64 n, ans;
        while(cin >> n) {
            ans = 0;
            _rep(a, 10) {
                if(a > n) { break; }
                _rep(b, 10) {
                    if(a + b > n) { break; }
                    _rep(c, 10) {
                        if(a + b + c > n) { break; }
                        if(a + b + c <= n && n <= a + b + c + 9) { ++ans; }
                    }
                }
            }
            cout << ans << endl;
        }
    }
    return 0;
}

C++: #include <cstdio>

int main() {
    int n;
    while ( scanf("%d", &n) != EOF ) {
          int x = 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 ) {
                               x++;
                          }
                      }
                  }
              }
          }
          printf("%d\n", x);
    }
    return 0; 
}

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

using namespace std;

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

return 0;
}

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

int main(){
	int n;
	cin >> n;
	int root[5][50],i,j;
	for(i=0;i<5;i++){
		for (j = 0; j < 50; j++)
			root[i][j] = 0;
	}
	for (i = 0; i<10; i++) {
		root[1][i] = 1;
	}
	for (i = 1; i<5; i++) {
		root[i][0] = 1;
	}
	for(i = 2; i < 5; i++){
		for(j= 1;j<50;j++){
			for (int k = j; k >= 0&&k > j-10;k--) {
				root[i][j] += root[i - 1][k];
			}
		}
	}

	cout << root[4][n] << endl;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n, count=0;
	cin >> n;
	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>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int sum = 0;
    int cnt = 0;
    for (int a = 0; a < 10; ++a) {
    sum += a;
    for (int b = 0; b < 10; ++b) {
    sum += b;
    for (int c = 0; c < 10; ++c) {
    sum += c;
    for (int d = 0; d < 10; ++d) {
    sum += d;
    if (sum == n) cnt++;
    sum -= d;
    }
    sum -= c;
    }
    sum -= b;
    }
    sum -= a;
    }
    cout << cnt << endl;
  }
  return 0;
}