Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

C++: #include<stdio.h>
int main(void)
{
	int n,i,j,k,d,c;
	while(scanf("%d",&n)!=EOF){
		c=0;
		for(i=0;i<10;i++){
			for(j=0;j<10;j++){
				for(k=0;k<10;k++){
					for(d=0;d<10;d++){
						if(i+j+k+d==n){
							c++;
						}
					}
				}
			}
		}
		printf("%d\n",c);	
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

#define MAX 256

int miku(int x){
	if(x > 36)return 0;
	if(x < 10)return (x + 3)*(x + 2)*(x + 1) / 6;
	if(x > 18)return miku(36 - x);
	if(x > 9 && x < 19)return (x + 3)*(x + 2)*(x + 1) / 6 - (miku(x - 10) * 4);
}

int main(void){
	int n,i = 0;
	int ans[MAX];
	
	while(cin >> n){
		ans[i] = miku(n);
		i++;
	}
	
	for(int j = 0;j < i;j++){
		cout << ans [j] <<endl;
	}

	return 0;
}

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

int main(void){
  int dp[50][4];
  for(int i = 0; i < 50; i++){
    for(int j = 0; j < 4; j++){
      if(i < 10 && j == 0)
	dp[i][j] = 1;
      else
	dp[i][j] = 0;
    }
  }
  
  for(int i = 1; i < 4; i++){
    for(int j = 0; j < 10; j++){
      for(int k = 0; k < 37; k++){
	if(k - j >= 0){
	  dp[k][i] += dp[k - j][i - 1];
	}
      }
    }
  }
  
  int n;
  while(cin >> n){
    cout << dp[n][3] << endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n;

	while(cin >> n) {
		int result = 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 (n == a + b + c + d) result++;

					}	
				}	
			}
		}
		cout << result << endl;
	}

	return 0;
}

C++: #include<stdio.h>

int main(void){
	int n,ans=0;
	scanf_s("%d",&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(n==(a+b+c+d))
						ans++;
				}
			}
		}
	}
	printf("%d",ans);
	return 0;
}

C++: 
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <map>
#define pi 3.14159265358979323846264338
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>
#include<cstdio>
#include<algorithm>
using namespace std;

int n;

int forf(int cnt,int t){
    if(cnt==0){
        if(cnt==n){
            return 1;
        }else{
            return 0;
        }
    }else{
        int tt=0;
        for(int i=0;i<10;i++){
            tt=forf(cnt-1,t+i);
        }
        return tt;
    }
}

int main(){
    while(scanf(" %d",&n)){
        cout << forf(4,0) << endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
while(1){
ans=0;
if(!(cin>>x)) 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;
}
}

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

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

  return 0;
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int n;
	while(cin >> n)
	{
		if(n >= 37)
		{
			cout << 0 << endl;
		}
		else
		{
			int count = 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)
							{
								++count;
							}
						}
					}
				}
			}
			cout << count << endl;
		}
	}
}

int main()
{
	solve();
	return(0);
}

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

#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define vmax_v(ary) *max_element(all(ary))
#define vmin_v(ary) *min_element(all(ary))
#define vmax_id(ary) distance((ary).begin(),max_element(all(ary)))
#define vmin_id(ary) distance((ary).begin(),min_element(all(ary)))

using ll = int64_t;
using pll = pair<ll,ll>;
using vl = vector<ll>;

const ll INF=INT64_MAX;
const double EPS=1e-10;
const double PI=acos(-1.0);

void init(){cin.tie(0);ios::sync_with_stdio(false);}
//----------------------------------------------------

int main(){
    init();

    ll n;
    while(cin>>n,!cin.eof()){
      ll ct=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){
                ct++;
              }
            }
          }
        }
      }
      cout << ct << endl;
    }
    return 0;
}

C++: #include<stdio.h>

int main(){
        int n,m = 0;
        while( scanf("%d",&n)!=EOF){
                if(n > 50)
                        continue;
                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){
                                                        m += 1;
                                                }
                                        }
                                }
                        }
                }
                printf("%d\n",m);
                m = 0;
        }
        return 0;
}

C++: #include <iostream>

using namespace std;

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

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

C++: #include<stdio.h>

int n=0;
int count=0;

int main(){
	while(scanf("%d",&n)!=EOF){
		count=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) count++;
					}
				}
			}
		}
		printf("%d\n",count);
	}
	

	return 0;
}