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: # 累積計算

from itertools import product

if __name__ == "__main__":
    while True:
        try:
            col = 0
            n = int(input())
            #print(n)
            if n > 36:
                print(0)
            else:
                for a, b, c, d in product(range(0, 10), repeat=4):
                    if a + b + c + d == n:
                        col += 1
                    else:
                        pass
                print(col)

        except EOFError:
            break  # escape from while loop

pass
#

Python: for _ in range(50):
    try:
        n = int(input()) # 1 <= n <= 50
        ans =set()
        for a in range(10):
            if (n - a) >= 1:
                for b in range(10):
                    if(n - a -b) >= 1:
                        for c in range(10):
                            if(n - a - b - c) >= 1:
                                for d in range(10):
                                    if(n - a - b - c - d) == 0:
                                        ans.add("{},{},{},{}".format(a,b,c,d))
                                        ans.add("{},{},{},{}".format(b,c,d,a))
                                        ans.add("{},{},{},{}".format(c,d,a,b))
                                        ans.add("{},{},{},{}".format(d,a,b,c))
        print(ans)
        print(len(ans))
    except EOFError:
        break

Python: try:
    while True:
        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:
    pass

Python: import sys
import itertools

v = list(range(10))

for line in sys.stdin:
    n = int(line)
    res = 0

    for i in itertools.product(v, repeat=4):
        sum = 0
        for y in i:
            sum += y
        
        if sum == n:
            res += 1

    print(res)

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: p = input()
p = int(p)
i = 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):
                sum = a + b + c + d
                if sum == p:
                    i += 1
print(i)

Python: import sys

def comb(n):
    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
                        continue
    return count


while True:
    line = sys.stdin.readline()
    if not line: break
    n = int(line.rstrip('\r\n'))
    print(comb(n))

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: # -*- coding: utf-8 -*-
import math

errerN=1

while errerN:
    try:
        r=int(input())
        p=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==r:
                            p+=1
        print(p)
    except :
        errerN=0

Python: import sys
#from me.io import dup_file_stdin

#@dup_file_stdin
def solve():
    for s in map(int,sys.stdin):
        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))
solve()

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

if __name__ == '__main__':

	for n in sys.stdin:
		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 == int(n):
							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: 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: # -*-coding:utf-8
#????????????????????°

import fileinput

def main():

    for line in fileinput.input():
        tokens = list(map(int, line.strip().split()))

        number = tokens[0]
        ans = 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) == number):
                            ans += 1

        print(ans)

if __name__ == '__main__':
    main()

Python: import sys
[print(len([True 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(x)])) for x in sys.stdin]

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

Python: n=int(input())
d=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: user = input()
n = int(user)
num = 0
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                if(n == a + b + c + d):
                    num += 1

print(num)

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