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

int main()
{
    int n,x=0;
    while(cin>>n)
    {
        for(int i=0;i<9;i++){
            for(int j=0;j<9;j++){
                for(int k=0;k<9;k++){
                    d=n-i-j-k;
                    if(d>=0&&d<=9)
                        x++;
                }
            }
        }
        cout<<x<<endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;


int main()
{
    int num = 0;
    int cnt = 0;
    
    while (cin >> num)
    {
        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 m = 0; m < 10; m++)
                    {
                        if (num == (i + j + k +m))
                        {
                            cnt++;
                        }
                    }
                }
            }
        }
        
        cout << cnt << endl;
    }
    
    return 0;
}

C++: #include <stdio.h>

int ans[55] = { 0 } ;

void init ( ) ;

int main ( )
{
	int s ;
	init ( ) ;
	while ( scanf ( "%d" , &s ) == 1 ) {
		printf ( "%d\n" , ans[s] ) ;
	}
	return 0 ;
}

void init ( )
{
	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++ ) {
					ans[i+j+k+l]++ ;
				}
			}
		}
	}
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <algorithm>
#include <sstream>
#include <cmath>
#include <set>
#include <iomanip>
using namespace std;

#define REP(i,n) for(int (i)=0;(i)<(int)(n);(i)++)
#define REMOVE(Itr,n) (Itr).erase(remove((Itr).begin(),(Itr).end(),n),(Itr).end())
#define PB_VEC(Itr1,Itr2) (Itr1).insert((Itr1).end(),(Itr2).begin(),(Itr2).end())
#define UNIQUE(Itr) sort((Itr).begin(),(Itr).end()); (Itr).erase(unique((Itr).begin(),(Itr).end()),(Itr).end())
#define BOUND(Itr,val) lower_bound((Itr).begin(),(Itr).end(),(val))
typedef long long ll;

int main(){
    
    
    
    int ans=0;
    int n;
    while(cin>>n){
    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;
  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;

/*
inline int factorial(int n)
{
    int x = 1;
    for (;n != 0; n--)
        x *= n;
    return x;
}

inline int factorial(int s, int n)
{
    int x = 1;
    for (;n > s; n--)
        x *= n;
    return x;
}

inline int conbination(int n, int r)
{
    return factorial(n - r, n) / factorial(r);
}

inline int homogeneous(int n, int r)
{
    return conbination(n + r - 1, r);
}
*/

int calc(int n, int k)
{
    if (k == 0)
        if (n == 0)
            return 0;
        else
            return 1;

    for (int i = 0; i <= 9; i++) {
        n -= i;
        if (n < 0)
            return 0;
        else
            return calc(n, k - 1);
    }

}

int main()
{
    for (int n; cin >> n;)
        cout << n << " " << calc(n, 4) << endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int dp[40];
int main(){
	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++){
					dp[i+j+k+l]++;
				}
			}
		}
	}
	int n;
	while(cin>>n){
		if(n==0){break;}
		cout<<dp[n]<<endl;
	}
	return 0;
}

C++: #pragma GCC optimize("Ofast,unroll-loops")
#include<bits/stdc++.h>

using namespace std;
using Int = long long;
typedef pair<int,int> Pi; typedef pair<Int,Int> Pl;
constexpr int mod = 1e9+7;
constexpr int INF32 = numeric_limits<int>::max();
constexpr Int INF64 = numeric_limits<Int>::max();
#define END {cout<<ans<<'\n'; return 0;}
#define ALL(v) (v).begin(),(v).end()
#define fi first
#define se second
#define mp make_pair
#define eb emplace_back
#define Pr(t) priority_queue<t>
#define gPr(t) priority_queue<t,vector<t>,greater<t>>
#define V(t) vector<t>
#define rer(i,l,r) for(int(i)=(l); (i)<(r); ++(i))
#define rep(i,n) rer(i,0,n)
#define gnr(i,l,r) for(int (i)=(r)-1; (i)>=(l); --(i))
#define pri(a) cout<<(a)<<'\n'
#define pri2(a,n) {rep(i,n-1)cout<<a[i]<<' '; if(n)cout<<a[n-1]<<'\n';}
#define prip(p) cout<<(p).fi<<' '<<(p).se<<'\n'
template<class T> inline bool cmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool cmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

int n,m,_,x,y,q;
string s,sb;
bool ok;
char cf,cb;

int main(){
  cin.tie(nullptr); ios::sync_with_stdio(0);
  //cout<<fixed<<setprecision(20);
  
  while(cin>>n){
    int ans=0;
    rep(i,10)rep(j,10)rep(k,10)if(i+j+k<=n&&n-(i+j+k)<10)ans++;
    pri(ans);
  }
}

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<algorithm>
#include<vector> 
#include<limits>
#include<numeric>
#include<math.h>
using namespace std;

#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define in(x) cin >> x
#define out(str) cout << str << endl

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

int N,ans;

int main(){
    while(cin>>N){
        ans=0;
        rep(i,10){
            rep(j,10){
                rep(k,10){
                    rep(l,10){
                        if(i+j+k+l==N)ans++;
                    }
                }
            }
        }
        out(ans);
    }
}

C++: #include <iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);++i)
int main(){
	int n,a,ans=0;
	while(cin >> n){
		rep(i,10){
			rep(j,10){
				rep(k,10){
					a=n-i-j-k;
					if(a>=0 && a<10){
						ans++;
					}
				}
			}
		}
		cout << ans << endl;
		ans = 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 <stdio.h>
#include <iostream>
#include <math.h>

int main(){
  int n, num;
  
  while(scanf("%d", &n)!=EOF){
    num = 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) num++;
          }
        }
      }
    }
    std::cout << num << std::endl;
  }
  
  return 0;
}

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