Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include<iostream>

using namespace std;

int main(){
	
	int n,s;
	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;
	}
}

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

int main(){
    int n;
    while(cin>>n){
    int a=0;
    for(int i=0;i<10;i++)
        for(int j=0;j<10;j++)
            for(int p=0;p<10;p++)
                for(int q=0;q<10;q++)
                    if(i+j+p+q==n)
                        a++;
    cout<<a<<endl;
    }
}

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

int main(){
	int n, tn, count;
	while(cin >> n){
		count = 0;
		for(int a = ( 27 < n ) ? (n - 27) : 0; a < 10; a++){
			int na = n - a;
			for(int b = ( 18 < na ) ? (na - 18) : 0; b < 10; b++){
				int nb = na - b;
				for(int c = ( 9 < nb ) ? (nb - 9) : 0; c < 10; c++){
					int nc = nb - c;
					if(0 <= nc && nc < 10)
						count++;
				}
			}
		} 
	cout << count << endl;
	}
	return 0;
}

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

int ans = 0;

void SofI(int num, int n) {
	if (num > n * 9) { return; }
	else if (num < 0) { return; }
	else if (num != 0 && n == 0) { return; }
	else if (num == 0) {
		ans++;
		return;
	}
	else {
		for (int i = 0; i < 10; i++) {
			SofI(num - i, n - 1);
		}
	}

}

int main(void) {
	int ans = 0;
	int num;
	cin >> num;
	SofI(num, 4);
	cout << ans << endl;
	return 0;
}

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

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

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

C++: #include<iostream>
using namespace std;
int main()
{
  int i,j,k,l,n,c=0;
  cin >> n;
  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)
           c++;
         }
        }
       }
      }
  cout << c << endl;
  return 0;
}

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


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

C++: #include<bits/stdc++.h>
 
using namespace std;
 
#define rep(i, n) repi(i,0,n)
#define repi(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define pb push_back
 
 
int main(){
    int x;
    int n=10;

    while(cin>>x){

        int count=0;

        for(int i=0;i<n;i++){
            for(int j=0;j<n;j++){
                for(int k=0;k<n;k++){
                    for(int l=0;l<n;l++){
                        if(i+j+k+l==x){
                            count++;
                            // cout<<i<<" "<<j<<" "<<k<<" "<<l<<endl;
                        }
                    }
                }
            }
        }

        cout<<count<<endl;
    }


}

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

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

C++: #include<iostream>

using namespace std;

int main(void){
  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 <stdlib.h>

int main()
{
    int n,i,j,k,l,cnt=0;
    scanf("%d",&n);
    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=cnt+1;
                }
            }
        }
    }
    printf("%d\n",cnt);
    return 0;
}

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

int main(){
  int a,b,c,d,e,n,ans=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(i+j+k+l==n)
            ans++;
        }
        cout << ans << endl;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <complex>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<double> VEC;
typedef vector<VEC> MAT;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second.first
#define T4 second.second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
#define EPS 1.0e-9

int main(){
	int n;
	while(cin>>n){
		int ret=0;
		REP(i,10){
			REP(j,10){
				REP(k,10){
					REP(l,10){
						if(i+j+k+l==n)ret++;
					}
				}
			}
		}
		cout<<ret<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

using ll = long long;
#define debug(x) cerr << #x << ": " << x << endl;
#define line() cerr << "---------------" << endl;

int main() {
   while (1) {
      int n;
      cin >> n;

      int cnt = 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) {
                     cnt++;
                  }
               }

      cout << cnt << endl;
   }

   return 0;
}