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>
#include<string>
#include<vector>
#include<algorithm>
#include<cstring>
#include<cstdio>
#define rep(i,n) for(int i=0;i<n;i++)
#define foreach(r,n,p) for(r::iterator it=p.begin();it!=p.end();++it)
using namespace std;
int main()
{
    int n;
    while(cin>>n)
    {
        int ans = 0;
        rep(i,10)rep(j,10)rep(k,10)rep(l,10)
        {
            if(i+j+k+l == n)
            {
                ans ++;
            }
        }
        cout << ans<<endl;

    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
int main(){

	int a,b,c,d,n,i;

	std::cin>>n;
	i=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){
						i++;
						
						
						}
					}
				}
			}
		}

		std::cout<<i<<std::endl;
    
	return 0;
	}

C++: //
//  main.cpp
//  CppTest
//
//  Created by Ryu on 2017/02/08.
//  Copyright ?? 2017??´ Ryu. All rights reserved.
//

#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
using namespace std;

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    int n[50];
    int comb[50];
    int m = 0;
    while (cin >> n[m]) {
        comb[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]) {
                            comb[m]++;
                        }
                    }
                }
            }
        }
        m++;
    }
    
    for (int i = 0; i < m; i++) {
        printf("%d\n", comb[i]);
    }
    
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

	int a, b, c, d;
	int n = 0;
	int count = 0;

	while(cin >> n){

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

	cout << count << endl;
}
}

C++: #include<stdio.h>

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

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
  int n,cnt;
  while(scanf("%d",&n) != EOF){
    cnt = 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)cnt++;
	  }
	}
      }
    }
    cout << cnt << endl;
  }
}

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

#define f(i) for(int i=0; i<10; ++i)


//0008
int main(){
	int x;

	while(cin >> x){
		int a,b,c,d;
		int cout=0;

		f(a)f(b)f(c)f(d){
			if(a+b+c+d == x){
				++count;
			}
		}
		cout << cout <<endl;
	}
	return 0;
}

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

int dp[2][51];

int main()
{
	int n;
	scanf("%d",&n);
	int now = 0;
	for(int i = 0; i <= 50; i++)
	{
		dp[now][i] = 0;
	}
	dp[now][0] = 1;
	for(int k = 0; k < 4; k++)
	{
		int nex = (now + 1) % 2;
		for(int i = 0; i <= 50; i++)
		{
			dp[nex][i] = 0;
		}
		for(int j = 0; j <= 50; j++)
		{
			for(int i = 0; i <= 9; i++)
			{
				if(j + i <= 50)
				{
					dp[nex][j + i] += dp[now][j];
				}
			}
		}
		now = nex;
	}
	printf("%d\n",dp[now][n]);
	return 0;
}

C++: #include<cstdio>

int main(){
	int n;
	int a[] = {1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670,660,633,592,540,480,415,348,282,220,165,120,84,56,35,20,10,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
	while(scanf("%d", &n) + 1){
		printf("%d\n", a[n]);
	}
	return 0;
}

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

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

	while(cin){
		count=0;
		cin >> n;
		if(n>36){
			cout << "0" << endl;
			continue;
		}
		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>
using namespace std;
int main(){
	int n;
	while(cin>>n){
		int result = 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){
							++result;
						}
					}
				}
			}
		}
		cout<<result<<endl;
	}
}

C++: import java.util.Scanner;

class Main{
    public static void main(String[] args){
        Scanner in = new Scanner(System.in);
        while(in.hasNext()){
            int n = in.nextInt(), ans = 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) ++ans;
                        }
                    }
                }
            }
            System.out.println(ans);
        }
    }
}

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

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

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	cin >>in;
	
	int 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++;	
					}	
				}
			}
		}
	}
	
	cout <<out;
	
	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;
int main(){
  int n;
  while(cin>>n,n){
    int co=0;
    rep(a,10){
      rep(b,10){
	rep(c,10){
	  if(n-a-b-c>=0&&n-a-b-c<10)co++;
	}
      }
    }
    cout<<co<<endl;
  }

}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <stdio.h>
using namespace std;
int main() {
    int n;
    while(cin >> n){
    int a=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) {
                        a++;
                    }
                }
            }
        }
    }
        cout<< a<< endl;
    }
}