Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

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

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

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

C++: #include <iostream>
using namespace std;
int main() {
  int n, count = 0;
  while (cin >> n) {
    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;
  }
}

C++: #include <iostream>

using namespace std;

int main(){
	int L=0,N,A,B,C,D;
	while(cin>>N){
	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){L++;};
				};};};};

	cout<<L<<endl;};
	cin>>L;
		return 0;

}

C++: #include<iostream>
#include<cstdio>
#include<sstream>
#include<fstream>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cmath>
#include<cstdlib>
using namespace std;

int main(){
	int n;
	cin>>n;
	int tot = 0;
	for(int i=0;i<10;++i){
		for(int j=0;j<10;j++){
			for(int k=0;k<10;++k){
				for(int w=0;w<10;++w){
					if(i+j+k+w==n)++tot;
				}
			}
		}
	}
	cout<<tot<<endl;
	return 0;
}

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

int main(){
	int n, cnt;
	while ( cin >> n ){
		cnt = 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( n == a+b+c+d ) ++cnt;
					}
				}
			}
		}
		cout << cnt << endl;
	}
}

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

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf("%d", &val) != EOF)
	{
		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 == val)count++;

					}

				}


			}


		}

		printf("%d\n", count);
		count = 0;

	}

}

C++: #include <iostream>
using namespace std;
int main() {
	int n, a, b, c, d, cnt = 0;
	while (cin >> n) {
		for (a = 0; a < 10 && a < n; a++) {
			for (b = 0; b < 10 && b < n; b++) {
				for (c = 0; c < 10 && c < n; c++) {
					for (d = 0; d < 10 && d < n; d++) {
						if (a + b + c + d == n)
							cnt++;
					}
				}
			}
		}
		cout << cnt << endl;
	}
	return 0;
}

C++: #include <stdio.h>

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

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

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

    return 0;
}

C++: #include <iostream>

using namespace std;

int combinations[51] = {};

int main() {
    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++) {
                    combinations[a + b + c + d] += 1;   
                }
            }
        }
    }

    int n;
    while (cin >> n) {
        cout << combinations[n] << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a;
int b;
int c;
int main(){

	
	while (cin >> a){
                        c++;
			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++;
							}
						}
					}
				}
			}
}
for(int i = 0;i<c;i++){	
cout << b << endl;
}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,d,n;
	while(cin>>n){
		int count=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)
						count++;
						
				}
			}
		}
	}
	cout<<count<<endl;
	}
	return 0;
}

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

/*
inline int factorial(int n)
{
    int x = 1;
    for (;n != 0; n--)
        x *= n;
    return x;
}

inline int factorial(int s, int n)
{
    int x = 1;
    for (;n > s; n--)
        x *= n;
    return x;
}

inline int conbination(int n, int r)
{
    return factorial(n - r, n) / factorial(r);
}

inline int homogeneous(int n, int r)
{
    return conbination(n + r - 1, r);
}
*/

int calc(int n, int k)
{
    if (k == 0)
        return 0;

    for (int i = 0; i <= 9; i++) {
        n -= i;
        if (n < 0)
            return 0;
        else
            return 1 + calc(n, k - 1);
    }

}

int main()
{
    for (int n; cin >> n;)
        cout << n << " " << calc(n, 4) << endl;

    return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<iostream>
#include<vector>
#include<set>
#include<stack>
#include<queue>
#include<ctype.h>
#include<math.h>
#include<map>
using namespace std;
int main() 
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		int count=0;
		int i,j,k,l;
		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)
							count++;
		printf("%d\n",count);
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <algorithm>
#include <stack>
#include <string>

using namespace std;


int main(){
	int n = 0;
	int count;
	while(cin >> n){
		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 m = 0; m < 10; m++){
						if((i + j + k + m) == n){
							count++;
						}
					}
				}
			}
		}

		cout << count << endl;
	}

	return 0;
}

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

int solve(int n){
    int ans = 0;
    int i, j, k, l;
    if(n > 36) return 0;
    for(i=0; i<=min(n, 9); i++){
      for(j=0; j<=min(n-i, 9); j++){
        for(k=0; k<=min(n-i-j, 9); k++){
          if(0 <= n-i-j-k && n-i-j-k <= 9) {
          	ans++;
          	//cout << n-i-j-k << endl;
          }
        }
      }
    }
    return ans;
}




int main() {
    ios::sync_with_stdio(false);
    int n;
    while(cin >> n){
      cout << solve(n) << endl;
    }
    return 0;
}

C++: #include<stdio.h>
 
int main(){
    int a;
    while(~scanf("%d",&a)){
        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==a)ans++;
        printf("%d\n",ans);
    }
}