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 <iostream>

using namespace std;

bool calc(int a, int b, int n) {
	n -= a-b;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (n == c+d) return true;
		}
	}
	return false;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			if (calc(a,b,n)) cout++;
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
bool h[1000010]={false};
int main(){
	int n;
	while(cin>>n){
		int co=0;
		rep(i,10)rep(j,10)rep(k,10)rep(q,10)if(i+j+k+q==n)co++;
		cout<<co<<endl;
	}
}

C++: #include <bits/stdc++.h>

using namespace std;

#define Vi vector<int>
#define FOR(i,s,e) for (int i=s; i<e; i++)
#define ITER(v) v.begin(), v.end()

constexpr int n_ints = 4;
constexpr int min_int = 0;
constexpr int max_int = 9;

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    cin >> n;

    int res = 0;
    FOR(a,min_int,max_int+1)
    FOR(b,min_int,max_int+1)
    FOR(c,min_int,max_int+1)
    FOR(d,min_int,max_int+1) {
        int sum = a + b + c + d;
        if (sum == n) { ++res; }
    }
    cout << res << endl;

    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 l=0; l<10; l++){
	  for(int m=0; m<10; m++){
	    if(i+j+l+m == n){ans++;}
	  }
	}
      }
    }
    cout <<ans<<endl;
  }
  return 0;
}

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime>
using namespace std;

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

C++: #include<iostream>
using namespace std;
#define rep(i,j) for(i=0;i<j;i++)
int main()
{

  int n;

  while(cin>>n)
    {

      int a,b,c,d;
      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>
using namespace std;

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

C++: #include <iostream>

int main(int argc, char const* argv[])
{
	unsigned  n{};
	while (std::cin >> n) {
		unsigned sum{};
		for (int i = 0; i < 10000; i++) {
			auto a = i / 1000;
			auto b = (i - a * 1000) / 100;
			auto c = (i - a * 1000 - b * 100) / 10;
			auto d = i % 10;
			auto e = a + b + c + d;
			if (n == e) {
				sum++;
			}
		}
		std::cout << sum << std::endl;
	}
	return 0;
}

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

#define rep(i, j) for(int i = 0; i < j; i++)
// sp_rep
#define sp_rep(i, j) for(int i = 0; i <= j; i++)
#define all(i) i.begin(), i.end()
#define ll long long

using namespace std;

string Num2Str(int num)
{
	stringstream ss;
	ss << num;
	return ss.str();
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	// code
	int n;
	while (cin >> n) {
		int cnt = 0;
		sp_rep(a, 9) {
			sp_rep(b, 9) {
				sp_rep(c, 9) {
					sp_rep(d, 9) {
						if (n == (a + b + c + d)) cnt++;
					}
				}
			}
		}
		cout << cnt << endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int solve = 0;
    for(int i=0; i<10; i++)
      for(int j=0; j<10; j++)
	for(int k=0; k<10; k++)
	  if(n-i-k-j>=0 && n-i-j-k<10) solve++;
    cout <<solve<<endl;
  }
  return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

main(){
		int l;
		while(cin>>l){
			int o=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==l){
								o=o+1;
							}
						}
					}
				}
			}
			printf("%d\n",o);
		}
}

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

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

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

C++: #include <iostream>
#include <functional>

using namespace std;


int count2=0;

void saiki(int a, int b,int n){
	
}

int main(){
	int n;
	int count2 = 0;
	cin >> n;

	function<int(int, int, int)> x = [=,&count2](int a, int b, int n)->int{
		if (b == 0){
			if (n == a)count2++;
		}
		else{
			for (int i = 0; i < 10; i++){
				saiki(a + i, b - 1, n);
			}
		}
	};

	
	/*while (cin >> n){
		
	}*/
	x(0, 4, n);

	cout << count2;
	return 0;
}

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

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
	int n, ans;
	while(cin >> n){
		ans=0;
		rep(i,10) rep(j,10) rep(k,10) rep(l,10) if(i+j+k+l==n) ans++;
		cout << ans << endl;
	}
    return 0;
}

C++: #include<iostream>
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;
  }
}

C++: #include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<functional>
#include<vector>
#include<math.h>
#define L(_i,_N) for(int _i=0;_i<_N;_i++)
#define C(_Dis) cout<<_Dis<<endl;

using namespace std;

typedef long long int lli;

int main() {
	int n,Count=0;
	while (cin >> n) {
		L(i, 10)L(j, 10)L(k, 10)L(l, 10)if (i + j + k + l == n) Count++;
		C(Count);
		Count = 0;
	}
	return 0;
}

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

int dp[51];

int main(void)
{

	int n;
	while(cin >> n, !cin.eof()){

		for(int i = 1; i <= n; i++){
			for(int j = 1; i * j <= 50; j++)
				dp[i*j]++;
		}

		cout << dp[n] << endl;

	}


	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n;
while(scanf("%d,"&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++;
}
}
}
}
printf("%d\n",ans);
}
return 0;
}