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 "bits/stdc++.h"
using namespace std;

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

C++: #include <iostream>

using namespace std;
int main(){
    int a, b, c, d, i, n[2], jumlah=0;

        cin>>n[i];
        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[i]){
                                jumlah++;
                            }
                    }
                }
            }
        }

        cout<<jumlah<<endl;

    return 0;
}

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

int main(){
  int n;
  int cnt=0;
  while(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++;
	    }
	  }
	}
      }
    }

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

C++: #include <iostream>
#include <conio.h>
#include <cstdio>

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf_s("%d", &val) != EOF)
	{
		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 == val)count++;

					}

				}


			}


		}

		printf("%d\n", count);
		count = 0;

	}

}

C++: #include <iostream>

using namespace std;

int main()
{
        int n;

        while (cin >> n) {
                int ans = 0;
                if (n <= 9) {
                        for (int a = 0; a <= n; a++)
                                for (int b = 0; b <= n; b++)
                                        for (int c = 0; c <= n; c++)
                                                for (int d = 0; d <= n; d++)
                                                        if (a + b + c + d == n)
                                                                ans++;
                }
                else {
                        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 << endl;
        }

        return 0;
}

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

int f(int n){
    if(n > 36) return 0;
    int a[4], count = 0;

    for(a[0] = 0;    a[0] <= 9; a[0]++){
    for(a[1] = a[0]; a[1] <= 9; a[1]++){
    for(a[2] = a[1]; a[2] <= 9; a[2]++){
    for(a[3] = a[2]; a[3] <= 9; a[3]++){
        if(a[0] + a[1] + a[2] + a[3] == n){
            do {
                count++;
            }while(next_permutation(a, a+4));
        }
    }}}}
    return count;
}

int main(){
    int n;
    while(cin >> n){
        cout << f(n) << endl;
    }
    return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

int main(void)
{
	int n;
	char buf[256];
	
	
	while (fgets(buf, 256, stdin) != NULL){
		int ans;

		n = atoi(buf);
		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++){
						if (i + j + k + l == n){
							ans++;
						}
					}
				}
			}
		}
		printf("%d\n", ans);
	}
	
	return (0);
}

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

using namespace std;

int main(){
  int num,count;
  vector<int> v(4,0) ;
  while(cin >> num){
    count = 0;
    for(int i = 0; i < 10; ++i){
      for(int j = i; j < 10; ++j){
        for(int k = j; k < 10; ++k){
          for(int l = k; l < 10; ++l){
            if(i + j + k + l == num){
              v[0] = i,v[1] =j,v[2] = k;v[3] = l ;
            }
          }
        }
      }
    }
    do{
      ++count ;
    }while(next_permutation(v.begin(),v.end())) ;
    cout << count << endl;
  }
  return 0;
}

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

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);

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

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

int main(void){
     int n,i=0;
     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(n == a+b+c+d){
			      i = i+1;
			 }
		    }
	       }
	  }
     }
     cout << i << endl;

     return 0;
}

C++: #include<stdio.h>

int main(){
  int n,n1,n2,n3,n4;
  int i,j,k,l;
  while(scanf("%d", &n) != EOF){
    int m=0;
    for(i=0;i<10;i++){
      n1=n-i;
      for(j=0;j<10;j++){
	n2=n1-j;
	for(k=0;k<10;k++){
	  n3=n2-k;
	  for(l=0;l<10;l++){
	    n4=n3-l;
	    
	    if(n4==0)
	      m++;
	  } 
	} 
      } 
    }
    printf("%d\n",m);
  }
  return 0;
}

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

void solve(int n) {
	int a, b, c, d, ans = 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) ans++;
				}
			}
		}
	}
	printf("%d\n", ans);
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
	int n;
	cin>>n;
	while(cin>>n){
		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++){
						if(a+b+c+d==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
    return 0;
}

C++: #inlcude<cstdio>

int solve(int a,int b){
 
 if(b==4){
  if(a==0) return 1;
  else return 0; 
 }
 else{
  int res=0;
  for(int i=0;i<=a&&i<10;i++){
   res+=solve(a-i,b+1);
  }
  return res;
 }
}

int main(){
 int n;
 while(~scanf("%d",&n)){
  printf("%d\n",solve(n,0));
}
return 0;
}