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<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;
}

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

int main()
{
int n;
while(cin>>n){
int res=0;
for(int n1=0;n1<=9;n1++)
for(int n2=0;n2<=9;n2++)
for(int n3=0;n3<=9;n3++)
for(int n4=0;n4<=9;n4++)
if(n1+n2+n3+n4==n) res++
cout<<res<<endl;
}
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


int main()
{
	int n, counter = 0;
	cin >> n;

	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) counter++;
				}
			}
		}
	}
	cout << counter<<endl;
	return 0;
}

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

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


	return 0;
}

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

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

      cout << cnt << endl;
   }

   return 0;
}

C++: #include <stdio.h>

int main(){
    int n;
    int a, b, c, d;
    int count;
        
    while(scanf("%d", &n) != EOF){
        count = 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){
                            count++;
                            break;
                        }
                    }
                }
            }
        }
        printf("%d\n", count);
    }

    return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
	int n;
	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 x;
  while(cin >> x) {
    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==x) ans++;
    cout << ans << endl;
  }
}

C++: 
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

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

C++: #include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main( void ){
    int nCount = 0;
    int n[50];
    int m = 0;
    char str[3];
    while( scanf( "%d",&n[m] ) != EOF ) m++;
   
    for( int a = 0;a < m+1;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 == n[a] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    nCount = 0;
    }
    return 0;
}

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;
}