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 main(){
	int a, n;
	while(cin >> n){
	a = 0;
	for(int i = 0;i < 10;i++){
		for(int j = 0;j < 10;j++){
			for(int k = 0;k < 10;k++){
				for(int t = 0;t < 10;t++){
					if(i + j + k + t == n)a++;
				}
			}
		}
	}
	cout << a << endl;
	}
	return 0;
}

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

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <set>
#include <map>
#include <list>
#include <iterator>
#include <queue>
#include <stack>
#include <deque>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <string>
#include <cmath>
#include <complex>
#include <functional>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <cstdlib>
#include <cctype>

#define REP(i,m,n) for(int i=m;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define rp(i,c) rep(i,(int)c.size())
#define fr(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++)
#define mp make_pair
#define pb push_back
#define all(c) (c).begin(),(c).end()
#define rall(u) (u).rbegin(),(u).rend()
#define dbg(x) cerr<<#x<<" = "<<(x)<<endl
#define v_delete(a,b) (a).erase(remove((a).begin(), (a).end(), b), (a).end())
#define v_unique(a) (a).erase(unique((a).begin(), (a).end()), (a).end())
#define VV(T) vector<vector< T > >
#define init(a,b) memset((a), (b), sizeof((a)))
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int,int> pi;
const int inf=1<<28;
const double INF=1e10,EPS=1e-9;


template<class T>int SIZE(T a){return a.size();}
template<class T>string IntToString(T num){string res;stringstream ss;ss<<num;return ss.str();}
template<class T>T StringToInt(string str){T res=0;for(int i=0;i<SIZE(str);i++)res=(res*10+str[i]-'0');return res;}
template<class T>T gcd(T a,T b){if(b==0)return a;return gcd(b,a%b);}
template<class T>T lcm(T a,T b){return a/gcd(a,b)*b;}

template <class T> void input(T& a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
template <class T> void input(T* a, int n) { for (int i = 0; i < n; ++i) cin >> a[i]; }
typedef pair<int,int> pii;

inline bool IN(int x, int y, int w, int h)
{
    return 0 <= x && x < w && 0 <= y && y < h;
}


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

}

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

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int solve(int a, int n)
{
    if(a == 0){
        if(n == 0)
            return 1;
        return 0;
    }

    int ret = 0;
    for(int i=0; i<=9; ++i)
        ret += solve(a-1, n-i);
    return ret;
}

int main()
{
    for(;;){
        int n;
        if(!(cin >> n))
            return 0;

        cout << solve(4, n) << endl;
    }
}

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

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

int main(){
	int n,ans;

	while( cin >> n ){
		ans = 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++){
						for(int d=0 ; d<=9 ; d++){
							if((a+b+c+d)==n){
								ans++;
							}
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
}

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

int main(){
	int n,sum;
	while(cin >> n){
		sum=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){
							sum++;
						}
					}
				}
			}
		}
		cout << sum <<"\n";
	}
return 0;
}

C++: #include<stdio.h>

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

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

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

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

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

int main() {
	int n;

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

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

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

    while(cin>>n){
        cnt=0;  
        if(n<37){
            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)cnt++;
            }       
            }       
            }       
            }       
        }       
        cout<<cnt<<endl;
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;
int main(){
  const int MAX_num = 9;
  const int min_num = 0;
  int n = 0;
  for(int i=1;cin.eof()==false;i++){
    int count =0;
    n = -1;
    cin >> n;
    if(n==-1) break;
    for(int a = min_num; a < MAX_num+1; a++){
      for(int b = min_num; b < MAX_num+1; b++){
	for(int c = min_num; c < MAX_num+1; c++){
	  for(int d = min_num; d < MAX_num+1; d++){
	    if(a+b+c+d==n){
	      count++;
	    }
	  }
	}
      } 
    }
    cout << count<<endl;
  }
}

C++: #include<iostream>

using namespace std;

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

}