Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

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

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

  int i, j, k, l, sum, count = 0;

  cin >> sum;
  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 == sum) { count += 1; }
        }
      }
    }
  }

  cout << count << endl;

  return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int input;
	cin >> input;
	
	short count = 0;
	int i, j, k, l;
	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 == input)	count++;
				}
			}
		}
	}
	cout << count << endl;
	
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


int main()
{

	int n, counter = 0;

	while (scanf("%d", &n) != -1){
		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) counter++;
					}
				}
			}
		}
		cout << counter<<endl;
	}
	return 0;
}

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

int main()
{
	int n;
	while(cin >> n){
	int t = 0;
	for (int a = 0; a < 10; ++a)
	{
		for (int b = 0; b < 10; ++b)
		{
			for (int c = 0; c < 10; ++c)
			{
				if(n - (a + b + c ) <= 9 && 0 <= n - (a + b + c )){
					t++;
				}
			}
		}
	}
	cout << t << endl;
}
	return 0;
}

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

void test();
int sum_comb(int n);

using namespace std;

int main(void)
{
	test();
	return 0;
}

void test()
{
	int n,comb;

	while (cin >> n)
	{
		comb = sum_comb(n);

		cout << comb << endl;
	}
}

int sum_comb(int n)
{
	int a, b, c, d,cnt;
	cnt = 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)
						cnt++;
				}
			}
		}
	}
	return cnt;
}

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

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf_s("%d", &val) != EOF)
	{
		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 n,combo=0;
while(cin>>n)
{

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)
combo++;

cout<<combo<<endl;
}

return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main()
{
int n,S;
int a[4];

while(cin>>n)
{
S=0;
a[0]=0;
a[1]=0;
a[2]=0;
a[3]=0;
for(int i=0;i<10;i++)
{
	a[0]=i;
	if(a[0]+a[1]+a[2]+a[3]==n)
	{
		S++;
	}
	for(int j=0;j<10;j++)
{
	a[1]=j;
	if(a[0]+a[1]+a[2]+a[3]==n)
	{
		S++;
	}
for(int k=0;k<10;k++)
{
	a[2]=k;
	if(a[0]+a[1]+a[2]+a[3]==n)
	{
		S++;
}
	for(int l=0;l<10;l++)
{
	a[3]=l;
	if(a[0]+a[1]+a[2]+a[3]==n)
	{
		S++;
	}
}
}	
}
}
cout<<S<<endl;	
}
return 0;
}

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

int main()
{
  int cou = 0;
  int n;
  while (scanf("%d", &n) != EOF){

    cin >> n;

    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){
              cou++;
            }
          }
        }
      }
    }
    
  cout << cou << "\n";
  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(int argc, char const *argv[])
{
	int a;
	while (cin>>a)
	{
		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 == a) ans++;
					}
			}
			}
		}
	}
	cout<<ans;
	return 0;
}

C++: #include <iostream>

using namespace std;

// naive but easy to implement
int calc(int 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++;
          }
        }
      } 
    }
  }

  return count;
}

int main(int argc, char const* argv[])
{
  int n;
  while (cin >> n) {
    cout << calc(n) << endl;
  };
  return 0;
}

C++: #include<stdio.h>

main(){int n,k,i,f;while(~scanf("%d",&n)){for(f=i=0;k=n-i/100-(i/10)%10-i%10,i<1000;++i)if(k<10&&k>=0)f++;printf("%d\n",f);}}

C++: #include <iostream>

using namespace std;

void compute(int n) 
{
  int num = 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)
            num++;
  cout << num << endl;
}


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

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

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

C++: #include <iostream>
using namespace std;
int main() {
        int n;
        while(cin>>n) {
                int jwb=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) jwb++;
                                        }
                                }
                        }
                }
        cout<<jwb<<endl;
        }
        return 0;
}

C++: #include <iostream>

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

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

int main(){
	int i, j, k, l, n, count = 0;
	cin >> n;
	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++: #include<iostream>
#include<algorithm>
using namespace std;
int a;
int main(){
	while(cin>>a){
		int sum=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==a){
							sum++;
						}
					}
				}
			}
		}
		cout<<sum<<endl;
	}
	return 0;
}