Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                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++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

C++: #include <iostream>
#include <queue>
#include <vector>
#include <math.h>
#include <algorithm>
#include <iomanip>
#include <string>
using namespace std;

int main(){
	int n;
	while (cin >> n) {
		int dp[4][51] = {}; //abcd, n
		for (int i = 0; i <= 9; ++i) {
			dp[0][i] = 1;
		}
		for (int i = 1; i < 4; ++i) {
			for (int j = 0; j < 50; ++j) {
				for (int k = 0; k <= 9; ++k) {
					dp[i][j+k] += dp[i-1][j];
				}
			}
		}
		cout << dp[3][n] << endl;
	}
	return 0;
}

C++: #include <stdio.h>
int main() {
    int a,b,c,d,RideBack[55];for (a=0;a<=50;RideBack[a++]=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++) RideBack[a+b+c+d]++;
    while (scanf("%d",&a)!=EOF) printf("%d\n",RideBack[a]);return 0;
}

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