Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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 == a) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

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

inline int counter(int n);

int main(){
	std::ios::sync_with_stdio(false);
	int data[50],n,i=0;
	while(std::cin){
		std::cin >> n;
		data[i] = counter(n);
		i++;
	}
	for (int j=0;j<i-1;j++){
		std::cout << data[j] << "\n";
	}
}

inline int counter(int n){
	int count=0;
	for (int i=0;i<10;++i){
		for (int j=0;j<10;++j){
			for (int l=0;l<10;++l){
				for (int t=0;t<10;++t){
					if (i+j+l+t == n){
						count++;
					}
				}
			}
		}
	}
	return count;
}

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

const int max_data = 4;
int x;
int n=0;
int ans;

void solve(int n, int x)
{
	if(x > max_data*9){
		return;
	}

	if(n == max_data && x==0){
		ans++;
		return;
	}else if(n == max_data){
		return;
	}

	for(int i=0;i<=9;i++){
		if(x-i >= 0){
			solve(n+1,x-i);
		}
	}
	return;
}

int main()
{
	while(cin >> x){
		ans = 0;
		solve(n,x);
		cout << ans << endl;
	}
	return 0;
}

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;
}