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>
using namespace std;

int main()
{
	int n;
	while(cin >> n)
	{
		if(n > 36)
		{
			cout << 0 << endl;
			continue;
		}

		int max = (n < 9) ? n : 9;

		int found = 0;
		for(int a = 0; a <= max; a++)
			for(int b = 0; b <= max; b++)
				for(int c = 0; c <= max; c++)
					for(int d = 0; d <= max; d++)
						if(a + b + c + d == n)
							found++;

		cout << found << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <vector>
using namespace std;
 
bool binary_search(vector<int> a, int x){
    int left = 0, right = a.size() - 1;
 
    while (left <= right){
        int mid = (left + right) / 2;
        if (a[mid] == x) return true;
        else if (a[mid] < x) left = mid + 1;
        else right = mid - 1;
    }
    return false;
}
 
int main()
{
    vector<int> vec(19);
    int cnt = 0;
    for (auto& x : vec) x = cnt++;
    int n;
    cnt = 0;
    while (cin >> n){
        for (int i = 0; i < 10; i++){
            for (int j = 0; j < 10; j++){
                if (binary_search(vec, n - i - j)){
                    if (n - i - j == 0 || n - i - j == 18) cnt++;
                    else cnt += 2;
                    //cout << "i:" << i << " j:" << j << "k + l:" << n - i - j << endl;
                }
            }
        }
        cout << cnt << endl;
        cnt = 0;
    }
}

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

C++: #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
	while(cin >> n) {
		int ret = 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) ret++;
					}
				}
			}
		}
		cout << ret << endl;
	}
	return 0;
}

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

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

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

C++: #include <iostream>
using namespace std;
 
int solve(int N){
    int 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){
                    int tmp = i + j + k + l;
                    if(tmp == N) ans++;
                }
            }
        }
    }
    return ans;
}
 
int main(){
    int N;
    while(cin >> N){
        int ans = solve(N);
        cout << ans << endl;
    }
}

C++: #include <iostream>
using namespace std;
int ary[60],res[40];
int main(){
	int N;
	for(int i=1;i<=51;i++){
		cin>>ary[i];
		if(cin.eof()){
			N=i-1;
			break;
		}
	}
	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++){
					res[i+j+k+l]++;
				}
			}
		}
	}
	for(int i=1;i<=N;i++){
		if(ary[i]>=0&&ary[i]<=36)cout<<res[ary[i]]<<endl;
		else cout<<0<<endl;
	}
	return 0;
}

C++: #include<iostream>

int main(){
	int n;
	int count = 0;
	while (std::cin >> n){
		count = 0;
		if (n <= 36){
			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 - 9 && a + b + c <= n)++count;
					}
				}
			}
		}
		std::cout << count << std::endl;
	}
	return 0;
}

C++: #include <cstdio>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)

int main() {
  int n;
  while(scanf("%d",&n) != EOF) {
    int t = 0;
    REP(i,10) {
      if(i > n) break;
      REP(j,10) {
	if(i+j > n) break;
	REP(k,10) {
	  if(i+j+k > n) break;
	  REP(l,10) {
	    if(i+j+k+l > n) break;
	    else if(i+j+k+l == n) t += 1;
	  }
	}
      }
    }
    printf("%d\n", t);
  }

  return 0;
}

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

int main() {

  int n;
  while ( cin >> n ) {

    int 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 ( a+b+c+d == n ) cnt++;
	  }
	}
      }
    }

    cout << cnt << endl;

  }

  return 0;

}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long int ll;
typedef vector<long long int> vi;

int main(){
	ll n, c = 0;
	while (cin >> n){
		REP(i, 10){
			REP(j, 10){
				REP(k, 10){
					REP(l, 10){
						if (i + j + k + l == n)c++;
					}
				}
			}
		}
		cout << c << "\n";
		c = 0;
	}
}

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

int main(){
	int piyo,n=0;
	while(1){
		piyo=0;
		cin >> n;
		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(n == i+j+k+l){
							piyo++;
						}
					}
				}
			}
		}
		cout <<piyo<< endl;
	}
	return 0;
}

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

C++: #include <iostream>
#define rep(i,a) for(int i=0;i<a;++i)

using namespace std;

int main(void)
{
	int n;
	int a[4];
	while(cin >> n,n)
	{
		int count = 0;
		rep(i,10)
		{
			rep(j,10)
			{
				rep(c,10)
				{
					rep(d,10)
					{
						if(i+j+c+d == n)
							++count;
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int sumDigit(int n) {
    int ret = 0;

    while (n) {
        ret += n % 10;
        n /= 10;
    }
    return ret;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    VI nums;
    
    int t;
    while (cin >> t) {
        nums.push_back(t);
    }
    
    for (auto n : nums) {
        int ans = 0;
        REP(i, 0, 10000) {
            if (n == sumDigit(i))   ++ans;
        }
        cout << ans << endl;
    }
    
    return 0;
}