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(){
    int n, a, b, c, d, 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;

    }
    return 0;
}

C++: #include <iostream>

int main()
{
    while (true) {
        int n;
        std::cin >> n;
        if (std::cin.eof()) break;

        int cnt = 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) ++cnt;
        std::cout << cnt << std::endl;
    }
}

C++: #include <iostream>

using namespace std;

int main() {
    int n;
    while (true) {
        int count = 0;
        cin >> n;
        for (int i=0; i<10; i++) {
            for (int j=0; j<10; j++) {
                for (int k=0; k<10; k++) {
                    int d = n-i-j-k;
                    if (0 <= d && d < 10) {
                        count++;
                    }
                }
            }
        }
        cout << count << endl;
        if (cin.eof()) {
            return 0;
        }
    }
}

C++: #include<iostream>
using namespace std;
int main(){
int n;
while(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++){
if(0<=n-a-b-c && n-a-b-c<=9){
counter++;
}
}
}
}
cout<<counter<<endl;
}
return 0;
}

C++: #include<bits/stdc++.h>

using namespace std;

int main()
{
    int n = 0,a = 0,b = 0,c = 0,d = 0,cnt = 0;
    while(scanf("%d",&n)!=EOF){
        for(int i = 9;i >= 0;i--){
            a = i;
            for(int j = i; j>= 0;j--){
                b = j;
                for(int k = j;k >= 0;k--){
                    c = k;
                    for(int l = k;l >= 0;l--){
                        d = l;
                        if(a + b + c + d == n)cnt += 4;
                    }
                }
            }
        }
        cout << cnt << endl;
    }
}

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

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	while(~scanf("%d",&N)){
		int ans = 0;
		FOR(i,0,10) FOR(j,0,10) FOR(k,0,10) FOR(l,0,10){
			if(i + j + k + l == N) ans++;
		}
		printf("%d\n",ans);
	}

	return 0;
}

C++: #include<iostream>

using namespace std;


int main(void){
	
	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 p=0;p<=9;p++){
						if(i+j+k+p == n)ans++;
					}
				}
			}
		}
		
		cout<<ans<<endl;
	}
}

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

C++: #include <stdio.h>
#include <Windows.h>
#include <string.h>

int main( void ){
    int nCount = 0;
    int n[50];
    int m = 0;
    char str[3];
    while( true ){
        gets( str );
        if(( n[m] = atoi(str)) == -1 ) break;
        m++;
    }
    for( int a = 0;a < m;a++ ){
    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] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    }
    return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
int i,n,j,l,e,g;
while(cin>>n){
g=0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(l=0;l<10;l++){
for(e=0;e<10;e++){
if(i+j+l+e==n)g++;
}
}
}
}
cout<<g<<endl;
}
return 0;
}

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

void calc(std::vector<int> &v) {
    int total;
    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++) {
                    total = i + j + k + l;
                    v[total]++;
                }
            }
        }
    }
    return; 
}

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

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

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

int main()
{
	int num;
	int c = 0;
	while (cin >> num)
	{
		c = 0;
		if (num > 36 || num < 0)
		{
			cout << 0 << endl;
			continue;
		}
		else
		{
			for (int i = 0; i <= 9; i++)
				for (int j = 0; j <= 9; j++)
					for (int k = 0; k <= 9; k++)
						for (int v = 0; v <= 9; v++)
						{
							if (i + j + k + v == num)
								c++;
						}
		}
	}
	cout << c << endl;
	return 0;
}

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

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

C++: #include<iostream>

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

 	return 0;
}

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

int res(int 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++;

 return count;
}
int main()
{
 int n;
 while(cin >> n)
  cout << res(n) << '\n';

 return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

int main(){
  
  int dp[5][60];
  memset(dp,0, sizeof(dp));
  dp[0][0]=1;
  
  rep(i,4){
    rep(j,60){
      rep(k,10){
        if(j-k>=0) dp[i+1][j]+=dp[i][j-k];
      }
    }
  }
  
  int n;
  while(cin>>n){
    cout<<dp[4][n]<<endl;
  }
  
  return 0;
}

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

int main(){
int n,a,b,c,d,count;
while(scanf("%d",&n) != EOF){

count=0;

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+=1;
			}
		}
	}
}

printf("%d",count);
}
return 0;		
}