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
}

Python: answermap=[0]*51
answermap[0] = 1
answermap[1] = 4
answermap[2] = 10
answermap[3] = 20
answermap[4] = 35
answermap[5] = 56
answermap[6] = 84
answermap[7] = 120
answermap[8] = 165
answermap[9] = 220
answermap[10] = 282
answermap[11] = 348
answermap[12] = 415
answermap[13] = 480
answermap[14] = 540
answermap[15] = 592
answermap[16] = 633
answermap[17] = 660
answermap[18] = 670
answermap[19] = 660
answermap[20] = 633
answermap[21] = 592
answermap[22] = 540
answermap[23] = 480
answermap[24] = 415
answermap[25] = 348
answermap[26] = 282
answermap[27] = 220
answermap[28] = 165
answermap[29] = 120
answermap[30] = 84
answermap[31] = 56
answermap[32] = 35
answermap[33] = 20
answermap[34] = 10
answermap[35] = 4
answermap[36] = 1
answermap[37] = 0
answermap[38] = 0
answermap[39] = 0
answermap[40] = 0
answermap[41] = 0
answermap[42] = 0
answermap[43] = 0
answermap[44] = 0
answermap[45] = 0
answermap[46] = 0
answermap[47] = 0
answermap[48] = 0
answermap[49] = 0
answermap[50] = 0

inputs = []

while True:
  try:
    inputs.append(int(input()))
  except EOFError:
    break

for i in inputs:
  print(answermap[i])

Python: while True:
    try:
        cnt =0
        a = int(input())
        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 == a:
                            cnt += 1
        print(cnt)
    except:
        break

Python: againstN = [0]*50

for a in range(0,10):
  for b in range(0,10):
    for c in range(0,10):
      for d in range(0,10):
        againstN[a+b+c+d] += 1

inputs=[]
while True:
  try:
    inputs.append(int(input()))
  except EOFError:
    break

for i in inputs:
  print(againstN[i])

Python: import itertools
def combination(n):
 m=0
 for i in itertools.product(range(10),repeat=4):
  (a,b,c,d)=i
  if a+b+c+d==n:
   m+=1
 return m

while True:
 try:
  n=int(input())
  print(combination(n))
 except EOFError:
  break

Python: while 1:
    try:
        count=0
        x=int(input())
        for i in reversed(range(10)):
            if 0<=x-i<=27:
                for j in reversed(range(10)):
                    if 0<=x-i-j<=18:
                        for z in reversed(range(10)):
                            if 0<=x-i-j-z<=9:
                                for y in reversed(range(10)):
                                    if x-i-j-z-y==0:
                                        count+=1
        print(count)
    except EOFError:
        break

Python: n = int(input().rstrip())
cnt = 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 == n:
                    cnt = cnt + 1

print(str(cnt))

Python: import sys
for e in sys.stdin:
 e=int(e);x=range(10)
 print(sum([1 for a in x for b in x for c in x for d in x if a+b+c+d==e]))

Python: import sys
import math

def case(a,b):
	return math.factorial(a+b)/(math.factorial(a)*math.factorial(b))

while True:
	try:
		if n >= 37:
			print('0')
		elif n >= 10 and n <= 36:
			print(case(n,4)-case(n-10,3))
		else:
			print(case(n,4))		
	except EOFError:
		break

Python: anss=[]
while True:
    try:
        ans=0
        goal=int(input())
        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==goal:
                            ans+=1
        anss.append(ans)
    except:
        break
for ans in anss:
    print(ans)

Python: while 1:
    n=int(input())
    cnt=0
    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:
                        cnt=cnt+1
    print(cnt)

Python: while True:
    try:
        n = int(input())
    except:
        break
    ans = 0
    for a in range(10):
        for b in range(10):
            for c in range(10):
                d = n - (a + b + c)
                ans += 0 <= d <= 9
    print(ans)

Python: while True:
	try:
		n = int(input())
	except EOFError:
		break
	ret=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==n:
						ret+=1
	print(ret)

Python: import itertools
def combination(n):
 m=0
 for i in itertools.product(range(10),repeat=4):
  (a,b,c,d)=i
  if a+b+c+d==n:
   m+=1
 return m

while True:
 try:
  n=int(input())
  combination(n)
 except EOFError:
  break

Python: 
memo=[[0]*51 for i in range(5)]
def rec(i,n):
    if memo[i][n]!=0:
        return memo[i][n]
    if i==4:
        return 1 if n==0 else 0
    for m in range(10):
        memo[i][n]+=rec(i+1,n-m)
    return memo[i][n]
    
while True:
    try:
        n=int(input())
        print(rec(0,n))
    except:
        break

Python: import sys

for line in sys.stdin:
    n = int(line)
    count = 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:
                        count += 1
    print(count)

Python: def count(num):    
    l1=[]
    for a in range (10):
        for b in range(10):
            for c in range (10):
                for d in range (10):
                    l1.append([a,b,c,d])
    l1=list(filter(lambda x: sum(x)==num,l1))
    return(len(l1))
while 1==1:
    print(count(int(input())))

Python: import itertools
try:
    while(True):
        n = int(input())
        cnt = 0
        rng = range(10)
        for i,j,k,l in itertools.product(rng,rng,rng,rng):
            if i + j + k + l == n:
                cnt = cnt + 1
        print(cnt)
except:
    pass

Python: import fileinput
for n in fileinput.input():
    n = int(n)
    cnt = 0
    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:
                        cnt += 1
    print(cnt)

Python: import sys
from itertools import product

sum = [0] * 51
for i,j,k,l in product(range(10),repeat=4):
    sum[i+j+k+l] +=1

for i in sys.stdin:
    print(sum[int(i)])

Python: import sys
import math

def nCr(n, k):
    if 0 <= k <= n:
        nk,kk = 1,1
        for t in range(1, min(k, n - k) + 1):
            nk = nk*n
            kk = kk*t
            n -= 1
        return nk // kk
    else:
        return 0

p = [0] * 51
v = 0
for i in range(19):
    t = nCr(i+3, i)
    v = v + 4 * nCr(i-8,i-10)
    p[i] = t - v
    p[36-i] = p[i]

for i in sys.stdin:
    print(p[int(i)])

Python: import sys
for l in sys.stdin:
    n = int(l)
    cnt = 0
    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:
                        cnt += 1
    print(cnt)

Python: 
while True:
 try:
   n = int(input())
   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==n:
             ans=ans+1
   print(ans)
 except:
   break

Python: #! /usr/bin/python3

while True:
    try:
        s=int(input())
        n=0
        for i in range(10):
            for j in range(10):
                for k in range(10):
                    for l in range(10):
                        if s == i+j+k+l: n+=1
        print(n)
    except:
        break