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 <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(){
	while(!cin.eof()){
		int ret=0;
		int n;
		cin >> n;
		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<iostream>
#include<cstdio>

using namespace std;

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

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

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

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

C++: #include<iostream>

int main( void )
{
	int n, count;

	while( std::cin >> n ){
		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( n == a + b + c + d ){
							count++;
							break;
						}
					}
				}
			}
		}

		std::cout << count << std::endl;
	}

	return 0;
}

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

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

C++: #include<stdio.h>

int main(){
    int i,a,b,c,d,n;
    int stack[50],sp=0;
    while(scanf("%d",&stack[sp++])!=EOF);
    for(i=0;i<sp-1;i++){
        n=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(stack[i]==a+b+c+d)n++;
        printf("%d\n",n);
    }
    return 0;
}

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

int main(){
 int n;
 int ans = 0;
 while(true){
 scanf("%d\n",&n);
 if(n == EOF) break;
 ans = 0;
 for(int a = 9;a >= 0;a--){
   for(int b = 9;b >= 0;b--){
     for(int c = 9;c >= 0;c--){
       for(int d = 9;d >= 0;d--){
        if(a+b+c+d == n){ans++; break;}
        if(a+b+c+d < n) break;
       }
     }
   }
 }
 printf("%d\n",ans);
 }
}

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

int main(){

  int n;
  int comb[4][51] = {0};

  for(int i=0; i<10; i++){
    comb[0][i] = 1;
  }

  for(int i=1; i<4; i++){
    for(int j=0; j<9*i+10; j++){
      for(int k=0; k<10; k++){
        if(j-k>=0){
          comb[i][j] += comb[i-1][j-k];
        }
      }
    }
  }

/*  for(int i=0; i<4; i++){
    for(int j=0; j<51; j++){
      cout << comb[i][j] << " ";
    }
    cout << endl;
  }
*/

  while(cin >> n){
    cout << comb[3][n] << endl;
  }

  return 0;
}

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

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

C++: #include<stdio.h>
 
int main(void){
    int a, b, c, d, n = 0;
    int ans = 0;
     
    while(scanf("%d", &n) != EOF){
        ans = 0;
        if(n <= 36){
            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);
        }else{
            printf("0\n");
        }
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
while(1){
ans=0;
cin>>x;
if(x=<0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
ans++;
}
}
}
}
cout<<ans;
}
return 0;
}

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

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

	while( cin >> n ){
		iCount = 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 )
							iCount++;
					}
				}
			}
		}

		cout << iCount << endl;

	}

	cout << iCount << endl;

	return 0;
}

C++: #include<iostream>
#include <cstdio>
#include<cmath>
#include<vector>
#include<algorithm>

using namespace std;

////Nayeem Shahriar Joy,Applied Physics &Electronic Engineering,University of Rajshahi.

int main()

{
    int count=0,n;
    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)
                    {
                        count++;
                    }
                }
            }
        }
    }
    cout<<count<<endl;
}

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

}

C++: #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
	while(cin >> n) {
		if(n >= 37) continue;
		int ret = 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++) {
						if(i + j + k + l == n) ret++;
					}
				}
			}
		}
		cout << ret << endl;
	}
}