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>
#include <algorithm>
#include <set>
#include <vector>

using namespace std;

int solve(const int n) {
	set< vector<int> > s;

	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) {
						s.insert({ a,b,c,d });
						break;
					}
	return s.size();
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while (cin) {
		int n;
		cin >> n;
		cout << solve(n) << endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;


int main() {
	int a,b,c,d,n,count;

	while (cin >> n) {
		count = 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) count++;
					}
				}
			}
		}

		cout << count << endl;
	}
}

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

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int a[10001];
int main()
{
	int n,m,i,j,k,p,l=1,s=0;
	for(i=0;i<=9;i++)
	{
		for(k=0;k<=9;k++)
	    {
	    	for(j=0;j<=9;j++)
	        {
	        	for(p=0;p<=9;p++)
	            {
		             a[l]=i+k+j+p;
		             l++;
	            }
		
	        }
	    }
	}
	while(cin>>n)
	{
		s=0;
		for(i=1;i<=10000;i++)
		{
			if(a[i]==n)s++;
		}
		cout<<s<<endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main()
{
    int a=0,b=0,c=0,d=0;
    int num;
    while(cin>>num)
    {
        int n=0;
       // int min=num/4;
        for(a=0;a<10&&a<=num;a++){
            for(b=0;b<10&&a<=num;b++){
                for(c=0;c<10&&a<=num;c++){
                    for(d=0;d<10&&a<=num;d++){
                        if(a+b+c+d==num){
                            n++;
                        }
                    }
                }
            }
        }
        cout<<n<<endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int d;
	int ans;
	while (cin >> d) {
		ans = 0;
		for (size_t a = 0; a < 10; a++)
		{
			for (size_t b = 0; b < 10; b++)
			{
				for (size_t c = 0; c < 10; c++)
				{
					for (size_t e = 0; e < 10; e++)
					{
						if (a + b + c + e == d) { ans++; }
					}
				}
			}
		}
		cout << ans << 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; a < 10; ++b){
				for(int c = 0; a < 10; ++c){
					for(int d = 0; a < 10; ++d){
						if(a + b + c + d == n){
							++count;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

int a,b,c,d;

int main(){
    int input;
    while (cin >> input) {
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){
                        count+=a+b+c+d==input;
                    }
                }
            }
        }
        cout << count << endl;
    }
}

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

int main(){
	int in,i[4],ans = 0,s[4] = {0,0,0,0};
	cin >> in;
	for(i[0] = 0;9 >= i[0];i[0]++){
		//if(0 > in - i[0]) break;
		//cout << "[1]" <<  i[0] << endl;				
		for(i[1] = 0;9 >= i[1];i[1]++){
			//if(0 > in - ( i[0] + i[1] ) ) break;
			//cout << "[2]" << i[1] << endl;
			for(i[2] = 0;9 >= i[2];i[2]++){
				//if(0 > in - ( i[0] + i[1] + i[2] ) ) break;
				//cout << "[3]" << i[2] << endl;
				for(i[3] = 0;9 >= i[3];i[3]++){
					//if(0 > in - ( i[0] + i[1] + i[2] + i[3] ) ) break;
					//cout << "[4]" << i[3] << endl;
					if(i[0] + i[1] + i[2] + i[3] == in){ans++;}
				}	
			}
		}
	}
	cout << ans << endl;
}

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

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

	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++){
					if (i + j + k + l == n)
						a++;
				}
			}
		}
	}

	cout << a << endl;

	return 0;
}

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

C++: #include<stdio.h>
int main(void)
{
	int n,count=0,n2,count2=0;
	scanf("%d %d",&n,&n2);
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count++;
					}
				}
			}
		}
	}
	for(int f1=0;f1<10;f1++){
		for(int f2=0;f2<10;f2++){
			for(int f3=0;f3<10;f3++){
				for(int f4=0;f4<10;f4++){
					if(f1+f2+f3+f4==n){
						count2++;
					}
				}
			}
		}
	}
	printf("%d\n%d",count,count2);
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;

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

C++: #include <iostream>

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

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



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

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

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

C++: #include <iostream>

int main(void)
{
	int n;

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