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;
int n,cnt;
void sach(int x,int sum){
  if(x==4){
    if(sum==n) cnt++;
    return;
  }
  for(int i=0;i<10;++i) sach(x+1,sum+i);
}
int main(){
  cin>>n;
  sach(0,0);
  cout<<cnt<<endl;
  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int a=0,b=0,c=0,d=0,e=0,n,count;
	for(int i=1;i<=50;i++){
		cin>>n;
		do{
		if((a+b+c+d)==n){
			count++;
		}
		if(a==9 && b==9 && c==9 && d==9){
			e=1;
		}
	
		else if(b==9 && c==9 && d==9){
			a++;
			b=0,c=0,d=0;
		}
		else if(c==9 && d==9){
			b++;
			c=0,d=0;
		}
		else if(d==9){
			c++;
			d=0;
		}
		else{
			d++;
		}
	
		}while(e==0);
		cout<<count<<endl;
		count=0,a=0,b=0,c=0,d=0,e=0;
	}
	return 0;
}

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

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

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

int main()
{
	int n = 0;
	int answer = 0;
	int upper =10;
	cin >> n;

	for(int i = 0; i < upper; ++i)
	{
		int a = i;
		for(int j = 0; j < upper; ++j)
		{
			int b = j;
			for(int k = 0; k < upper;++k)
			{
				int c = k;
				for(int l = 0; l < upper; ++l)
				{
					int d = l;

					if((a+b+c+d)==n)
					{
						answer++;
					}
				}
			}
		}
	}

	cout << answer << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	int i,j,k,l;
	
	while(cin >> n){
		// countを0で初期化
		int count = 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){
							count++;
						}
					}
				}
			}
		}
		
		cout << count << endl;
		
	}
	return 0;
}

C++:  /*
Write a program which reads an integer n (n &#8804; 50) and identifies the number of combinations of a, b, c, and d (0 &#8804; a, b, c, d &#8804; 9) which meet the following equality:

        a + b + c + d = n
For example, for n = 35, we have 4 different combinations of (a, b, c, d): (8, 9, 9, 9), (9, 8, 9, 9), (9, 9, 8, 9), (9, 9, 9, 8).
 */

#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>
#include <cstdio>
#include <stdio.h>

using namespace std;

int main(void)
{

	int val,count = 0;
	while (cin >> val)
	{
		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 == val)count++;

					}

				}


			}


		}

		printf("%d\n", count);
		count = 0;

	}

}

C++: #include<iostream>
using namespace std;
int main() {
	int a, b, c, d, n, kazu, ans[60], an;
	an = 0;
	while (cin >> n) {
		an++;
		kazu = 0;
		for (a = 0; a <= 9; a++) {
			for (b = 0; b <= 9; b++) {
				for (c = 0; c <= 9; c++) {
					for (d = 0; d <= 9; d++) {
						if (a + b + c + d == n) {
							kazu = kazu + 1;
						}
					}
				}
			}
		}
		ans[an] = kazu;
	}
	for (int i = 1; i <= an; i++) {
		cout << ans[i] << endl;
	}
}

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

int main(){
	int N,count;
	list<int> counter;
	
	while(!(cin>>N).eof()){
		count=0;
		for(int i=0; i<10;i++){
			if((N-i)/3 >9) continue;
			for(int j=0; j<10;j++){
				if((N-i-j)/2 > 9) continue;
				for(int k=0; k<10;k++){
					if((N-i-j-k) > 9 || (N-i-j-k)<0) continue;
					//cout << i<< " " << j << " " << k << " "<< N-i-j-k <<endl;
					count++;
				}
			}
		}
		counter.push_back(count);
	}
	list<int>::iterator it = counter.begin();
	while(it != counter.end()){
		cout << *it << endl;
		it++;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int cnt=0;
		if(n>36){
			cout<<0<<endl;
			continue;
		}
		for(int a=0;a<10;a++)
			for(int b=0;b<=a;b++)
				for(int c=0;c<=b;c++)
					for(int d=0;d<=c;d++)
						if(a+b+c+d==n)	cnt++;
		cout<<4*cnt<<endl;
	}
	return 0;
}

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(){
	int a, b, c, d, n;
	while(cin >> n){
		int count = 0; 
		if(n <= 36){
			for(a = 0; a <= 9 ; a++){
				for(b = 0; b <= 9; b++){
					for(c = 0; c <= 9; c++){
						for(d = 0; d <= 9; d++){
							if(( a + b + c + d) == n){
								count ++;
							}
						}
					}
				}
			}
				cout << count << endl;
		}
		else if(n > 36){
			cout << 0 << endl;
		}
	}
	return(0);
}

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

int main(){
	int n, ans;
	while(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 <iostream>
using namespace std;
int main() {
  int n;
  while(cin >> n) {
	int cnt = 0;
	for(int i = 0; i <= 9; ++i) {
	  if(i > n) break;
	  for(int j = 0; j <= 9; ++j) {
		if(i+j > n) break;
		for(int k = 0; k <= 9; ++k) {
		  if(i+j+k > n) break;
		  for(int l = 0; l <= 9; ++l) {
			if(i+j+k+l > n) break;
			else if((i+j+k+l) == n) cnt++;
		  }
		}
	  }
	}
	cout << cnt << endl;
  }
  return 0;
}

C++: // Sum of 4 integers

#include <iostream>
using namespace std;

int main() {
    int n;

    while (cin >> n) {
        int counter = 0;

        if (n > 36) {
            cout << "0\n";
        } else if (n == 36) {
            cout << "1\n";
        } else {
            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) counter++;
                    }
                }
            }
            cout << counter << "\n";
        }
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <utility>
#include <algorithm>
#include <queue>
#include <map>
#include <fstream>
#include <array>
#include <utility>
#include <functional>

using namespace std;
typedef long long Int;
#define REP(i , x) for(int i = 0 ; i < x ; ++i)

typedef pair<int, int> P;



int main()
{
	int N;
	while (cin >> N){
		Int ans(0);
		REP(i, 10){
			REP(j, 10){
				REP(m, 10){
					REP(n, 10){
						ans += N == (i + j + m + n);
					}
				}
			}
		}
		cout << ans;
	}
}