Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

C++: #include <stdio.h>
#include <string.h>
#include <iostream>
#include <math.h>
#include <cctype>
#include <stdlib.h>
#include <algorithm>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <stack>
#include <iterator>

#define rep(i,n) for(i=1;i<=n;i++)
#define Rep(i,n) for(i=0;i<n;i++)
#define For(i,a,b) for(i=a;i<=b;i++)

#define pb(x) push_back(x)
#define sz(x) x.size()

#define mem(ara,val) memset(ara,val,sizeof(ara))
#define eps 1e-9

#define si(x) scanf("%d",&x)
#define sii(x,y) scanf("%d %d",&x,&y)
#define sl(x) scanf("%lld",&x)
#define sll(x,y) scanf("%lld %lld",&x,&y)
#define ss(ch) scanf("%s",ch)
#define pi(x) printf("%d",x)
#define pii(x,y) printf("%d %d",x,y)
#define pl(x) printf("%lld",x)
#define pll(x,y) printf("%lld %lld",x,y)
#define ps(ch) printf("%s",ch)
#define NL printf("\n")
#define debug(x) printf("wow %d !!\n",x)

typedef long long LL;

using namespace std;

LL n;

LL fun(LL i,LL tot,LL num)
{
    if(tot>n || num>4 || i>9)return 0;
    if(tot==n)return 1;
    LL ans = 0;
    Rep(i,10)
    {
        if(num<4)ans+=fun(i,tot+i,num+1);
    }
    return ans;
}

int main()
{
    while(sl(n)!=EOF)
    {
        LL ans = fun(0,0,0);
        pl(ans);
        NL;
    }
    return 0;
}

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

int main(){
	int t = 0;
	int n;
	long long 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 >=4; i--){
			a[t] = a[t]*i;
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i] << endl;
	}
}

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

int main(){
  int n;
  while(cin>>n){
    int s=0;
    for(int i=9;i>=0;i--){
      if(n-i>27||n-i<0) break;
      for(int j=9;j>=0;j--){
	if(n-i-j>18||n-i-j<0) break;
	for(int k=9;k>=0;k--){
	  if(n-i-j-k>9||n-i-j-k<0) break;
	  s++;
	}
      }
    }
     cout<<s<<endl;
  }
 
  return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007
#define Vi vector<int>
#define Vl vector<long long>
#define pb(a) push_back(a)

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
const ll INF=100000000001;
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};
struct edge{int to,cost;};
struct pos{
	int x,y,cost;
};
int d[51]={};

int main() {

	rep(i,10){
		rep(i2,10){
			rep(i3,10){
				rep(i4,10){
					d[i+i2+i3+i4]++;
				}
			}
		}
	}
	while(1){
		int n;
		cin>>n;
		if(cin.eof())return 0;
		cout<<d[n]<<endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
int hierarchy(int num);

int main(void) {
    int num, count, i, j, k;
    
    while(scanf("%d", &num) != EOF) {
        int ans = 0;
        switch(hierarchy(num)) {
            case 1:
                j = 6;
                k = 4;
                count = 0;
                for(i = 4; num != count++; ) {
                    printf("i = %d\nj = %d\n", i, j);
                    ans = i; //
                    if(num == count) break;
                    if(count > 1) j += k++;
                    i += j;
                }
                break;
            case 2:
                j = 66;
                k = 1;
                count = 9;
                for(i = 282; num != count++; ) {
                    printf("i = %d\nj = %d\n", i, j);
                    ans = i;
                    if(num == count) break;
                    if(count > 10) {
                        j += k;
                        k -= 3;
                    }
                    i += j;
                }
                break;
            case 3:
                j = -41;
                k = -11;
                count = 19;
                for(i = 633; num != count++; ) {
                    printf("i = %d\nj = %d\n", i, j);
                    ans = i;
                    if(num == count) break;
                    if(count > 20) {
                        j += k;
                        k += 3;
                    }
                    i += j;
                }
                break;
            case 4:
                j = -28;
                k = 7;
                count = 29;
                for(i = 84; num != count++; ) {
                    printf("i = %d\nj = %d\n", i, j);
                    ans = i;
                    if(num == count) break;
                    if(count > 30) j += k--;
                    i += j;
                }
                break;
            default : break;
        }
        cout << ans << endl;
    }
    
    return(0);
}

int hierarchy(int num) {
    if(num >= 0 && num <= 9)
        return(1);
    else if(num >= 10 && num <= 19)
        return(2);
    else if(num >= 20 && num <= 29)
        return(3);
    else if(num >= 30 && num <= 36)
        return(4);
    else
        return(5);
}

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

using namespace std;

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

	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int n,count;
	while(scanf("%d",&n)!=EOF){
		count=0;
		for(int f1=0;f1<10;f1++){
			for(int f2=0;f2<10;f2++){
				for(int f3=0;f3<10;f3++){
					for(int f4=0;f4<10;f4++){
							if(f1+f2+f3+f4==n){
							count++;
						}
					}
				}
			}
		}
		printf("%d\n",count);
	}
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>
using namespace std;

int main(void){
    //n<=50
    int n,i,j,k,l,cnt;
    while(cin>>n){
        cnt = 0;
        for(i=0;i<=9;i++){
            for(j=0;j<=9;j++){
                for(k=0;k<=9;k++){
                    for(l=0;l<=9;l++) if(i+j+k+l==n) cnt++;
                }
            }
        }
        cout << cnt << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	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 << cnt << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <queue>
#include <stack>
#include <vector>
#include <stdio.h>
#include <algorithm>
#include <string.h>
#include <string>
using namespace std;

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

int a,b,c,d;
int n;
int cou[55]={0};

int main(){
	rep(i,10) rep(j,10) rep(k,10) rep(l,10){
		cou[i+j+k+l]++;
	}
	while(cin>>n){
		cout<<cou[n]<<endl;
	}
	return 0;
}