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++: //
//  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]) {
        if(n[m] <= 18){
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else if(n[m] <= 36){
            n[m] = 36 - n[m];
            if (n[m] <= 9) {
                comb[m] = powl(4, n[m]);
            }else{
                comb[m] = powl(4, n[m]);
                for (int i = n[m]; i >= 9; i--) {
                    comb[m] -= powl(3, n[m] - 9) * 4;
                }
            }
        }else{
            comb[m] = 0;
        }
        m++;
    }
    
    for (int i = 0; i < m; i++) {
        printf("%d\n", comb[i]);
    }
    printf("\n");
    
    return 0;
}

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

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

int main(void){
	int 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++: #include<iostream>
using namespace std;

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

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

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

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


int main(void) {
	int a, b, c, d, n, count;
	while (cin >> n) {
		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;
						}
					}
				}
			}
		}
	}
		cout << count << endl;
	return 0;
}

C++: #include<iostream>
int main(){
	int a,b,c,d,i,n;
	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++: #include <stdio.h>

int main()
{
	int n;
	int i,j,k,l;
	int ans;
	ans = 0;
	while(scanf("%d",&n) != EOF){
		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>
#include <utility>
#include <set>

using namespace std;

#define ALL(n) n.begin(), n.end()
#define mp make_pair

int main(){
    int n;
    while (cin >> n) {
	set< pair<int, pair<int, pair<int, int> > > > s;
	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)
			    s.insert(mp(i, mp(j, mp(k, l))));
			    
	cout << s.size() << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
#include<math.h>
using namespace std;

int keta(int x){
	int i=0;
	while (x/pow(10,i)>=1){
		i++;
	}
	if (x==0){
		return 1;
	}
	else
	return i;
	}


int main(){
int n;
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++){
		   if (0<=n-i-j-k&&n-i-j-k<10){
			   count+=1;
		   }

		   }
	   }
	}
cout<<count<<endl;
	}

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

using namespace std;

int MIN = 0, MAX = 9;

int main() {
	int n;
	
	vector<int> make(100, 0);
	vector<int> maketwo(100, 0);
	
	for (int i=MIN; i <= MAX; i++) {
		for (int j=MIN; j <= MAX; j++) {
			for (int k=MIN; k<=MAX; k++) {
				for (int l=MIN; l<=MAX; l++) make[i+j+k+l]++;
			}
		}
	}
	
	while (cin >> n) {
		cout << make[n] << endl;
	}
	
	return 0;
}

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

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

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

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)

int main(){
    int cnt[100]={0};
    rep(i,10)rep(j,10)rep(k,10)rep(l,10){
        int a=i+j+k+l;
        if(a<=50)cnt[a]++;
    }

    int n;
    while(scanf("%d",&n)!=EOF)printf("%d\n",cnt[n]);

    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int n;
    while(cin >> n){
        int r = 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 ){
//                            cout << ' ' << a
//                                 << ' ' << b
//                                 << ' ' << c
//                                 << ' ' << d
//                                 << endl;
                            ++r;
                        }
                    }
                }
            }
        }
        cout << r << endl;
    }
    return 0;
}

C++: #include "iostream"
using namespace std;

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