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;

int a,b,x;

int mySet(int d){
  for(int i=0;i<10;i++){
    if(d<3){
      mySet(d+1);
    }else if(d==3){
      if(a==x){
      b++;
      }
    }
    a++;
  }
  return a=a-10;
}

int main(void){
  while(scanf("%d",&x)!=EOF){
  mySet(0);
  cout<<b<<endl;
  return 0;
  }
}

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

int n, c = 0;

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

C++: #include <iostream>
using namespace std;
int seach(int n,int m){
	if(m==4){
		return (n==0);
	}
	else{
	int res=0;
	for(int i=0;i<10;i++){
		res+=seach(n-i,m+1);
	}
}
}

int main() {
	int n;
	cin >> n;
	cout << seach(n,0) << endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

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

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

int main(){
  int n;
  int cnt=0;
  while(std::cin >> n){
  
    for(int a=1;a<10;a++){
      for(int b=1;b<10;b++){
	for(int c=1;c<10;c++){
	  for(int d=1;d<10;d++){
	    if(a+b+c+d==n){
	      cnt++;
	    }
	  }
	}
      }
    }

    std::cout << cnt << std::endl;
    cnt = 0;
  }
}

C++: #include<iostream>

using namespace std;

int main()
{
	int num;

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

	return 0;	
}

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

int main(void)
{
	int num, total, ans, tmp,cc[11];

	while (cin >> num) {
		ans = 0;
		tmp = num;
		for (int j = 9; j >= 0; j--) {
			int C[11] = {0};
			C[10] = 4;
			num = tmp;
			for (int i = j; i > 0 && C[10] > 0; i--) {
				while (num-i >= 0) {
					C[10]--;
					C[i]++;
					num -= i;
				}
			}
			total = 0;
			if (num == 0) {
				total = 24;
				bool flag = true;
				for (int i = 0; i < 11; i++) 
					if (cc[i] != C[i]) flag = false;
				if (flag) total = 0;

				for (int i = 0; i < 11; i++) {
					cc[i] = C[i];
					while (C[i] > 0) {
						total /= C[i];
						C[i]--;
					}
				}
			}
			ans += total;
		}
		
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include <iostream>

int main(){
	
	int e;
	int f=0;
	while(std::cin>>e){
		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==e){
							
							f++;
						}
		            }
		        }
		    }
		}
		std::cout<<f<<std::endl;
		f=0;
	}
    
    return 0;
    
}

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

int main(){
  
  vector<int> count_array;
  int count;
  int in_num;
  int a,b,c,d,i=0;
  while(cin>>in_num){
    count=0;
    if(in_num>36){
      count_array.push_back(0);
    }
    else{
      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)==in_num){
		cout<<"("<<a<<","<<b<<","<<c<<","<<d<<")"<<endl;
		count++;
	      }
	    }
	  }
	}
      }
      count_array.push_back(count);
    }
    i++;
  }
  for(int j=0;j<i;j++){
    cout<<count_array[j]<<endl;
  } 
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
	int n;

	while (cin >> n) {
		int cnt = 0;

		for (int i = 0; i <= 9; ++i) {
			for (int j = 0; j <= 9; ++j) {
				for (int k = 0; k <= 9; ++k) {
					int a = n - i - j - k;
					if (0 <= a && a <= 9) cnt++;
				}
			}
		}

		cout << cnt << endl;
	}
}

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

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

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

using namespace std;

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

	while(cin >> n)
	{

	for(a = 0; a < 10; a++)
	{
		ans = 0;
			for(b = 0; b < 10; b++)
			{
					for(c = 0; c < 10; c++)
					{
							for(d = 0; d < 10; d++)
							{
								if(a + b + c + d == n)
									ans ++;
							}
					}
			}
	}
	printf("%.0f\n", ans);
	
	}

	return 0;
}

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

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

	while( cin >> n ){
		iCount = 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 )
							iCount++;
					}
				}
			}
		}

		cout << iCount << endl;

	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int n;
	int a , b , c , d;
	int ans , count;

	while(cin >> n){
		if(n == 0) break;

		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++){

						ans = a + b + c + d;
						if(ans == n){
							count++;
						}
					}
				}
			}
		}

		cout << count << endl;
	
	}

	return 0;
}

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

int setCount(int n) {
    int aRange = 9;
    int bRange = 9;
    int cRange = 9;
    int dRange = 9;
    int sum;
    int count = 0;
    
    for(int a = 0; a <= aRange; a++) {
        for(int b = 0; b <= bRange; b++) {
            for(int c = 0; c <= cRange; c++) {
                for(int d = 0; d <= dRange; d++) {
                    sum = a + b + c + d;
                    if(sum == n){
                        count++;
                    }
                }
            }
        }
    }
    return count;
}

int main(void) {
    int count = 0;
    int n;
    
    while(cin >> n) {
        count = setCount(n);
        cout << count << endl;
        count = 0;
    }
    
    return 0;
}

C++: #include <iostream>

#define rep(i,n)      for(int i=0;i<n;i++)

using namespace std;

int table[36 + 1];

int main()
{
	rep(a,10)rep(b,10)rep(c,10)rep(d,10) table[a+b+c+d]++;

	int N;
	while (cin>>N)
	{
		if (N > 36)
			cout << 0 << endl;
		else
			cout << table[N] << endl;
	}
	return 0;
}

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

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

int main(){
  int s = 0;
  int n = 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){
     s++;
  }
 }
 }
 }
  }
  cout<<s<<endl;

  return 0;
}