Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

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: num = []
while True:
    try:
        num.append(int(input()))
    except EOFError:
        break

for i in num:
    s = set()
    for a in range(10):
        if i-a > 27:
            continue
        for b in range(10):
            if i-a-b > 18:
                continue
            for c in range(10):
                if i-a-b-c > 9:
                    continue
                elif i-a-b-c < 0:
                    break
                else:
                    s.add(str(a)+str(b)+str(c)+str(i-a-b-c))
    print(len(s))

Python: import itertools

while True:
    try:
        n = int(input())
        ans = 0
        for val in itertools.product(range(10), repeat=4):
            if sum(val) == n:
                ans += 1
        print(ans)
    except:
        break

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

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

Python: import sys

sum = [0] * 51
for i in range(10):
    for j in range(10):
        for k in range(min(10,18-i-j)):
            for l in range(min(10,18-i-j-k)):
                sum[i+j+k+l] += 1
                sum[36-i-j-k-l] += 1

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

Python: import sys
import itertools

for line in sys.stdin:
    n = int(line)
    cnt = 0;
    for element in itertools.product(range(10), repeat=4):
        if sum(element) == n:
            cnt += 1
    print(cnt)

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

        print(cnt)

    except:
        break

Python: 
while True:
    try:
        count=0
        num = 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 ==num:
                            count+=1
        print(count)
    except EOFError:
        break

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

Python: import sys

def getsum(n):
  if n > 36: return 0
  else:
    i = n if n < 19 else 36-n
    return (i+3)*(i+2)*(i+1)//6 - max(2*(i-9)*(i-8)*(i-7)//3,0)

for i in sys.stdin:
    print(getsum(int(i)))

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

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

Python: #Sum of 4 Integers

count = 0
while True:
    try:
        i = 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 == i:
                            count += 1
        print(count)
        count = 0
    except:
        break

Python: import sys

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

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

n = int(raw_input())
case = 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:
                    case += 1
print(case)

Python: from itertools import product

while True:
    try:
        n = int(input)
    except:
        break
    count = sum(a + b + c + d == n for a, b, c, d in product(range(10), repeat=4))
    print(count)

Python: lst=[0 for i in range(50)]
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                lst[a+b+c+d] += 1
while i:
    try:
        print(lst[int(input())])
    except:
        break

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

Python: import sys

for i in sys.stdin.readlines():
    n = int(i[:-1])
    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 += 1
    print(cnt)

Python: import sys
a=[0]*51
for i in range(19):a[i]=a[36-i]=(i+3)*(i+2)*(i+1)//6-a[i-10]*4*(i>9)
for e in sys.stdin:print(a[int(e)])

Python: while(True):
    a = 0
    n = int(input())

    if n > 36:
        print(0)
        continue
    elif n==36:
        print(1)
        continue
    b = n
    for i in range(10):
        if n-i==0:
            a=a+1
            #print("(%d,0,0,0)"%(i))
            break
        for j in range(10):
            if n-i-j==0:
                a=a+1
                #print("(%d,%d,0,0)"%(i,j))
                break
            for k in range(10):
                b = n-i-j-k
                if b>=0 and b<=9:
                    a=a+1
                    #print("(%d,%d,%d,%d)"%(i,j,k,b))
                    continue
                elif b > 9:
                    continue
                else:
                    break
                    
    
    print(a)

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

import sys
import os
import math


lst = sys.stdin.readlines()
#print(lst)

for s in lst:
    cnt = 0
    target_val = int(s)
    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 == target_val:
                        cnt += 1
    print(cnt)

Python: while True:
    try:
        num=int(input())
    except:
        break
    sum=0
    Range=10
    for a in range(Range):
        for b in range(Range):
            for c in range(Range):
                for d in range(Range):
                    if num==a+b+c+d:
                        sum+=1
    print(sum)

Python: import itertools
A = list(range(10))
A_sum = []
A_pair = list(itertools.product(A,repeat=4))
for i in range(len(A_pair)):
    A_sum.append(sum(A_pair[i]))

while True:
    try:
        n = int(input())
    except:
        break
    if 36<n:
        print(0)
    else:
        print(A_sum.count(n))