Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

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

Python: from itertools import product
import sys

a = []
for line in sys.stdin:
        a.append(int(line.strip()))

p = list(product(range(0, 10), range(0, 10), range(0, 10), range(0, 10)))
for n in a:
    cnt = 0;
    for e in p:
        if sum(e) == n:
            cnt += 1
    print(cnt)

Python: import itertools

N = int(input())
count = 0

for i in list(itertools.combinations_with_replacement(range(10), 4)):
    if (sum(i) == N):
        count += 1

print(count)

Python: import sys

for i in sys.stdin:
    n = int(i)
    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
                        break
    print(cnt)

Python: import sys

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

Python: def solve(remains, num=4):
    if remains > 9 * num or remains < 0:
        return 0
    if num == 1:
        return 1
    return sum(solve(remains - i, num - 1) for i in range(10))


while True:
    try:
        print(solve(int(input())))
    except:
        break

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

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

Python: ans=[]

while True:

	try:

		k=int(input())
		if k>18:
			k=36-k

		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: 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(sum[int(imput())])
	except:break

Python: import sys
r = range(10)
for l in sys.stdin: print(len([[a,b,c,d]for a in r for b in r for c in r for d in r if a+b+c+d==int(l)]))

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

Python: import sys

p = [0] * 51
v = 0
for i in range(10):
    p[i] = p[36-i] = (i+3)*(i+2)*(i+1)//6

for i in range(10,19):
    p[i] = p[36-i] = (i+1)*(i+2)*(1-i)//2

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

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

Python: import sys
from itertools import combinations_with_replacement as comb

def get_nums(n, pos):
    N = [1 for _ in range(n)]
    a = sum(N[:pos[0]])
    b = sum(N[pos[0]:pos[1]])
    c = sum(N[pos[1]:pos[2]])
    d = sum(N[pos[2]:])
    if a > 9 or b > 9 or c > 9 or d > 9:
        return None
    return (a,b,c,d)

def run():
    for _n in sys.stdin:
        n = int(_n)
        probs = [get_nums(n, p) for p in comb(range(n+1), 3)]
        probs = [p for p in probs if p != None]
        print(len(probs))

if __name__ == '__main__':
    run()

Python: # coding=utf-8


def making_n(usable_numbers: int, target: int) -> int:
    if usable_numbers == 1:
        if 0 <= target <= 9:
            return 1
        return 0
    count = []
    for i in range(10):
        count.append(making_n(usable_numbers - 1, target - i))
    return sum(count)


if __name__ == '__main__':
    while True:
        try:
            n = int(input())
        except EOFError:
            break
        print(making_n(4, n))

Python: import itertools
while True:
 try:print([sum(a)for a in itertools.product(range(10),repeat=4)].count(int(input())))
 except:break

Python: while True:
    try:
        i = 0
        a = list(map(int,input().split()))
        for x in range(10):
            for y in range(10):
                for z in range(10):
                    for s in range(10):
                        if a[0]==(x+y+z+s):
                            i = i+1
                        else:
                            pass
        print(i)
    except EOFError:
        break

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

Python: import sys
import itertools as it
num = [i for i in range(0,10)]
line = sys.stdin.readlines()
for n in line:
    n = int(n)
    count = 0
    for i in it.product(num, repeat=4):
        if sum(i) == n:
            count += 1
    print(count)

Python: n = int(input())
ans = 0
table = [[a,b,c,d] for a in range(10) for b in range(10) for c in range(10) for d in range(10)]
for abcd in table:
    ans += sum(abcd) == n
print(ans)

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

Python: import sys
for line 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(line): count += 1
    print(count)

Python: # -*- coding: UTF-8 -*-
import math 
import sys
     
for line in sys.stdin:
    N = int(line.rstrip())
    count = 0
    for a in range(10):
       for b in range(10):
          for c in range(10):
             for d in range(10):
                 if sum([a,b,c,d]) == N:
                     count += 1
                     break
    print(count)

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)