Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

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

int main() {
  unsigned int input;
  unsigned int count;

  while(cin >> input) {
    count = 0;
    for(int a0=0; a0<10; a0++) {
      for(int a1=0; a1<10; a1++) {
        for(int a2=0; a2<10; a2++ ) {
          for(int a3=0; a3<10; a3++) {
            if(a0+a1+a2+a3==input) {
              count++;
            }
          }
        }
      }
    }
    cout << count << endl;
  }

  return 0;
}

C++: #include <iostream>
using namespace std;
int main( void )
{
	while ( !cin.eof() )
	{
		int n;
		cin >> n;
		if ( cin.eof() )
			break;

		int kotae = 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 )
				kotae++;

		cout << kotae << endl;

	}
	return 0;
}

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

int main(){
	int root[5][51], i, j;
	for (i = 0; i < 5; i++) {
		for (j = 0; j < 51; j++)
			root[i][j] = 0;
	}
	for (i = 0; i < 10; i++) {
		root[1][i] = 1;
	}
	for (i = 1; i < 5; i++) {
		root[i][0] = 1;
	}
	for (i = 2; i < 5; i++) {
		for (j = 1; j < 51; j++) {
			for (int k = j; k >= 0 && k > j - 10; k--) {
				root[i][j] += root[i - 1][k];
			}
		}
	}
	while (true) {
		int n;
		cin >> n;
		if (cin.eof()){
			break;
		}
		cout << root[4][n] << endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;
#define RENT 100000
int main(){
	int n, ans;
	int counter = 0;
	while (cin >> n){
		counter = 0;
		for (int i = 0; i < 10; i++){
			for (int q = 0; q < 10; q++){
				for (int w = 0; w < 10; w++){
					for (int e = 0; e < 10; e++){
						ans = i + q + w + e;
						if (ans == n){
							counter += 1;
						}
					}
				}
			}
		}
		cout << counter << endl;
	}
}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;





int main()
{
	int n;
	int sum;
	int k[19];//k[i]???i?????????????¶?????????§??????????????¨?????????????????????
	while (cin >> n) {
		sum = 0;
		if (n > 36) {
			cout << "0" << endl;
		}
		else{
			
			for (int i = 0; i < 19; i++) {
				if (i < 10) {
					k[i] = i + 1;
				}
				else {
					k[i] = 19 - i;
				}
			}
			for (int i = max({0,n-18}); i <= min({ 18,n }); i++) {
				sum += k[i] * k[n - i];
			}
			cout << sum << endl;
		}
		
	}





}

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

int main() {
	// your code goes here
	int n;
	while(cin>>n){
	int count=0;
	if(n>36){cout<<0<<endl;}else{
		for(int i=9; i>=0; i--){
			for(int j=i; j>=0; j--){
				for(int k=j; k>=0; j--){
					for(int l=k; l>=0; l--){
						if(i+j+k+l==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
	}
	return 0;
}

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



int main(){
    int n,cnt;
    int num[10000],i=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++){
                    num[i]=a+b+c+d;
                    i++;
                }
    
    while(cin >> n){
        cnt = 0;
        for(int j=0;j<10000;j++){
            if(n==num[j]) cnt++;
        }
        cout << cnt << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <stdio.h>
 
using namespace std;
 
 
// cin >>
// cout <<
int main(){
    int in=0;
	int out;
    while(scanf("%d",&in)!=EOF){
    out=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==in){
						out++;  
						}   
					}
				}
			}
		}
		printf("%d\n",out);
    }
    
     
    return 0;
}

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

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

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

int main()
{
	int n = 0;
	int upper =10;
	while(cin >> n){
		int answer = 0;
		for(int i = 0; i < upper; ++i)
		{
			for(int j = 0; j < upper; ++j)
			{
				for(int k = 0; k < upper;++k)
				{
					for(int l = 0; l < upper; ++l)
					{
						if((i+j+k+l)==n)
						{
							answer++;
						}
					}
				}
			}
		}
		cout << answer << endl;
	}
	return 0;
}

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

void calc(std::vector<int> &v) {
    std::vector<int> g(10, 0);
    for (int i = 1; i <= 9; i++) {
        v[i] = 4 * i; 
    }
    for (int i = 0; i <= 9; i++) {
        g[i - 1] = 3 * i;
    }
    for (int i = 1; i <= 9; i++) {
        v[i + 9] = g[i - 1] * 3 + (v[i + 8] - g[i - 1]);
    }
    return; 
}

int main(void) {
    std::vector<int> v(19, 0);
    calc(v);
    int total;

    while (std::cin >> total) {
        if (total > 36) {
            std::cout << 0 << std::endl;
        } else if (total > 18){
            total = 36 - total; 
            std::cout << v[total] << std::endl;
        } else {
            std::cout << v[total] << std::endl;
        }
    }
    return 0;
}

C++: #include<cstdio>

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

	while(scanf("%d", &n) + 1){
		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(n == i + j + k + l){
							count++;
						}
					}
				}
			}
		}
		printf("%d\n", count);
	}
}

C++: #include <iostream>


int func(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 input;

	while (true){
		if (std::cin >> input){
			std::cout << func(input) << "\n";
		}
	}
	
	return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
 
int n;
 
int forf(int cnt,int t){
    if(cnt==0){
        if(cnt==n){
            return 1;
        }else{
            return 0;
        }
    }else{
        int tt=0;
        for(int i=0;i<10;i++){
            tt=forf(cnt-1,t+i);
        }
        return tt;
    }
}
 
int main(){
    while(scanf(" %d",&n)!=EOF){
        cout << forf(4,0) << endl;
    }
    return 0;
}