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 <bits/stdc++.h>
//#include "bits/stdc++.h"

#define rep(i,n) for(ll (i)=0;(i)<(ll)(n);(i)++)
#define all(x) (x).begin(),(x).end()
#define MOD 1000000007LL
#define INF (1LL<<60LL)
#define int long long
typedef long long ll;

using namespace std;



signed main() {
	ll n;
	while (cin >> n) {
		ll ans = 0;
		for(ll i = 0 ;i<10;i++)
			for (ll j = 0; j < 10; j++)
				for (ll k = 0; k < 10; k++) {
					ll d = n - i - j - k;
					if (0 <= d && d < 10) ans++;
				}
		cout << ans << endl;
	}
}

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

int main(){
  int s,h = 0;
  int n,t = 0;
  cin>>n>>t;

  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++;
   }else if(a+b+c+d ==t){
     h++;
   }
 }
 }
 }
  }
  cout<<s<<endl;
  cout<<h<<endl;

  return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int n,cont;
  while(scanf("%d",&n)!=EOF){
    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++){
	    cout<<i<<" "<<j<<" "<<k<<" "<<l<<endl;
	    if(i+j+k+l==n)cont++;
	  }
	}
      }
    }
    cout<<cont<<endl;
  }
}

C++: #include <iostream>

using namespace std;
 
int main(int argc, char** argv) {
    int n;
    while(cin >> n) {
        int count = 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) {
                            count++;
                        }
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}

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

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a[50];
int b[50];
int main(){
	for (int x = 0; x < 50; x++){
		cin >> a[x];
		while (cin >> a[x])


			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 ==a[x] ){
								b[x]++;
							}
						}
					}
				}
			}
	}
	for(int x=0;x<50;x++)
{
cout << b[x] << endl;
}

	return 0;
}

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

int main(){
    int i,j,k,l;
    
    int ans = 0;
    
    int n;

    while(cin >> n){
        ans = 0;
    
        for(i=0;i<10;i++){
        
            if(i>n)break;
            for(j=0;j<10;j++){
                    
                    for(k=0;k<10;k++){
                        for(l=0;l<10;l++){
                            if((i+j+k+l)==n){
                                    ans++;
                            }
                        }
                    }
            }
        }
cout << ans << endl;
    }
    
    

    return 0;
}

C++: #include <stdio.h>
#include <iostream>
#define rep(i,n) for(int i = 0; i < (n); ++i)
using namespace std;
int n;
int main() {
	int a, b, c, d;
	while(scanf("%d\n", &n) != EOF) {
		int count = 0;
		rep(a,10) {
			rep(b,10) {
				rep(c,10) {
					rep(d,10) {
						if(a + b + c + d == n) count++;
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

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