Go: package main

import (
	"fmt"
)

func main() {
	for {
		var a int
		fmt.Scan(&a)
		if a == 0 {
			break
		}
		rs := 0

		for i := 0; i < 10; i++ {
			for j := 0; j < 10; j++ {
				for k := 0; k < 10; k++ {
					for l := 0; l < 10; l++ {
						if i+j+k+l == a {
							rs++
						}
					}
				}
			}
		}
		fmt.Println(rs)
	}
}

C++: #include<stdio.h>
int n;
int i,j,h,w,cnt=0;
int main(void){
	scanf("%d",&n);
	for(i=0;i<=9;i++){
		for(j=0;j<=9;j++){
			for(h=0;h<=9;h++){
				for(w=0;w<=9;w++){
					if(n==i+j+h+w){
						cnt++;
					}
				}
			}
		}
	}
	printf("%d\n",cnt);
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
	int n;
	while(cin >> n){
		int cnt = 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){
						cnt++;
					}
				}
			}
		}
	}
	cout << cnt <<endl;
	}
return 0;

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

int main(void){
  int n,m;
  m = 0;

  while(cin >> n){
    if( n <= 36) {
      for(int i = 0; i <= 9; i++ ){
	for(int j = 0; j <= 9; j++ ){
	  for(int k = 0; k <= 9; k++ ){
	    if(n - i - j - k >=0 ){
	      if(n - i - j - k <=9){
		m++;
	      }
	    }
	  }
	}
      }
    }
    cout << m << endl;
    m = 0;
  }

  return 0;
}

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		long long 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;
	}
	getchar();
	getchar();
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
//#include <boost/multiprecision/cpp_int.hpp>
//using multiInt = boost::multiprecision::cpp_int;

using ll = long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
template<typename Q_temp>
using smaller_queue = priority_queue <Q_temp, vector<Q_temp>, greater<Q_temp> >;

const ll MOD = (ll) (1e9 + 7);
//const ll MOD = 998244353;
const int INF = (int) 1e9;
const ll LINF = (ll) 4e18;
const double PI = acos(-1.0);

#define REP(i,m,n) for(ll i = m; i < (ll)(n); ++i)
#define rep(i,n) REP(i, 0, n)
#define MP make_pair
#define MT make_tuple
#define YES(n) cout << ((n) ? "YES" : "NO") << endl
#define Yes(n) cout << ((n) ? "Yes" : "No") << endl
#define Possible(n) cout << ((n) ? "Possible" : "Impossible") << endl
#define all(v) v.begin(), v.end()
#define NP(v) next_permutation(all(v))
#define dbg(x_) cerr << #x_ << ":" << x_ << endl;
#define dbg2(x_) for(auto a_ : x_) cerr << a_ << " "; cerr << endl;
#define dbg3(x_ , sx_) rep(i, sx_) cerr << x_[i] << " "; cerr << endl;
vector<int> Dx = {0, 0, -1, 1, -1, 1, -1, 1, 0};
vector<int> Dy = {1, -1, 0, 0, -1, -1, 1, 1, 0};

inline ll CEIL(ll a, ll b) {
    return (a + b - 1) / b;
}

void finish() {
    cout << -1 << endl;
    exit(0);
}

//------------------------------------------------------

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << setprecision(20) << setiosflags(ios::fixed);

    int n;
    while (cin >> n) {
        int cnt = 0;

        rep(a, 10) rep(b, 10) rep(c, 10) rep(d, 10) {
            if (a + b + c + d == n) cnt++;
        }
        cout << cnt << endl;
    }



    return 0;
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <cmath>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <functional>
#include <numeric>

using namespace std;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

#define REP(i,n) for(int i = 0; i < (int)(n); ++i)
#define FOR(i,a,b) for(int i = (a); i < (int)(b); ++i)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(v) ((int)v.size())

#define pb push_back
#define mp make_pair

// a + b = n (0 <= a, b <= 9)??¨??????????????????????????°
int calc(int n) {
    if (n > 18) return 0;
    if (n > 9) n = 18 - n;
    return n + 1;
}

int main(void)
{
    cin.sync_with_stdio(false);
    int n;

    while(cin >> n) {
        int ret = 0;
        REP(a_plus_b, n + 1) {
            int c_plus_d = n - a_plus_b;
            ret += calc(a_plus_b) * calc(c_plus_d);
        }
        cout << ret << endl;
    }
    return 0;
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	for(int i = 0; i < 1000; i++){
		a[i] = 1;
	}
	while(cin >> n){
		if(n > 36 || n < 0){
			a[t] = 0;
		}
		else if(n > 18){
			n = 36-n;
		}
		for(int i = n+3; i > n; i--){
			a[t] = a[t]*i;
		}
		a[t] = a[t]/6;
		cout << a[t] << endl;
		t++;
	}
}

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

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

  cout << cou << "\n";
  }

  return 0;
}

C++: #include<stdio.h>

int main(void){

int n,h;
int a,b,c,d;

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

return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
long n;
long nn[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670,
660,633,592,540,480,415,348,282,220,165,120,84,56,35,20,10,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
for(;;){
cin>>n;
if(cin.eof())break;
cout<<nn[n]<<endl;
}
return 0;
}

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

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

C++: #include "bits/stdc++.h"
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;
	cin>>n;
	int sum=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)sum++;
				}
			}
		}
	}
	cout<<sum<<endl;
}

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n;
  while(cin >> n) {
    ll cnt = 0;
    rep(i, 10) rep(j, 10) rep(k, 10) rep(l, 10) {
      if(i + j + k + l == n) cnt++;
    }
    cout << cnt << endl;
  }

	return 0;
}

C++: #include<iostream>

using namespace std;

int main() { 
    int sum; 

    while( cin >> sum ) {

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

C++: #include<stdio.h>
#include<string.h>
int main(void) {
	int  n, count = 0;
	while (1)
	{
		scanf("%d", &n);
		if (n==EOF)break;
		for (size_t a = 0; a <= 9; a++)
		{
			for (size_t b = 0; b <= 9; b++)
			{
				for (size_t c = 0; c <= 9; c++)
				{
					for (size_t d = 0; d <= 9; d++)
					{
						if (a + b + c + d==n)
						{
							count++;
						}
					}
				}
			}
		}
		printf("%d\n", count);
		count = 0;
	}
	return 0;
}