Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

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++
		}
	}
}

Python: def wa(n):
    count=0
    for i in range(10):
        for j in range(10):
            for k in range(10):
                for l in range(10):
                    if n==i+j+k+l:
                        count +=1
                    elif n<i+j+k+l:
                        break
    return count
while True:
    try:
        n=int(input())
        print(wa(n))
    except:break

Python: ans = []
for line in sys.stdin:
    answ = 0
    n = int(line)
    for a in range(10):
        for b in range(10):
            for c in range(10):
                if 0 <= n-a-b-c <= 9:
                    answ += 1
    ans.append(answ)
for i in ans:
    print(i)

Python: while 1:
    try:
        ct=0
        n=input()
        for a in xrange(10):
            for b in xrange(10):
                for c in xrange(10):
                    if 0<=n-(a+b+c)<=9:
                        ct+=1
        print(ct)
    except:
        break

Python: from itertools import product

while True:
    try:
        total = int(input())
        c = 0
        for t in product(range(10),repeat=4):
            if total == sum(t):
                c += 1
        print(c)

    except:
        break

Python: num = int(input())
count = 0
for a in range(10):
	for b in range(10):
		for c in range(10):
			for d in range(10):
				if a+b+c+d==num:
					count+=1
print(int(count))

Python: # -*- coding:utf-8 -*-
import sys

x = [0]*51
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

array = []
for i in sys.stdin:
    array.append(i)

for k in range(len(array)):
    n = array[k]
    print(x[int(n)])

Python: import sys
 
def ans(num):
    ans = 0
 
    for a in range(10):
        for b in range(10):
            for c in range(10):
                for d in range(10):
                    if a+b+c+d == num:
                        ans += 1
 
    return ans
 
 
def main():
    a = []
 
    for line in sys.stdin:
        a.append(int(line))
 
    for line in a:
        print(ans(line))
 
if __name__ == "__main__":
    main()

Python: import sys

ans=[]    
def sumint(lp,ttl):
    if (ttl > lp*9) | (ttl < 0):
        return 0
    elif lp == 1:
        return 1
    else:
        a = 0
        for n in range(0,10) :
            a += sumint(lp - 1,ttl - n)
        return a

for i in sys.stdin:
    ans.append(sumint(4,int(i)))
print('\n'.join(map(str,ans)))

Python: while 1:
    try:
        n = int(input())
    except:break
    ans = 0
    for i in range(0,10):
        for j in range(0,10):
            for k in range(0,10):
                for l in range(0,10):
                    if i + j + k + l == n:
                        ans += 1

    print(ans)

Python: ans = [0 for i in range(51)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            for l in range(10):
                ans[i+j+k+l] += 1
#for i in range(50+1):
#   print(i, ans[i])
     
while True:
    try:
        print(ans[int(input())])
    except EOFError:
        break

Python: import sys
def sum_n(n):
    if n>36:return 0
    return sum([1 for i in range(10) for j in range(10) for k in range(10) for l in range(10) if i+j+k+l==n])
    
[print(sum_n(i)) for i in [int(line) for line in sys.stdin]]

Python: # -*- coding: utf-8 -*-

import itertools

while True:
  try: n = int ( input ( ) )
  except EOFError: break
  r = 0
  for ( i, j, k ) in itertools.product ( range ( 10 ), range ( 10 ), range ( 10 ) ):
    r += ( 0 <= n - i - j - k < 10 )
  print ( r )

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;
}