Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 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{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

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

using namespace std;

int n, s;
int dp[10][100][10];
int solve(int i, int j, int k);

int main(void){
	
	while(cin >> n >> s){
		if(n == 0 && s == 0){break;}
		fill_n(**dp,10*100*10,-1);
		cout << solve(0,0,10) << endl;
	}
}

int solve(int now, int sum, int b1){
	if(now == n){
		if(sum == s){return 1;}
		else return 0;
	}
	if(dp[now][sum][b1] != -1){return dp[now][sum][b1];}
	int t = 0;
	for(int i = 0; i < 10; i++){
		if(b1 != 10 && b1 >= i){continue;}
		t += solve(now+1, sum + i, i);
	}
	return dp[now][sum][b1] = t;
}

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

int main(){
	int n;
	int x=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 (n == i + j + k + l){
							x = x + 1;
						}
					}
				}
			}
		}
		cout << x;
	}
}

C++: #include<iostream>

using namespace std;

int main(){
  int pair[100];
  int input;
  
  for(int i = 0; i < 10; i++)
    for(int j = 0; j < 10; j++)
      pair[i * 10 + j] = i + j;


  while(cin >> input){
    int count = 0;
    if(input > 36){
      continue;
    } else {
      for(int i = 0; i < 100; i++){
	int cd = input - pair[i];
	
	if(cd <= 18){
	  for(int j = 0; j < 100; j++) if(pair[j] == cd)
	      count++;
	}
      }
    }
    
    cout << count << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <utility>
#include <string>

#define REP(i,n) for(int i = 0; i < n; i++)

typedef unsigned long ul;

using namespace std;

int main(){
	int n,count;
	while(cin >> n){
		REP(a, 10){
			REP(b, 10){
				REP(c, 10){
					REP(d, 10){
						if(a+b+c+d == n)
							count++;
					}
				}
			}
		}
		cout << count << endl;
		count = 0;
	}
}

C++: #include<iostream>
using namespace std;
int main()
{
long nn[]={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};
for(;;){
cin>>n;
if(cin.eof())break;
cout<<nn[n]<<endl;
}
return 0;
}

C++: #include <cstdio>

int main()
{
	int n;
	int i,j,k,l;
	int ans[51];
	for(i = 0; i < 51; i++){
		ans[i] = 0;
	}
	for(i = 0; i < 10; i++){
		for(j = 0; j < 10; j++){
			for(k = 0; k < 10; k++){
				for(l = 0; l < 10; l++){
					ans[i + j + k + l]++;
				}
			}
		}
	}
	scanf("%d",&n);
	if(n < 0){
		printf("0\n");
	}
	printf("%d\n",ans[n]);
	return 0;
}

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

int main () {

int n, count = 0;

    cin >> n;

for (int a = 0; a < 10 && a <= n; a++){
    for (int b = 0; b < 10 && b <= n-a; b++){
        for (int c = 0; c < 10 && c <= n-a-b; c++){
            if (n-a-b-c >=0 && n-a-b-c < 10) {
                count++;
            }
        }
    }
}


    cout << count;


    return 0;

}

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

int n[50];

int main(){
    int input = 0;
    while(cin >> n[input]){
        if(n[input] == EOF) break;
        input++;
    }
    for(int h = 0; h < input; h ++){
        int c = 0;
        for (int i = 0; i < 10; i++)
        {
            for (int j = 0; j < 10; j++)
            {
                for (int k = 0; k < 10; k++)
                {
                    if (n[h] - (i + j + k) >= 0 && n[h] - (i + j + k) < 10)
                        c++;
                }
            }
        }
        cout << c << endl;
    }
    return 0;
}

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

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

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++){
					int d = n - a - b- c;
					if(0 <= d && d <= 9) ans++;
				}
			}
		}
		cout << ans << endl;
	}
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <fstream>
#include <set>
#include <utility>

using namespace std;
int main() {
	int n;

	while (cin >> 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++;
					}
				}
			}

		}
		cout << count << endl;
	}
	
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  while(scanf("%d",&n)!= EOF){
    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 l = 0;l<=9;l++){
	    if(i+j+k+l == n)ans++;
	  }
	}
      }
    }
    cout << ans << endl;
  }
}

C++: #include <iostream>

using namespace std;

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

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

using namespace std;

int MAX = 9;

vector <int> v;

int main() {
	int n;
	
	while (cin>>n) {
		v.clear();
	
		if (n>4*MAX) {
			cout << 0 << endl;
			return 0;
		}
		
		for (int i=0; i<=MAX; i++) {
			for (int j=0; j<=MAX; j++) {
				if ((n-i-j)>=0) v.push_back(n-i-j);
			}
		}
		
		sort(v.begin(), v.end());
		
		int ans = 0;
		for (int i=0; i<=MAX; i++) {
			for (int j=0; j<=MAX; j++) {
				if (binary_search(v.begin(), v.end(), i+j)) {
					if (i==j && (n-i-j)%2) ans++;
					ans++;
				}
			}
		}
		
		cout << ans << endl;
	}
	
	return 0;
}

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

int kaijo(int n)
{
	if (n==0)
		return 1;
	else
		return n * kaijo(n-1);
}

int permutation(int a,int b)
{
	return kaijo(a) / kaijo(a-b);
}

int combination(int a,int b)
{
	return permutation(a,b) / kaijo(b);
}

int how_much_plus_pair(int n)
{
	return combination(4,n % 4);
}

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

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 (std::cin >> input){
			std::cout << func(input) << "\n";
	}
	
	return 0;
}

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

int check(int x,int y,int z,int w){

}

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