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

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int ans;
int d[4];
int n;

// 1+2+4+8=15
void rec(int use) {
  if(use == 15) {
    if(d[0]+d[1]+d[2]+d[3]==n) ans++;
  }
  for(int i=0;i<4;i++) {
    if(use & (1<<i)) return;
    for(int j=0;j<10;j++) {
      d[i]=j;
      rec(use|(1<<i));
    }
  }
}

main() {
  while(cin>>n) {
    ans=0; rec(0);
    cout <<ans<<endl;
  }
}