Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		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++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
#include <iterator>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i, a, cont, next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i, a, b, step) repfn(i, a, i < b, i + step)
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  int n;
  vi v;
  using ti4 = tuple<int, int, int, int>;
  set<ti4> accm;

  while (cin >> n) {
    repab (a, 0, 10) {
      repab (b, a, 10) {
        repab (c, b, 10) {
          repab (d, c, 10) {
            if (a + b + c + d == n) {
              accm.insert(ti4(a, b, c, d));
            }
          }
        }
      }
    }
  }
  return 0;
}

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;
}