Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		// 37以上のとき組み合わせは存在しないが省くのめんどくさいのでまとめて計算
		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{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

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

#define upper 9

using namespace std;

int main(void){
	int n = 0;
	vector<int> vec;
	while(cin >> n){
		int count = 0;
		for(int a=0; a<=upper; ++a){
			for(int b=0; b<=upper; ++b){
				for(int c=0; c<=upper; ++c){
					for(int d=0; d<=upper; ++d){
						if ((a+b+c+d) == n){
							++count;
						}
					}
				}
			}
		}
		vec.push_back(count);
	}
	vector<int>::iterator it = vec.begin();
	while(it != vec.end()){
		cout << *it << endl;
		++it;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
while(1){
ans=0;
cin>>x;
if(x<=0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
if(x-(i+j+k)>=0){
ans++;
}
}
}
}
}
cout<<ans;
}
}

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

bool binary_search(vector<int> a, int x){
	int left = 0, right = a.size() - 1;

	while (left <= right){
		int mid = (left + right) / 2;
		if (a[mid] == x) return true;
		else if (a[mid] < x) left = mid + 1;
		else right = mid - 1;
	}
	return false;
}

int main()
{
	vector<int> vec(19);
	int cnt = 0;
	for (auto& x : vec) x = cnt++;
	int n;
	cnt = 0;
	while (cin >> n){
		for (int i = 0; i < 10; i++){
			for (int j = 0; j < 10; j++){
				if (binary_search(vec, n - i - j)){
					if (n - i - j == 0 || n - i - j == 18) cnt++;
					else cnt += 2;
				}
			}
		}
		cout << cnt << "\n";
		cnt = 0;
	}
	cout.flush();
}

C++: #include <iostream>

using namespace std;

bool calc(int a, int b, int n) {
	n -= a-b;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (n == c+d) return true;
		}
	}
	return false;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			if (calc(a,b,n)) cout++;
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
bool h[1000010]={false};
int main(){
	int n;
	while(cin>>n){
		int co=0;
		rep(i,10)rep(j,10)rep(k,10)rep(q,10)if(i+j+k+q==n)co++;
		cout<<co<<endl;
	}
}

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

using namespace std;

#define Vi vector<int>
#define FOR(i,s,e) for (int i=s; i<e; i++)
#define ITER(v) v.begin(), v.end()

constexpr int n_ints = 4;
constexpr int min_int = 0;
constexpr int max_int = 9;

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

    int n;
    cin >> n;

    int res = 0;
    FOR(a,min_int,max_int+1)
    FOR(b,min_int,max_int+1)
    FOR(c,min_int,max_int+1)
    FOR(d,min_int,max_int+1) {
        int sum = a + b + c + d;
        if (sum == n) { ++res; }
    }
    cout << res << endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
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 l=0; l<10; l++){
	  for(int m=0; m<10; m++){
	    if(i+j+l+m == n){ans++;}
	  }
	}
      }
    }
    cout <<ans<<endl;
  }
  return 0;
}

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