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: n=int(input())
print(len([[a,b,c,d]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]))

Python: #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main(num): 
	if num >= 19:
		num = 19 - num + 17
	res = 1
	gro1 = 3
	for i in range(8):
		if i == num:
			return res
		if i == 0:
			gro2 = 3
		else:
			gro2 += 1
		res += gro1
		gro1 += gro2
	
	for i in range(8,19):
		if i == num:
			return res
		gro2 -= 3
		res += gro1
		gro1 += gro2
			
		
if __name__ == '__main__':
	while True:
		try:
			num = int(input())
		except:
			return
		else:
			print(main())

Python: import sys
[print([670, 660, 633, 592, 540, 480, 415, 348, 282, 220, 165, 120, 84, 56, 35, 20, 10, 4, 1][abs(18 - int(e))]) for e in sys.stdin]

Python: import itertools

try:
    while True:
        n = int(input())
        
        count = 0
        for a, b, c, d in itertools.product(range(10), repeat=4):
            if a + b + c + d == n:
                count += 1

        print(count)

except Exception as _:
    pass

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

Python: while True:
    try:
        #(a,b,c,d)=map(int,raw_input().split())
        n=input()
        cnt=0
        for a in xrange(10):
            for b in xrange(10):
                for c in xrange(10):
                    for d in xrange(10):
                        if a+b+c+d==n:
                            cnt+=1
        print(cnt)
    except EOFError: break

Python: 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 += 1
                    print(i,j,k,l)
print(cnt)

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 


def kai(num):
	x = 0
	for i in range(10000):
		
		mk = str(i).zfill(4)
		if int(mk[0])+int(mk[1])+int(mk[2])+int(mk[3]) == num:
				x += 1
	return x

def main(): 
	while True:
		try:
			num = int(input())
		except:
			return
		else:
			print(kai(num))	
if __name__ == '__main__':
	main()

Python: t = 0
while t == 0:	
	p = 0
	try:
		n = int(input())
	except:
		break
	else:
		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):
							p += 1
	print(p)

Python: while True:
  try:
    n = int(input())
    results = []
    for i in range(10):
      for j in range(10):
        for k in range(10):
          for l in range(10):
            results.append( n == sum([i, j, k, l]) )
    print(len(list(filter(lambda x:x==True, results))))
  except:
    break

Python: # AOJ 0008 Sum of 4 Integers
# Python3 2018.6.9 bal4u

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: 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 += 1
                    print(i,j,k,l)
print(cnt)

Python: import sys

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

Python: from __future__ import (division, absolute_import, print_function,
                        unicode_literals)
from sys import stdin
for line in stdin:
    n = int(line)
    cnt = 0
    for a in xrange(10):
        if n < a:
            break
        for ab in xrange(a, a + 10):
            if n < ab:
                break
            for abc in xrange(ab, ab + 10):
                if n < abc:
                    break
                for abcd in xrange(abc, abc + 10):
                    if n == abcd:
                        cnt += 1
                        break
                    if n < abcd:
                        break
    print(cnt)

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

Python: import sys
import itertools

for n in sys.stdin.readlines():
    n = int(n)
    patterns = itertools.product(range(10), range(10), range(10), range(10))
    ans = 0
    for a, b, c, d in patterns:
       if a + b + c + d == n:
           ans +=1
    print(ans)

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

Python: import sys

lines = sys.stdin.readlines()
for line in lines:
    a = int(line)
    sets = 0
    for i in range(0, 10):
        for k in range(0, 10):
            for l in range(0, 10):
                for m in range(0, 10):
                    if(i+k+l+m == a):
                        sets += 1
    print(sets)

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

Python: n=int(input())
a,b,c,d=0,0,0,0
ans=0
for i in range(10):
    c=0
    for j in range(10):
        b=0
        for f in range(10):
            a=0
            for e in range(10):
                if a+b+c+d==n:
                    ans+=1
                a+=1
            b+=1
        c+=1
    d+=1
print(ans)

Python: e=[0]*51
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                e[sum([a,b,c,d])]+=1
while 1:
    try:print(e[int(input())])
    except:break

Python: import sys


def rec(j,s):
    if s > n:
        return 0
    if s == n:
        return 1
    if j == 0:
        return 0
    v = 0
    for i in range(10):
        v += rec(j-1, s + i)
    return v

n = sys.stdin.readline()
while n:
    n = int(n)
    print(rec(4,0))
    n = sys.stdin.readline()

Python: lst=[0 for i in range(51)]
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 1:
    try:
        print(lst[int(input())])
    except:
        break

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