Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                cnt := 0
                for a := 0; a < 10; a++ {
                        for b := 0; b < 10; b++ {
                                for c := 0; c < 10; c++ {
                                        for d := 0; d < 10; d++ {
                                                if a+b+c+d == n {
                                                        cnt++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

Python: r = range
while True:
    try:
        n = int(input())
        ans = []
        ans = [(a,b,c,d) for a in r(10) for b in r(10) for c in r(10) for d in r(10) if a+b+c+d==n and (a,b,c,d) not in ans]
        print(len(ans))
    except:
        break

Python: while True:
    try:n=int(input())
    except:break
    ans=0
    for i in range(10):
        for j in range(10):
           for f in range(10):
                for e in range(10):
                    if i+j+f+e==n:
                        ans+=1

    print(ans)

Python: import sys
from collections import defaultdict
from itertools import product

d = defaultdict(int)
for x in product(range(10), repeat=4):
    d[sum(x)] += 1

for s in sys.stdin:
    print(d[int(s)])

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

Python: ans=[]

while True:

	try:

		k=int(input())

		ct=0

		for i in range(10000):

			tmp=str(i)

			while len(tmp)<4:

				tmp="0"+tmp

			tmp_2=0

			for j in tmp:

				tmp_2+=int(j)

			if tmp_2==k:

				ct+=1

		ans.append(ct)

	except:

		break

for i in range(len(ans)):

	if i==len(ans)-1:

		print(ans[i],)

	else:

		print(ans[i])

Python: #!/usr/bin/env python
# -*- conding: utf-8 -*-
import itertools
import sys
import math

for line in sys.stdin.readlines():
    n = int(line.strip())
    if n > 36:
        print(0)
        continue
    cnt = 0
    for a in range(10):
        for b in range(10):
            for c in range(10):
                d = n - (a + b + c)
                if 0 <= d and d <= 9:
                    cnt += 1
    print(cnt)

Python: ans = []
for line in sys.stdin:
    answ = 0
    try:
        n = int(line)
    except:
        break
    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)
print(*ans,sep="\n")

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

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

Python: s = int(input())
results=set()
for a in range(10):
    for b in range(10):
        for c in range(10):
            d = s-a-b-c
            if d<0:break
            if d<=9: results.add((a,b,c,d))
print(len(results))

Python: import sys
c = [0 for i in range(37)]
for i in range(10):
    for j in range(10):
        for k in range(10):
            for l in range(10):
                t = i + j + k + l
                c[t] += 1
for line in sys.stdin:
    print(c[int(line)])

Python: import sys

answer = [0] * 51
for a in range(10):
  for b in range(10):
    for c in range(10):
      for d in range(10):
        answer[a + b + c + d] += 1

for line in sys.stdin:
  try:
    print(answer[int(line)])
  except:
    break

Python: cnt = 0
def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

if __name__ == '__main__':
    array = list(get_input())
    for i in range(len(array)):
        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(array[i]):
                            cnt += 1
        print(cnt)
        cnt = 0

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

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+=1
        print(ans)
    except:break

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 True:
    try:
        print(count(int(input())))
    except:
        break

Python: import itertools
while True:
	try: n=int(input())
	except EOEError: 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: a = [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):
        a[i + j + k + l] += 1
while True:
  try:
    n = int(input())
    print(a[n])
    
  except EOFError:
    break

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

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

Python: while True:
    try:
        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(cnt)
    except:
        break

Python: #!/usr/bin/env python
# -*- conding: utf-8 -*-
import sys

for line in sys.stdin.readlines():
    n = int(line.strip())
    if n > 36:
        print(0)
        continue
    elif n == 36:
        print(1)
        continue
    cnt = 0
    for a in range(10):
        for b in range(10):
            for c in range(10):
                d = n - (a + b + c)
                if 0 <= d and d <= 9:
                    cnt += 1
    print(cnt)

Python: import sys
d = [sum((10 - abs(9 - i)) * (10 - abs(9 + i - j)) for i in range(j + 1)) for j in range(19)[:: -1]] + [0] * 14
[print(d[abs(18 - int(e))]) for e in sys.stdin]

Python: import sys
import math as mas

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

#for i in sys.stdin:
#	a,b=map(int,i.split())
#	print(gcd(a,b),lcm(a,b))