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;

template<typename T> class Polynomial {
private:
  vector<T> val;
	
public:
	Polynomial() {}

	Polynomial(const vector<T>& val) : val(val) {}

	Polynomial(const int n) : val(vector<T>(n, 0)) {}

	Polynomial(const int n, const T val) : val(vector<T>(n, val)) {}

	Polynomial operator+=(const Polynomial& p) {
    for (int i = 0; i < p.size(); ++i) {
      if (int(val.size()) == i) val.emplace_back(p[i]);
      else val[i] += p[i];
    }
		return *this;
	}
  
	Polynomial operator-=(const Polynomial& p) {
    for (int i = 0; i < p.size(); ++i) {
      if (int(val.size()) == i) val.emplace_back(-p[i]);
      else val[i] -= p[i];
    }
		return *this;
	}
  
	Polynomial operator*=(Polynomial p) {
		return *this = *this * p;
	}
  
	Polynomial operator+(const Polynomial& p) const {
		Polynomial res = *this;
		res += p;
		return res;
	}
	
	Polynomial operator-(const Polynomial& p) const {
		Polynomial res = *this;
		res -= p;
		return res;
	}

  // TODO FFT
	Polynomial operator*(Polynomial& p) {
		Polynomial res(size() + p.size());
    for (int i = 0; i < size(); ++i) {
      for (int j = 0; j < p.size(); ++j) {
        res[i + j] += val[i] * p[j];
      }
    }
		return res;
	}
	
  T& operator[](int i) {
    return val[i];
  }

  int size() const {
    return val.size();
  }

  Polynomial identity() const {
    return Polynomial(1, 1);
  }
};

int main() {
  Polynomial<int> poly;
  poly = poly.identity();
  for (int i = 0; i < 4; ++i) poly *= Polynomial<int>(10, 1);

  int n;
  while (cin >> n) cout << poly[n] << endl;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <string>
#define rep(x,to) for(x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int num,i,j,k,l;
int cnt;

	while(cin >> num){
		cnt=0;
		rep(i,10) rep(j,10) rep(k,10) rep(l,10)
			if(i + j + k + l == num ) cnt++;
		cout << cnt << endl;
	}
	return 0;
}

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

int main()
{

	int n,k;
	while(cin>>n){
	k=0;
	for(int i=0;i<10;i++){
		for(int j=0;j<=(n-i)&&j<10;j++){
			for(int h=0;h<=(n-(i+j))&&h<10;h++){
				for(int g=0;g<=(n-(i+(j+h)))&&g<10;g++){
					if((i+j+h+g)==n){
						k++;
					}
				}
			}
		}
	}

	cout<<k<<endl;
	}
}

C++: #include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <map>
#include <queue>
#include <algorithm>
#include <functional>

#define REP(i,n) for(int i=0; i<n; i++)
#define FOR(i,a,b) for(int i=a; i<=b; i++)
#define ll long long

using namespace std;


int main(void) {
    int n;
    while (cin>>n){
        int ans = 0;
        REP(a,10){
            REP(b,10){
                REP(c,10){
                    REP(d,10){
                        if (a+b+c+d==n)
                            ans++;
                    }
                }
            }
        }
        cout << ans <<endl;;
    }
    return 0;
}

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


int main(){

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

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;
a=0;b=0;c=0;d=0;count=0;
}
}

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>
#include <array>
#include <cstdint>

int main()
{
	std::int32_t n;
	while (std::cin >> n) {
		std::int32_t num_comb = 0;
		for (std::int32_t a = 0; a < 10; ++a) {
		for (std::int32_t b = 0; b < 10; ++b) {
		for (std::int32_t c = 0; c < 10; ++c) {
		for (std::int32_t d = 0; d < 10; ++d) {
			if (a + b + c + d == n) {
				++num_comb;
			}
		}}}}
		std::cout << num_comb << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>

using namespace std;


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

C++: #include <iostream>

using namespace std;

int combination(int n)
{
	int count = 0;
	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)
					{
						count++;
					}
				}
			}
		}
	}
	return count;
}

int main()
{
	int n;
	while (cin >> n, !cin.eof())
	{
		cout << combination(n) << endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n,i,j,k,l,cnt;
  while(cin >> n){
    cnt=0;
    for(i=0;i<=9;i++){
      for(j=0;j<=9;j++){
	for(k=0;k<=9;k++){
	  for(l=0;l<=9;l++){
	    if(i+j+k+l==n) cnt++;
	  }
	}
      }
    }
    cout << cnt << endl;
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int a,b,c,d,n,C;
while(cin>>n){
C=0;
a=0;
b=0;
c=0;
d=0;
for(int i=0;i<9;i++){
for(int j=0;j<10;j++){
for(int k=0;k<10;k++){
for(int l=0;l<10;l++){
if(a+b+c+d=n)C++;
d++;}
c++;}
b++;}
a++;}
cout<<C;}
}

C++: #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
#include <cctype>
#include <utility>

using namespace std;
 
int main(){
  int n;
  while(~scanf("%d",&n)){
    int res = 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) res++;
    printf("%d\n",res);
  }
}

C++: #include <stdio.h>

int main(void)
{
	int n;
	int i, j, k, l;
	int ans = 0;
		
	scanf("%d", &n);
			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 == n){ ans += 1; }
						}
					}
				}
			}
			
			printf("%d", ans);

		return 0;
}

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

int main(){
    while(1){
    int n,ans=0;
    cin>>n;
    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>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

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