Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                cnt := 0
                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 {
                                                        cnt++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N;
	while(cin>>N){
		int num=0;
		for(int a=0,ea=min(9,N);a<=ea;a++){
			for(int b=0,eb=min(9,N);b<=eb;b++){
				for(int c=0,ec=min(9,N);c<=ec;c++){
					int d=N-a-b-c;
					if(0<=d && d<=9) num++;
				}
			}
		}
		out(num);
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a;
int b;
int main(){
	while (cin>>a)
	cin >> a;
	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){
						b++;
					}
				}
			}
		}
	}
	cout << b << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;
int countSolve(int a,int b,int n);
void solve(int n);

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

int countSolve(int a, int b, int n) {
	int x = n-a-b;
	int count = 0, i = 0 , j=0;
	for (i=0; i<10; i++) {
		for (j=0; j<10; j++) {
			if (x == i+j)
				count++;
		}
	 }
	return count;
}

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

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    for (int i = 0; i = 10; i++) {
      for (int j = 0; j = 10; j++) {
        for (int k = 0; k = 10; k++) {
          if (0 <= n - i - j - k && n - i - j - k < 10) cnt++;
        }
      }
    }
    cout << cnt << endl;
}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0;
    int n[];
    while( true ){
    

    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 ) nCount++;
                }
            }
       }
    }

    printf( "%d\n",nCount );
    }
    return 0;
}

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

int main() {
	int n;
	while (cin >> n) {
		int num = 0;
		if (n > 36) {
			cout << "0" << endl;
		}
		else {
			for (int i = 0; i < 10; i++) {
				if (i > n) {
					break;
				}
				for (int j = 0; j < 10; j++) {
					if (i + j > n) {
						break;
					}
					for (int k = 0; k < 10; k++) {
						if (i + j + k > n) {
							break;
						}
						for (int l = 0; l < 10; l++) {
							if (i + j + k + l > n) {
								break;
							}
							if (i + j + k + l == n) {
								num++;
							}
						}
					}
				}
			}
			cout << num << endl;
		}
	}
	return 0;
}

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

int main()
{
    int i,j,k,l,n,counter;
    while(cin>>n)
    {
        counter=0;
        if(n<37)
        {
            for(i=0;i<=9;i++)
                for(j=0;j<=9;j++)
                  for(k=0;k<=9;k++)
                    for(l=0;l<=9;l++)
            {
                if(i+j+k+l==n)
                    counter++;
            }
        }
        cout<<counter<<endl;
    }


    return 0;
}

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

int cnt=0;
int n;

int forf(int t,int ti){
    if(ti<4){
        for(int i=0;i<10;i++){
            forf(t+i,ti+1);
        }
    }else if(t==n)cnt++;
    return 0;
}

int main(){
    while(scanf(" %d",&n)){
        cnt=0;
        forf(0,0);
        cout << cnt << endl;
    }
    return 0;
}

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

int main(){
    int cnt, n;
    
    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){
                            break;
                        }
                        if(i + j + k + l == n){
                            cnt++;
                        }
                    }
                }
            }
        }
        
        cout << cnt << endl;
    }
    
    return 0;
}

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

int Permutation(int a, int b, int c, int d)
{
	if(a==d)
		return 1;
	else if(a==c || b==d)
		return 4;
	else if(a==b || b==c || c==d)
		return 12;
	else
		return 24;
}

int main()
{
	int n;
	while(cin>>n)
	{
		int count=0;
		if(9+9+9+9 < n)
				break;
		for(int i=0; i<10; ++i)
		{
			if(i+9+9+9 < n)
					continue;
			for(int j=i; j<10; ++j)
			{
				if(i+j+9+9 < n)
						continue;
				for(int k=j; k<10; ++k)
				{
					if(i+j+k+9 < n)
							continue;
					for(int l=k; l<10; ++l)
					{
						if(i+j+k+l == n)
						{
							count+=Permutation(i,j,k,l);
							break;
						}
					}
					if(i+j+k > n)
						break;
				}
				if(i+j > n)
					break;
			}
			if(i > n)
				break;
		}
		cout << count << '\n';
	}
}

C++: #include <iostream>

using namespace std;
static int a = 0;


void re(int n, int t) {
    if(t == 0){
        if(n == 0) {
            a++;
            return;
        } else return;
    }

    for(int i = 0; i <= 9; i++) {
        re(n - i, t - 1);
    }

    return;
}

int main() {
    int n;
    while(cin >> n) {
        re(n, 4);
        cout << a << endl;
        a = 0;
    }

    return 0;
}

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

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

	while (cin >> n) {
		cnt = 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) {
							cnt++;
						}
					}
				}
			}
		}
		printf("%d\n", cnt);
	}
	return 0;
}

C++: 


#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>

using namespace std;
int main()
{
	int s;
	while (cin >> s) {
		int a = 0;
		for (int i = 0; i < 10; i++) {
			for (int k = 0; k < 10; k++) {
				for (int j = 0; j < 10; j++) {
					for (int l = 0; l < 10; l++) {
						if (i + k + j + l == s) { a++; }
					}
				}
			}
		}cout << a << endl;
	}
	return 0;
}