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>
using namespace std;

int main(){
	int root[5][51], i, j;
	for (i = 0; i < 5; i++) {
		for (j = 0; j < 51; 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 < 51; j++) {
			for (int k = j; k >= 0 && k > j - 10; k--) {
				root[i][j] += root[i - 1][k];
			}
		}
	}
	while (true) {
		int n;
		cin >> n;
		if (cin.eof()){
			break;
		}
		cout << root[4][n] << endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;
#define RENT 100000
int main(){
	int n, ans;
	int counter = 0;
	while (cin >> n){
		counter = 0;
		for (int i = 0; i < 10; i++){
			for (int q = 0; q < 10; q++){
				for (int w = 0; w < 10; w++){
					for (int e = 0; e < 10; e++){
						ans = i + q + w + e;
						if (ans == n){
							counter += 1;
						}
					}
				}
			}
		}
		cout << counter << endl;
	}
}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;





int main()
{
	int n;
	int sum;
	int k[19];//k[i]???i?????????????¶?????????§??????????????¨?????????????????????
	while (cin >> n) {
		sum = 0;
		if (n > 36) {
			cout << "0" << endl;
		}
		else{
			
			for (int i = 0; i < 19; i++) {
				if (i < 10) {
					k[i] = i + 1;
				}
				else {
					k[i] = 19 - i;
				}
			}
			for (int i = max({0,n-18}); i <= min({ 18,n }); i++) {
				sum += k[i] * k[n - i];
			}
			cout << sum << endl;
		}
		
	}





}

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

int main() {
	// your code goes here
	int n;
	while(cin>>n){
	int count=0;
	if(n>36){cout<<0<<endl;}else{
		for(int i=9; i>=0; i--){
			for(int j=i; j>=0; j--){
				for(int k=j; k>=0; j--){
					for(int l=k; l>=0; l--){
						if(i+j+k+l==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
	}
	return 0;
}

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



int main(){
    int n,cnt;
    int num[10000],i=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++){
                    num[i]=a+b+c+d;
                    i++;
                }
    
    while(cin >> n){
        cnt = 0;
        for(int j=0;j<10000;j++){
            if(n==num[j]) cnt++;
        }
        cout << cnt << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>
 
using namespace std;
 
 
// cin >>
// cout <<
int main(){
    int in=0;
	int out;
    while(scanf("%d",&in)!=EOF){
    out=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==in){
						out++;  
						}   
					}
				}
			}
		}
		printf("%d\n",out);
    }
    
     
    return 0;
}

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

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

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

int main()
{
	int n = 0;
	int upper =10;
	while(cin >> n){
		int answer = 0;
		for(int i = 0; i < upper; ++i)
		{
			for(int j = 0; j < upper; ++j)
			{
				for(int k = 0; k < upper;++k)
				{
					for(int l = 0; l < upper; ++l)
					{
						if((i+j+k+l)==n)
						{
							answer++;
						}
					}
				}
			}
		}
		cout << answer << 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 - 1] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i - 1] * 3 + (v[i + 8] - g[i - 1]);
    }
    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;
        } else if (total > 18){
            total = 36 - total; 
            std::cout << v[total] << std::endl;
        } else {
            std::cout << v[total] << std::endl;
        }
    }
    return 0;
}

C++: #include<cstdio>

int main(){
	int n, count = 0;

	while(scanf("%d", &n) + 1){
		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(n == i + j + k + l){
							count++;
						}
					}
				}
			}
		}
		printf("%d\n", count);
	}
}

C++: #include <iostream>


int func(int n){
	int count = 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){
						count++;
					}
				}
			}
		}
	}

	return count;
}



int main(){
	int input;

	while (true){
		if (std::cin >> input){
			std::cout << func(input) << "\n";
		}
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  int a,b,c,d,n,count = 0;
  
  while(scanf("%d",&n)!=EOF){
  
  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)==n)count++;
	}
      }
    }
  }
  
  cout << count << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
 
int n;
 
int forf(int cnt,int t){
    if(cnt==0){
        if(cnt==n){
            return 1;
        }else{
            return 0;
        }
    }else{
        int tt=0;
        for(int i=0;i<10;i++){
            tt=forf(cnt-1,t+i);
        }
        return tt;
    }
}
 
int main(){
    while(scanf(" %d",&n)!=EOF){
        cout << forf(4,0) << endl;
    }
    return 0;
}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


int main(){
	li n;
	
	while(cin>>n){
		li res=0;
		
		rep(i,10)rep(j,10)rep(k,10)rep(l,10){
			if(i+j+k+l==n)res++;
		}
		cout<<res<<endl;
	}
	
	return 0;
}

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

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