Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

Python: import math
n = int(input())
nn = n
arr = []
for i in range (1,5):
    if(nn>10):
        arr.append(9)
        nn = nn-9
    else:
        arr.append(nn)
        nn = nn-nn

#print(arr)

top = math.factorial(4)
bottom = 1
for i in range(0,4):
    exist = False
    for j in range(0,i):
        if(arr[i]==arr[j]):
            exist = True
    count = 0
    if(not(exist)):
        for j in arr:
            if(arr[i]==j):
                count += 1

        bottom = bottom * math.factorial(count)


print(str(int(top/bottom)))

Python: x=[0]*37
for a in range(10):
	for b in range(10):
		for c in range(10):
			for d in range(10):
				x[a+b+c+d]+=1
while True:
	try:
		print(x[int(input())])
	except:
		break

Python: while True:
    try:
        n = int(input())
    except:
        break
    ans = 0
    table = [[a,b,c,d] for a in range(10) for b in range(10) for c in range(10) for d in range(10)]
    for abcd in table:
        ans += sum(abcd) == n
    print(ans)

Python: import sys
for x in sys.stdin.readlines():
    n=int(x)
    if(n>36):
        n=0
    elif(n>18):
        n=38-n
    else:
        n=n+2

    if(n>11):
        m=n-10
    else:
        m=0
    print (n**3-n-4*(m**3)+4*m)/6

Python: tbl = [0] * 51
for i in range(10):
    for j in range(10):
        tbl[i + j] += 1
try:
    while 1:
        n = int(input())
        res = 0
        for i in range(n + 1):
            res += tbl[i] * tbl[n - i]

        print(res)

except Exception:
    pass

Python: import sys
[print([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][abs(18 - int(e))]) for e in sys.stdin]

Python: import sys
a=[0]*51;x=range(10)
for i in range(51):
 a[i]=sum([1 for p in x for q in x for r in x for s in x if p+q+r+s==i])
for e in sys.stdin:
 print(a[int(e)])

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

int main()
{
	int iN, iCount;

	cin >> iN;

	iCount = 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 == iN )
						iCount++;
				}
			}
		}
	}

	cout << iCount << endl;

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <queue>
#include <cmath>

#define int64 long long int

using namespace std;

int main()
{
	int n, count;
	while(cin >> n){
		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++;
					}
				}
			}
		}
		cout << count << '\n';
	}
	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
	int n,ans=0;
	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+j+k+l==n)ans++;
				}
			}
		}
	}
}

C++: #include <iostream>
using namespace std;
 
int main(int argc, char const* argv[])
{
    int tg;
    int count =0;
while(cin >> tg) {
   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==tg)count++;
    cout << count << endl;
}
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int n,i,j,k,l,ans;

    while(cin >> n){

        ans = 0;
        for(i = 0;i <= 9;i++){
            for(j = 0;j <= 9;j++){
                for(k = 0;k <= 9;k++){
                    for(l = 0;l <= 9;l++){
                        if(n == i + j + k + l){
                            ans++;
                        }
                    }
                }
            }
        }
        
        cout << ans << endl;
    }
    
    return 0;
}

C++: 
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{
	int count = 0, num;

	cin >> num;

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

	cout << count << endl;

}

C++: #include<stdio.h>

int main(void){
	int n;
	while(scanf("%d",&n) != EOF){
		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 == n){
							ans++;
						}
					}
				}
			}
		}
		printf("%d\n",ans);
	}
	
	return 0;
}

C++: #include <cstdio>

int main(int argc, char *argv[]) {
	using namespace std;
	
	int rcv;
	
	while (EOF != fscanf(stdin, "%d", &rcv)) {
		int cnt = 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 == rcv)
							cnt++;
					}
				}
			}
		}
		printf("%d\n", cnt);
	}
	return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
int memo[51];

int main()
{
    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++)
                {
                    memo[a + b + c + d]++;
                }
            }
        }
    }
    int n;
    while (cin >> n)
    {
        cout << memo[n] << endl;
    }
}

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

int main(){
    int n,i,j,k,l,cnt;
    while(cin>>n){
        cnt = 0;
        rep(i,9)rep(j,9)rep(k,9){
            l=n-(i+j+k);
            if(l>=0 && l<=9)cnt++;
        }
        cout<<cnt<<endl;
    }
    return 0;
}