Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main(void)
{
	int n;
	while (cin >> n)
	{
	    int count = 0;
	    rep(i, 10)
	    {
	        rep(j, 10)
	        {
	            rep(k, 10)
	            {
	                rep(l, 10)
	                {
	                    if (i + j + k + l == n) count++;
	                }
	            }
	        }
	    }
	cout << count << endl;
	}
}

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

using namespace std;

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

C++: #include <iostream>

using namespace std;

int main(){
  int n;
  while(cin >> n){
    int res = 0;
    for(int i=0;i<10000;i++){
       int s = 0;
       for(int t=i;t;t/=10) s += t%10;
       if(s==n) res++;
    }
    cout << res << endl;
  }
}

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

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

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

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

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

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

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

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

}

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


int main()
{
	int n, count=0;

	while (cin >> n)
	{
		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;
	}
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<n;i++)
#define INF (int) 2e9
#define MOD (int) 1e9 + 7

int main(){
    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>
using namespace std;

int main(){
	int in;
	while (cin >> in, !cin.eof()){
		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 == in)	ans++;
		cout << ans << endl;
	}
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int gcd( int, int );

int main()
{
	int n, count;

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

	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

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

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

int res(int n){
 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++;

 return count;
}
int main()
{
 int n;
 while(cin >> n)
  res(n);

 return 0;
}

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

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

}

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

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	while(cin >> n){
	
	int ans = 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){
						ans++;
					}
				}
			}
		}
	}
	
	cout << ans << endl;
	
	return 0;
	}
}