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<iostream>
using namespace std;
int main(){
	int n=0,kaisu=0;
	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){
							kaisu++;
						}
					}
				}
			}
		}
		cout<<kaisu<<endl;
		kaisu=0;
	}
}

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

int main(){
	int n,a,b,c,d,count;
	while(scanf("%d",&n)==1){
	count = 0;
	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 = count + 1;
				}
			}
		}
	}
	printf("%d\n",count);
	}
	return 0;
}

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

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

C++: #include<stdio.h>
int main()
{
	int n;
	while(scanf("%d",&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(n==i+j+k+l)
							count++;
		printf("%d\n",count);
	}
	return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
  int n,count;
  while(cin>>n){
    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<iostream>

using namespace std;


int main()
{
	int n;
	int ans;

	for(;cin >> n;)
	{
		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;
	
	}
}

C++: #include <cstdio>

int count_combinations_of_sums(int n, int num_rests) {
  if (num_rests * 9 < n) { return 0; }
  if (num_rests == 1) { return 1; }
  int count = 0;
  for (int i = 0; i <= 9 && i <= n; ++i) {
    count += count_combinations_of_sums(n - i, num_rests - 1);
  }
  return count;
}

int main() {
  int n;
  while (true) {
    if (scanf("%d", &n) != 1) { break; }
    printf("%d\n", count_combinations_of_sums(n, 4));
  }
  return 0;
}

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

int times = 0;
int deep(int c, int depth)
{
	if (depth < 3)
	{
		for (int i = 0; i < 10; i++)
		{
			if (c >= i)
			{
				deep(c - i, depth + 1);
			}
		}
	}
	else if (depth == 3 && c < 10) 
		times++;
	return 0;
}

int main()
{
	int n;
	while (cin >> n)
	{
		times = 0;
		int c = n;
		if (c <= 36)
			deep(c, 0);
		else
			times = 0;
		cout << times << 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){
			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]/6;
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i] << endl;
	}
}

C++: #include <iostream>
using namespace std;
#define rep(i,a,n) for(int i=a; i<n; i++)

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	for(int x;cin>>x;)
	{
		if(x>18)
			x=36-x;
		int sum=1;
		for(int i=1;i<=x;i++)
		{
			int a=(1+i+1)*(i+1)/2;
			sum +=a;
		}
		cout<<sum<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n, a, b, c, d,ans,count=0;
	while (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;
						if (ans == n) {
							count++;
						}
					}
				}
			}
		}

		cout << count << endl;
		count = 0;
	}
	return 0;
}

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

int cnt=0;
int n;

int forf(int t,int ti){
    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 n,i,S;
  while(cin >> n){
    i = 0;
    for(S=0;S<=9999;S++){
      if((S/1000)+((S-S/1000*1000)/100)+((S-S/100*100)/10)+(S-S/10*10)==n)
	i=i+1;
    }
    cout<<i<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
	while(cin >> n) {
		if(n <= 0 || n > 50) continue;
		int ret = 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) ret++;
					}
				}
			}
		}
		cout << ret << endl;
	}
}

C++: #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	while(cin>>n){
		
		int counter=0;
		for(int i=0;i<=9;i++){
			for(int k=0;k<=9;k++){
				for(int j=0;j<=9;j++){
					for(int p=0;p<=9;p++){
						if(n==i+k+j+p){
							counter++;
					}
				}
			}
		}
	}
		cout<<counter;
		
	}
	

	return 0;
}

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

using namespace std;

int main()
{
	int n, ans;

	cin >> n;

	if(n > 36){ans = 0;}
	else{ans = pow(4, 36 - n);}

	cout << ans << endl;

	return 0;
}