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

int main(){
	int s[60]={0};int n=0,cnt=0;
	while(cin>>s[n++]);n--;
	for(int i=0;i<n;i++){
		for(int a=0;a<10;a++){
			for(int b=0;b<10;b++){
				for(int c=0;c<10;c++){
					if(s[i]-a-b-c>-1&&s[i]-a-b-c<10)cnt++;
				}
			}
		}
		cout<<cnt<<endl;cnt=0;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define BOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;

int main(){
    
    int ans=0;
    int n;
    cin>>n;
    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>
#include<algorithm>

using namespace std;
int n;
int num[10];
int dx[3]={-1,0,1};
int sum;
int ans=0;

void init()
{
	for(int i=0;i<10;i++){
		num[i]=i;
	}
}

void dfs(int x)
{
	for(int i=1;i<3;i++){
		int nx=x+dx[i];
		if(1<=nx&&nx<10){
		//	cout<<nx<<endl;
			sum+=nx;
			if(sum==n){
				ans++;
			}else{
				if(sum>n) break;
			}
			dfs(nx);
			sum-=nx;
		}
	}
}

void solve()
{
	sum=0;
	for(int i=1;i<10;i++){
		sum+=i;
		dfs(i);
		sum-=i;
	}
}

int main()
{
	init();
	cin>>n;
	solve();
	cout<<ans<<endl;
	return 0; 
}

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

const static double	de_PI	= 3.14159265358979323846;
const static int	de_MOD	= 1000000007;
const static int	de_MAX	= 999999999;
const static int	de_MIN = -999999999;

int main(void) {

	//std::ifstream in("123.txt");	std::cin.rdbuf(in.rdbuf());

	int n = 0, ans = 0;
	std::vector<int> A;

	while (std::cin >> n) {
		A.push_back(n);
	}

	for (unsigned int x = 0; x < A.size(); x++) {
		ans = 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 == A[x]) {
							ans++;
						}
					}
				}
			}
		}
		std::cout << ans << std::endl;
	}

}

C++: #include<stdio.h>

int main()
{
	int n;
	scanf("%d",&n);
	
	int output = 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)
						{
							output++;
						}	
					}
				}
			}
		}
		printf("%d",output);
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int ans[51] = {},i,j,k,l,x;
    for(i=0;i<10;i++){
        for(j=0;j<10;j++){
            for(k=0;k<10;k++){
                for(l=0;l<10;l++) ans[i+j+k+l]++;
            }
        }
    }
    while(cin >> x) cout << ans[x] << "\n";
}

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

int main(){
	std::ios::sync_with_stdio(false);
    std::cin.tie(0);
	
	int a[50]={0};int n=0;
	while(cin>>a[n++]);n--;
	for(int i=0;i<n;i++){
		if(a[i]>36)cout<<"0"<<endl;
		else if(a[i]==36||a[i]==0)cout<<"1"<<endl;
		else if(a[i]==35||a[i]==1)cout<<"4"<<endl;
		else if(a[i]==34||a[i]==2)cout<<"10"<<endl;
		else if(a[i]==33||a[i]==3)cout<<"20"<<endl;
		else if(a[i]==32||a[i]==4)cout<<"35"<<endl;
		else if(a[i]==31||a[i]==5)cout<<"56"<<endl;
		else if(a[i]==30||a[i]==6)cout<<"84"<<endl;
		else if(a[i]==29||a[i]==7)cout<<"120"<<endl;
		else if(a[i]==28||a[i]==8)cout<<"165"<<endl;
		else if(a[i]==27||a[i]==9)cout<<"220"<<endl;
		else if(a[i]==26||a[i]==10)cout<<"286"<<endl;
		else if(a[i]==25||a[i]==11)cout<<"364"<<endl;
		else if(a[i]==24||a[i]==12)cout<<"455"<<endl;
		else if(a[i]==23||a[i]==13)cout<<"560"<<endl;
		else if(a[i]==22||a[i]==14)cout<<"680"<<endl;
		else if(a[i]==21||a[i]==15)cout<<"816"<<endl;
		else if(a[i]==20||a[i]==16)cout<<"969"<<endl;
		else if(a[i]==19||a[i]==17)cout<<"1140"<<endl;
		else cout<<"1330"<<endl;
		
	}
	return 0;
}

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑

int main() {
	int n;
	while (cin >> n) {
		int ans = 0;
		for (int i = 0; i <= 9; ++i) {
			for (int j = 0; j <= 9; ++j) {
				for (int k = 0; k <= 9; ++k) {
					int mon = n - i - j - k;
					if (0 <= mon && mon <= 9) { ++ans; }
				}
			}
		}
		cout << ans << endl;
	}
}

C++: #include <iostream>

int sumOf2_upTo18(int sum);
int sumOf2_upTo9(int sum);

int main()
{
    int sum;
    while (std::cin >> sum) {
        int cnt = sumOf2_upTo18(sum);
        std::cout << cnt << std::endl;
    }

    return 0;
}

int sumOf2_upTo18(int sum)
{
    int cnt = 0;
    for (int k = 0; k <= 18; k++) {
        int l = sum - k;
        if (l >= 0 && l <= 18) {
            int cnt_k = sumOf2_upTo9(k);
            int cnt_l = sumOf2_upTo9(l);
            cnt += cnt_k * cnt_l;
        }
    }

    return cnt;
}

int sumOf2_upTo9(int sum)
{
    int cnt = 0;
    for (int a = 0; a <= 9; a++) {
        int b = sum - a;
        if (b >= 0 && b <= 9) {
            cnt++;
        }
    }

    return cnt;
}

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

int main(){
	int n;
	int cnt;
	while(cin >> n){
		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;
	}
}

C++: #include <stdio.h>

int main(void) {
	int a,b,c,d,n,i;
	while(scanf("%d",&n) != EOF){
	i = 0;
	for(a = 0; 10 > a; a++){
		for(b = 0; 10 > b; b++){
	for(c = 0; 10 > c; c++){
	for(d = 0; 10 > d; d++){
		if(a+b+c+d == n)i++;
	}	
	}	
	}
	}
	printf("%d\n",i);
	}
	
	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;
    }
    return 0;
}