Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

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>
#include<stdio.h>
using namespace std;

int main(){
  int n,res=0,count;
  int a=0,b=0,c=0,d=0;
  
  
  while( scanf("%d",&n) != EOF){
     
     for( a = 0 ; a < 10 ; a++){
       //if( (a+b+c+d) == n)res++;

       for( b = 0 ; b < 10 ; b++){
	 //if( (a+b+c+d) == n)res++;
	 for( c = 0 ; c < 10 ; c++){
	   //if( (a+b+c+d) == n)res++;
	   for( d = 0 ; d < 10 ; d++){
	     if( (a+b+c+d) == n)res++;
	     //cout << res <<endl;
	   }

	 }
	 

       }

     }
     // count = a;
     //if(count > 9)break;
     cout << res<<endl;
     res =0;
   }

  
  return 0;
}

C++: #include <cstdio>

using namespace std;

int main(void){
	int i, j, k, l, ans = 0, n;
	scanf("%d",&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){
						ans++;
					}
				}
			}
		}
	}
	printf("%d\n",ans);
	return 0;
}

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

int Permutation(int a, int b, int c, int d)
{
	if(a==d)
		return 1;
	else if(a==c || b==d)
		return 4;
	else if(a==b || b==c || c==d)
		return 12;
	else
		return 24;
}

int main()
{
	int n;
	while(cin>>n)
	{
		int count=0;
		if(9+9+9+9 < n)
		{
				cout << count << '\n';
				continue;
		}
		for(int i=0; i<10; ++i)
		{
			if(i+9+9+9 < n)
					continue;
			for(int j=i; j<10; ++j)
			{
				if(i+j+9+9 < n)
						continue;
				for(int k=j; k<10; ++k)
				{
					if(i+j+k+9 < n)
							continue;
					for(int l=k; l<10; ++l)
					{
						if(i+j+k+l == n)
						{
							count+=Permutation(i,j,k,l);
							break;
						}
					}
					if(i+j+k > n)
						break;
				}
				if(i+j > n)
					break;
			}
			if(i > n)
				break;
		}
		cout << count << '\n';
	}
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    in >> var;
    if (in.fail()) {
        cerr << "no var" << endl;
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        cerr << "no line" << endl;
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    int n;
    while (!streamvar(cin, n)) {
        int counter = 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)
                        counter++;
        cout << counter << endl;
    }
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>

using namespace std;

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

	return 0;
}

C++: #include <iostream>

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

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

int main(){
	int total[100];
	int n;
	for(int i=0;i<100;i++){
		total[i]=0;
	}

	for(int i1=0;i1<10;i1++){
		for(int i2=0;i2<10;i2++){
			for(int i3=0;i3<10;i3++){
				for(int i4=0;i4<10;i4++){
					total[i1+i2+i3+i4] += 1;
				}
			}
		}
	}
	while(cin>>n){
		cout<<total[n];
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int num;
	cin >> num;

	while(cin>>num){
		int answer = 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==num)
							answer++;
				}
			}
		}
	}
	cout <<answer<<endl;

	return 0;	
}

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

int main(){
  int n;
  int cnt=0;
  while(std::cin >> n){
  
    for(int a=1;a<10;a++){
      for(int b=1;b<10;b++){
	for(int c=1;c<10;c++){
	  for(int d=1;d<10;d++){
	    if(a+b+c+d==n){
	      cnt++;
	    }
	  }
	}
      }
    }

    std::cout << cnt << std::endl;
    cnt = 0;
  }
}

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

	return 0;
}

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

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


        while(cin >> n != 0){
                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;
while(cin >> n && n)
{
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++)for(int m = 0; m < 10; m++) if(i+j+k+l+m==n) ans++;
cout << ans << endl;
}
return 0;
}

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

int main(){
	int n;
	int x=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++){
						if (n == i + j + k + l){
							x = x + 1;
						}
					}
				}
			}
		}
		cout << x << endl;
		x = 0;
	}
}

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

int main(){
int n;
while(cin>>n){
int ans(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)ans++;
			}
		}
	}
}
cout<<ans<<endl;
}

return 0;
}

C++: #include <stdio.h>

int main(void){
	int n;
	int i,j,k,l;
	int count;

	while(scanf("%d", &n) != -1){
		if(n >= 37){
			printf("0\n");
		}else{
			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++;
							}
						}
					}
				}
			}
			printf("%d\n", count);
		}
	}
	return 0;
}

C++: #include <stdio.h>

int main()
{
	int n;
	int i,j,k,l;
	int ans[51];
	for(i = 0; i < 51; i++){
		ans[i] = 0;
	}
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
			for(k = 0; k < 10; k++){
				for(l = 0; l < 10; l++){
					ans[i + j + k + l]++;
				}
			}
		}
	}
	scanf("%d",&n);
	printf("%d\n",ans[n]);
	return 0;
}