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

Python: while 1:
  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: while True:
    try:
        count = 0
        n = int(input())
        for a in range(10):
            for b in range(10):
                for c in range(10):
                    d = n - a - b - c
                    if (d >= 0 and d <= 9):
                        count += 1
        print(count)
    except EOFError:
        break

Python: try:
    while True:
        n=int(input())
        cnt=0
        for a,b,c,d in [(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:
                cnt+=1
        print(cnt)
except EOFError:
    pass

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: while True:
    try:
        r = int(input())

        count = 0

        for x in range(10):
            for y in range(10):
                for z in range(10):
                    for w in range(10):
                        if x + y + z + w == r:
                            count += 1
        print(count)
        
    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+k+j+l==n:
                    cnt+=1
print(cnt)

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):
                c[i+j+k+l] += 1
for line in sys.stdin:
    print(c[int(line)])

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: ans=[0]*51
for a in range(10):
	for b in range(10):
		for c in range(10):
			for d in range(10):
				ans[sum([a,b,c,d])] += 1 
while True:
	try:print(ans[int(input())])
	except:break

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