Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		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++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

C++: #include <iostream>
#include <cstring>
using namespace std;
int ans[51];
void rec(int sum, int d){
  if(d == 4){
    ans[sum]++;
    return;
  }
  for(int i = 0 ; i <10; i++){
    rec(sum+i,d+1);
  }
}
void init(){
  memset(ans,0,sizeof(ans));
  rec(0,0);
}
int main(){
  int n;
  init();
  while(cin >> n){
    cout << ans[n] << endl;
  }
  return 0;
}
#include <iostream>
#include <cstring>
using namespace std;
int ans[51];
void rec(int sum, int d){
  if(d == 4){
    ans[sum]++;
    return;
  }
  for(int i = 0 ; i <10; i++){
    rec(sum+i,d+1);
  }
}
void init(){
  memset(ans,0,sizeof(ans));
  rec(0,0);
}
int main(){
  int n;
  init();
  while(cin >> n){
    cout << ans[n] << endl;
  }
  return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int num, cnt = 0;
	int i, j, k, l;

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

	return 0;
}

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

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

int main(){
	vector<int> results;
	int n;
	while(cin >> n){
		results.push_back(count(n));
	}
	for(auto result : results){
		cout << result << endl;
	}
	return 0;
}

C++: #include <stdio.h>
using namespace std;
#define rep(i,a,n) for(int i=a; i<n; i++)

int main() {
int n;
while(cin >> n) {
int cnt = 0;
rep(a,0,10) rep(b,0,10) rep(c,0,10) rep(d,0,10) {
if(a + b + c + d == n) cnt++;
}
cout << cnt << endl;
}
return 0;
}

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

int main() {
	int n,cnt=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++){
					if(a+b+c>n)break;
					if(n-(a+b+c)>9)continue;
					cnt++;
				}
		cout<<cnt<<endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>

using namespace std;

int main(){
  int a,b,c,d,sum,n,count=0,num;
  vector<int> nl;
  while(cin >> n){
    nl.push_back(n);
  }

  for(int j=0; j<nl.size(); j++){
    count = 0;
    for(int i=0; i < 10000; i++){
      num = i;
      a = num/1000;num%=1000;
      b = num/100;num%=100;
      c = num/10;num%=10;
      d = num;
      sum = a+b+c+d; 
      if(n == sum){
        count++;
      }
    }

    cout << count << endl;
  }
}

C++: #include<stdio.h>
int main()
{
  int i,j,k,l,cou,n;
  scanf("%d",&n);
  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)cou++;
	}
      }
    }
  }
  printf("%d\n",cou);
  return 0;
}

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

int n;

int d[4][61];

int main(void)
{
	

		for(int i = 0; i <= 9; i++)
			d[0][i]++;
		for(int i = 0; i < 3; i++){
			for(int j = 0; j <= 9; j++){
				for(int k = 0; k <= 9*(i+2); k++){
					d[i+1][k+j] += d[i][k];
				}
			}
		}


	while(cin >> n, n){

		cout << d[3][n] << endl;
	}


	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

}

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

int main(){
	int n;

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

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

C++: /*
    ????????°??§???????????¨????????????
*/

#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <limits.h>
#include <float.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <iterator>
#include <vector>
#include <map>
#include <utility>
#define LLU unsigned long long int
#define LL long long int
#define LD long double
using namespace std;
#define Lfmax DBL_MAX
#define LLUmax ULLONG_MAX
#define LLmax LLONG_MAX
#define dmax INT_MAX
#define vd vector<int>
#define vLL vector<long long int>
#define vLLU vector<unsigned long long int> 
#define pb push_back
#define mp make_pair
#define fi first
#define sec second
#define debug printf("asd\n")
#define debugd(a) printf("--%d\n",a)
#define debugdd(a,b) printf("--%d %d\n",a,b)
#define debugarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i]);printf("\n")
#define newline printf("\n")
#define forin(a,b,c) for(int a=b ; a<c ; a++)
#define forde(a,b,c) for(int a=b ; a<c ; a--)


inline void scd(int &a){scanf("%d",&a);}
inline void scdd(int &a,int &b){scanf("%d %d",&a,&b);}
inline void sctd(int &a,int &b,int &c){scanf("%d %d %d",&a,&b,&c);}
inline void scdlld(long int &a,long int &b){scanf("%I64d %I64d",&a,&b);}
inline void sclld(long long int &a){scanf("%I64d",&a);}

#define scarrd(a,b) for(int index=0 ; index<b ; index++)scanf("%d",&a[index])
#define prdlld(a,b) printf("%I64d %I64d",a,b)
#define prdd(a,b) printf("%d %d",a,b)
#define prd(a) printf("%d",a)
#define prarr(a,b) for(int i=0 ; i<b ; i++)printf("%d ",a[i])
#define iniarr(a,b) for(int i=0 ; i<b ;i++)a[i]=0
#define arr(a,b) int *a=(int *)malloc(b*sizeof(int))
#define llarr(a,b) long long int *a=(long long int *)malloc(b*sizeof(long long int))
#define st(a,b) char *a=(char *)malloc(b*sizeof(char))
#define grav 9.8
#define pi 3.14159265

int main()
{
	float n;
	while(scanf("%f",&n)!=EOF)
	{
		int d=0;
		for(int i=0 ; i<=ceil(n/4) ; i++)
		{
			for(int j=0 ; j<=ceil(n/4) ; j++)
			{
				for(int k=0 ; k<=ceil(n/4) ; k++)
				{
					for(int l=0 ; l<=ceil(n/4) ; l++)
					{
						int x=i+j+k+l;
						//printf("--%d %d %d %d == %d\n",i,j,k,l,x);
						if(x==n)
						{
							//printf("%d %d %d %d\n",i,j,k,l);
							d++;
							break;
						}
						
					}
				}
			}
		}
		printf("%d\n",d);
	}
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


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

	

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

	

}