Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename Q_temp>
using smaller_queue = priority_queue <Q_temp, vector<Q_temp>, greater<Q_temp> >;

const ll MOD = (ll) (1e9 + 7);
//const ll MOD = 998244353;
const int INF = (int) 1e9;
const ll LINF = (ll) 4e18;
const double PI = acos(-1.0);

#define REP(i,m,n) for(ll i = m; i < (ll)(n); ++i)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbg2(x_) for(auto a_ : x_) cerr << a_ << " "; cerr << endl;
#define dbg3(x_ , sx_) rep(i, sx_) cerr << x_[i] << " "; cerr << endl;
vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll CEIL(ll a, ll b) {
    return (a + b - 1) / b;
}

void finish() {
    cout << -1 << endl;
    exit(0);
}

//------------------------------------------------------

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << setprecision(20) << setiosflags(ios::fixed);

    int n;
    while (cin >> n) {
        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>
#include <sstream>
#include <string>
#include <cmath>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <numeric>

using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i,a,b) for(int i = (a); i < (int)(b); ++i)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(v) ((int)v.size())

#define pb push_back
#define mp make_pair

// a + b = n (0 <= a, b <= 9)??¨??????????????????????????°
int calc(int n) {
    if (n > 18) return 0;
    if (n > 9) n = 18 - n;
    return n + 1;
}

int main(void)
{
    cin.sync_with_stdio(false);
    int n;

    while(cin >> n) {
        int ret = 0;
        REP(a_plus_b, n + 1) {
            int c_plus_d = n - a_plus_b;
            ret += calc(a_plus_b) * calc(c_plus_d);
        }
        cout << ret << endl;
    }
    return 0;
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	for(int i = 0; i < 1000; i++){
		a[i] = 1;
	}
	while(cin >> n){
		if(n > 36 || n < 0){
			a[t] = 0;
		}
		else if(n > 18){
			n = 36-n;
		}
		for(int i = n+3; i > n; i--){
			a[t] = a[t]*i;
		}
		a[t] = a[t]/6;
		cout << a[t] << endl;
		t++;
	}
}

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

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

  cout << cou << "\n";
  }

  return 0;
}

C++: #include<stdio.h>

int main(void){

int n,h;
int a,b,c,d;

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

return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
long n;
long nn[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670,
660,633,592,540,480,415,348,282,220,165,120,84,56,35,20,10,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
for(;;){
cin>>n;
if(cin.eof())break;
cout<<nn[n]<<endl;
}
return 0;
}

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

int main()
{
    int n,a;
    while(cin>>n)
    {
        int x=0;
        for(int i=0;i<10;i++){
            for(int j=0;j<10;j++){
                for(int k=0;k<10;k++){
                    a=n-i-j-k;
                    if(a>=0&&a<=9)
                        x++;
                }
            }
        }
        cout<<x<<endl;
    }
    return 0;
}

C++: #include "bits/stdc++.h"
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 k=0;k<10;k++){
				for(int l=0;l<10;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 sum=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)sum++;
				}
			}
		}
	}
	cout<<sum<<endl;
}

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n;
  while(cin >> n) {
    ll cnt = 0;
    rep(i, 10) rep(j, 10) rep(k, 10) rep(l, 10) {
      if(i + j + k + l == n) cnt++;
    }
    cout << cnt << endl;
  }

	return 0;
}

C++: #include<iostream>

using namespace std;

int main() { 
    int sum; 

    while( cin >> sum ) {

	int 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( i + j + k + l == sum)
    count++;
    
    cout << count << "\n";
	}
    return 0; 
}

C++: #include<stdio.h>
#include<string.h>
int main(void) {
	int  n, count = 0;
	while (1)
	{
		scanf("%d", &n);
		if (n==EOF)break;
		for (size_t a = 0; a <= 9; a++)
		{
			for (size_t b = 0; b <= 9; b++)
			{
				for (size_t c = 0; c <= 9; c++)
				{
					for (size_t d = 0; d <= 9; d++)
					{
						if (a + b + c + d==n)
						{
							count++;
						}
					}
				}
			}
		}
		printf("%d\n", count);
		count = 0;
	}
	return 0;
}

C++: #include<iostream>

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

	while(std::cin>>n&&n){
		i=0;
		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){
							i++;
						}
					}
				}	
			}		
		}
		std::cout<<i<<std::endl;
	}
	

    return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,i=0,j;
	int kai[1000]={0},atai[1000];
	while(kai[0] ==0)
	{
		scanf("%d",&atai[i]);
		
		if(atai[i]<=0 || 50<atai[i])break;

		i=i+1;
	}
	
	for(j=0;j<i;j++)
	{
		for(a=0;a<10;a++)
		{
			if(a>atai[j])break;
			for(b=0;b<10;b++)
			{
				if(a+b > atai[j])break;
				for(c=0;c<10;c++)
				{
					if(a+b+c>atai[j])break;
					for(d=0;d<10;d++)
					{
						if(a+b+c+d == atai[j])
						{
							kai[j]=kai[j]+1;
						}
						else if(a+b+c+d>atai[j])break;
					}
				}
			}
		}
	}
	for(j=0;j<i;j++)
	  printf("%d\n",kai[j]);

	return 0;
}