Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		// 37以上のとき組み合わせは存在しないが省くのめんどくさいのでまとめて計算
		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>
using namespace std;
using ll = long long;

int main() {
    int n;
    while(cin >> n) {
        int res = 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) {
                        res += a+b+c+d == n;
                    }
                }
            }
        }
        cout << res << 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 <iostream>
using namespace std;

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

C++: #include <iostream>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int sum = 0;
    int cnt = 0;
    for (int a = 0; a < 10; ++a) {
    sum += a;
    for (int b = 0; b < 10; ++b) {
    sum += b;
    for (int c = 0; c < 10; ++c) {
    sum += c;
    if (sum == n) cnt++;
    }
    }
    }
    cout << cnt << endl;
  }
  return 0;
}

C++: #include <iostream>
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>
using namespace std;

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

}

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

int _abs (int n) { return n<0?-n:n; }
int main () {
	int i,n,d,a,T[20]={1},S[10]={4};
	for (i=1;i<20;++i) T[i]=T[i-1]+(i+1)*T[0];
	for (i=1;i<10;++i) S[i]=S[i-1]+(i+1)*S[0];
	while (cin>>n) {
		d=18-_abs(n-18);a=0;
		if (0<=d&&d<=18) {
			for (i=d+1;i--;) a+=T[i];
			if (d>9) for (i=d-9;i--;) a-=S[i];
		}
		cout << a << endl;
	}
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
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>
using namespace std;

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

	return(0);
}

C++: #include<iostream>
using namespace std;
#define RENT 100000
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;
	}
}

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

int a,b,x;

int mySet(int d){
  for(int i=0;i<10;i++){
    if(d<3){
      mySet(d+1);
    }else if(d==3){
      if(a==x){
      b++;
      }
    }
    a++;
  }
  return a=a-10;
}

int main(void){
  while(scanf("%d",&x)!=EOF){
  mySet(0);
  cout<<b<<endl;
  return 0;
  }
}

C++: #include<iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
int main(){
	int n,ans;
	while(cin>>n){
		ans=0;
		rep(a,10)rep(b,10)rep(c,10)rep(d,10)
			if(a+b+c+d==n)ans++;
		cout<<ans<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	int count=0;
	int n;
	while(cin>>n){
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			for(int k=0;k<10;k++){
				for(int x=0;x<10;x++){
					if(i+j+k+x==n)count++;
				}
			}
		}
	}
		cout<<count<<endl;
	}
			
	return 0;
	}

C++: #include <iostream>
using namespace std;
int main(void)
{
  int n;
  int a, b, c, d;
  int com;

  while(1)
    {
      cin >> n;
      if(n == EOF) break;
      com = 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) com++;
		    }
		}
	    }
	}
      cout << com << endl;;
    }
  return 0;
}

C++: #include "bits/stdc++.h"

#define REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N;
	while(cin>>N){
		int num=0;
		for(int a=0,ea=min(9,N);a<=ea;a++){
			for(int b=0,eb=min(9,N);b<=eb;b++){
				for(int c=0,ec=min(9,N);c<=ec;c++){
					int d=N-a-b-c;
					if(0<=d && d<=9) num++;
				}
			}
		}
		out(num);
	}

	return 0;
}

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

	return 0;
}

C++: #include <iostream>

using namespace std;
int countSolve(int a,int b,int n);
void solve(int n);

int main() {
	int n;
	while (1) {
		cin >> n ;
		solve(n);
	}
	return 0;
}

int countSolve(int a, int b, int n) {
	int x = n-a-b;
	int count = 0, i = 0 , j=0;
	for (i=0; i<10; i++) {
		for (j=0; j<10; j++) {
			if (x == i+j)
				count++;
		}
	 }
	return count;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			count += countSolve(a,b,n);
		}
	}
	cout << count << endl;
}

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