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 <cstdio>

int count_combinations_of_sums(int n, int num_rests) {
  if (num_rests * 9 < n) { return 0; }
  if (num_rests == 1) { return 1; }
  int count = 0;
  for (int i = 0; i <= 9 && i <= n; ++i) {
    count += count_combinations_of_sums(n - i, num_rests - 1);
  }
  return count;
}

int main() {
  int n;
  while (true) {
    if (scanf("%d", &n) != 1) { break; }
    printf("%d\n", count_combinations_of_sums(n, 4));
  }
  return 0;
}

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

int times = 0;
int deep(int c, int depth)
{
	if (depth < 3)
	{
		for (int i = 0; i < 10; i++)
		{
			if (c >= i)
			{
				deep(c - i, depth + 1);
			}
		}
	}
	else if (depth == 3 && c < 10) 
		times++;
	return 0;
}

int main()
{
	int n;
	while (cin >> n)
	{
		times = 0;
		int c = n;
		if (c <= 36)
			deep(c, 0);
		else
			times = 0;
		cout << times << endl;
	}

	return 0;
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	for(int i = 0; i < 1000; i++){
		a[i] = 1;
	}
	while(cin >> n){
		if(n > 36){
			a[t] = 0;
		}
		else if(n > 18){
			n = 36-n;
		}
		for(int i = n+3; i > n; i--){
			a[t] = a[t]*i;
		}
		a[t]/6;
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i] << endl;
	}
}

C++: #include <iostream>
using namespace std;
#define rep(i,a,n) for(int i=a; i<n; i++)

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	for(int x;cin>>x;)
	{
		if(x>18)
			x=36-x;
		int sum=1;
		for(int i=1;i<=x;i++)
		{
			int a=(1+i+1)*(i+1)/2;
			sum +=a;
		}
		cout<<sum<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int n, a, b, c, d,ans,count=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++) {
						ans = i + j + k + l;
						if (ans == n) {
							count++;
						}
					}
				}
			}
		}

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

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

int cnt=0;
int n;

int forf(int t,int ti){
    if(ti<4){
        for(int i=0;i<10;i++){
            forf(t+i,ti+1);
        }
    }else if(t==n)cnt++;
    return 0;
}

int main(){
    while(scanf(" %d",&n)){
        if(n>36){
            cout << '0' << endl;
        }else{
            cnt=0;
            forf(0,0);
            cout << cnt << endl;
        }
    }
    return 0;
}

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

int main(){
  int n,i,S;
  while(cin >> n){
    i = 0;
    for(S=0;S<=9999;S++){
      if((S/1000)+((S-S/1000*1000)/100)+((S-S/100*100)/10)+(S-S/10*10)==n)
	i=i+1;
    }
    cout<<i<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
	while(cin >> n) {
		if(n <= 0 || n > 50) continue;
		int ret = 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) ret++;
					}
				}
			}
		}
		cout << ret << endl;
	}
}

C++: #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	while(cin>>n){
		
		int counter=0;
		for(int i=0;i<=9;i++){
			for(int k=0;k<=9;k++){
				for(int j=0;j<=9;j++){
					for(int p=0;p<=9;p++){
						if(n==i+k+j+p){
							counter++;
					}
				}
			}
		}
	}
		cout<<counter;
		
	}
	

	return 0;
}

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

using namespace std;

int main()
{
	int n, ans;

	cin >> n;

	if(n > 36){ans = 0;}
	else{ans = pow(4, 36 - n);}

	cout << ans << endl;

	return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)+1):((m)-(n)+1)),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

int dx[] = { -1, 0, 1, 0 };
int dy[] = {  0, -1, 0, 1 };

int main() {

  for (int n; cin >> n, cin;) {
    int ans = 0;
    rep(a,10) rep(b,10) rep(c,10) rep(d,10) if (a+b+c+d == n) ++ans;
    cout << ans << endl;
  }

  return 0;
}

C++: #include <stdio.h>
int pair(int n);
int main(){
	int n;
	while(scanf("%d",&n)!=EOF){
		printf("%d\n",pair(n));
	}
	return 0;	
}

int pair(int n){
	int a,b,c,d,num=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(n==(a+b+c+d)) num++;
				}
			}
		}
	}
	return num;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a;
int b;
int c;
int main(){

	
	while (cin >> a){
		c++;
			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 ==a ){
								b++;
							}
						}
					}
				}
			}
}

	cout << b << endl;
	
	return 0;
}

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

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

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

int n;

int slv(int now, int t);

int main(){
  
  while(scanf(" %d",&n) != EOF){
    printf("%d\n",slv(0,0));
  }
  
  return 0;
}

int slv(int now, int t){
  if(now == 4){
    if(t == n)return 1;
    return 0;
  }
  
  int ans = 0;
  for(int i=0;i<10;i++){
    ans += slv(now + 1, t + i);
  }
  
  return ans;
}

C++: #include <cstdio>

int main(){
    int a,b,n,k[100],res=0;

    
    for(a = 0; a <= 9; a++){
        for(b = 0; b <= 9; b++){
            k[a * 10 + b] = a + b;
        }
    }

    while(scanf("%d",&n) == 1){
        res = 0;
        for(a = 0; a <= 9; a++){
            for(b = 0; b <= 9; b++){
                for(int i = 0; i < 100; i++){
                    if( n == a + b + k[i] ) res++;
                }
            }
        }

        printf("%d\n", res);
    }
    return 0;
}