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<bits/stdc++.h>
using namespace std;
int main(){
    int n=0,cnt=0;
    cin >> n;
    for(int i=0;i<10;i++){
        for(int r=0;r<10;r++){
            for(int l=0;l<10;l++){
                for(int k=0;k<10;k++){
                    if(n==i+r+l+k)cnt++;
                }
            }
        }
    }
    cout << cnt;
    return 0;
}

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

int main () {

int n, count = 0;

while(cin >> n){

    for (int a = 0; a < 10 && a <= n; a++){
        for (int b = 0; b < 10 && b <= n-a; b++){
            for (int c = 0; c < 10 && c <= n-a-b; c++){
                if (n-a-b-c >=0 && n-a-b-c < 10) {
                    count++;
                }
            }
        }
    }


    cout << count << endl;

    count = 0;


}



    return 0;

}

C++: #include <iostream>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<map>
#include<algorithm>
#include<vector>
using namespace std;
map <int,int>mp;
void precalculation()
{
    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++){
                    mp[a+b+c+d]++;
                }
            }
        }
    }
}

int main()
{
    for(int i=0;i<=50;i++) mp[i]=0;
    precalculation();
    int n;
    while(scanf("%d",&n)==1){
        printf("%d\n",mp[n]);
    }
    return 0;
}

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

int cnt=0;
int n;

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

int main(){
    while(scanf(" %d",&n)){
        if(n>36){
            cout << '0' << endl;
        }else{
            cnt=0;
            forf(0,0);
            cout << cnt << endl;
        }
    }
    return 0;
}

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

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

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
 int n, a, b, c, d, count = 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) count++;
        }
      }
    }
  }
  cout << count << endl;
  count = 0;
 }

 return 0; 
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<int,int>
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)

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

C++: #include<stdio.h>
 
int main(){
    int a;
    while(~scanf("%d",&a)){
        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==a)ans++;
        printf("%d\n",ans);
    }
}

C++: #include<iostream>
using namespace std;
int main(){
	int a, b, c, d,f;
	int e=0;
	while (cin >> e){
		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 (e == a + b + c + d){
							f = 0;
							f = f + 1;
						}
					}
				}
			}
		}
		cout << f << endl;
	}
	return 0;
}

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

int main(){
	int n, i, a,b,c,d;

	while(scanf("%d", &n)){

	for(i=0, 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) i++;	
				}
			}
		}
	}

	printf("%d\n", i);
	}
 return 0;
}

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


int main() {

	int n;

	int min;
	int d;
	int count;
	while (cin >> n) {
		if (n < 9) {
			min = n;
		}
		else {
			min = 9;
		}
		count = 0;

		for (int i = 0; i <= min; i++) {
			for (int j = 0; j <= min; j++) {
				for (int k = 0; k <= min; k++) {
					d = n - i - j - k;
					if (d >= 0 && d <= 9) count++;

				}
			}
		}

		printf("%d\n", count);
	}

	//system("pause");
	return 0;
}

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<string>
#include<queue>
#include<cmath>
#include<map>
#include<set>
#include<list>
#include<iomanip>
#include<vector>
#include<random>
#include<functional>
#include<algorithm>
#include<stack>
#include<cstdio>
#include<bitset>
#include<unordered_map>
#include<climits>
#include<fstream>
using namespace std;
///////////////////library zone!!!!!!!!!!!!!!!!!!!!!!!!!!!!
typedef long long ll;
typedef long double ld;
#define all(a) (a).begin(),(a).end()
const ll Mod = 1000000007;
const ll mod = 998244353;
struct H {
	ll x, y;
	bool operator<(const H &b) const {
		if (x != b.x) return x < b.x;
		return y < b.y;
	}
	bool operator>(const H &b) const {
		if (x != b.x) return x > b.x;
		return y > b.y;
	}
	bool operator==(const H &b) const { return x == b.x&&y == b.y; }
	bool operator!=(const H &b) const { return (*this) != b; }
};
struct P {
	ll pos, cost;
	bool operator<(const P &b) const { return cost < b.cost; }
	bool operator>(const P &b) const { return cost > b.cost; }
};
struct B {
	ll to, cost;
};
struct E {
	ll from, to, cost;
	bool operator<(const E &b) const { return cost < b.cost; }
	bool operator>(const E &b) const { return cost > b.cost; }
};
template<typename T, typename U>
void chmin(T &a, U b) {
	if (a > b) a = b;
}
template<typename T, typename U>
void chmax(T &a, U b) {
	if (a < b) a = b;
}
template<typename T>
T max_0(T a) {
	if (a < 0) return 0;
	return a;
}
template<typename T>
T min_0(T a) {
	if (a > 0) return 0;
	return a;
}
ll read() {
	ll u;
	ll k = scanf("%lld", &u);
	return u;
}
ll gcd(ll i, ll j) {
	if (i > j) swap(i, j);
	if (i == 0) return j;
	return gcd(j%i, i);
}
ll mod_pow(ll x, ll n, ll p) {
	ll res = 1;
	while (n > 0) {
		if (n & 1) res = res * x % p;
		x = x * x % p;
		n >>= 1;
	}
	return res;
}//x^n%p
const ll Inf = 3023372036854775807;
const int inf = 1500000000;
#define int long long
//----------------------------------------------------
signed 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 x = 0; x < 10; x++) {
					for (int y = 0; y < 10; y++) {
						if (i + j + x + y == n) {
							ans++;
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
}

C++: ??£??£???

C++: #include<iostream>

using namespace std;

#define MAX 256

int kai (int x){
	if(x == 1 || x == 0)return 1;
	return x * kai(x - 1);
}

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

int main(void){
	int n,i = 0;
	int ans[MAX];
	
	while((n = cin.get()) != EOF){
		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 n,a[4],count;

	while(cin >> n){
		count=0;
		for(a[0]=0;a[0]<10;a[0]++)
			for(a[1]=0;a[1]<10;a[1]++)
				for(a[2]=0;a[2]<10;a[2]++)
					for(a[3]=0;a[3]<10;a[3]++)
						if(a[0]+a[1]+a[2]+a[3]==n){
							count++;
							break;
						}
		cout << count << endl;
	}

	return 0;
}