Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		if inputCount == 50 {
			break
		}
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
		count = 0
	}
	for _, v := range resultArr {
		fmt.Printf("%d\n", v)
	}
}

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: import sys
from itertools import product

sum = [0] * 51
for k,l in product([i+j for i,j in product(range(10),repeat=2)],repeat=2):
    sum[k+l] += 1

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

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: 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))
        print(len(ans))
    except EOFError:
        break

Python: import math
n = int(input())
nn = n
arr = []
for i in range (1,5):
    if(nn>10):
        arr.append(9)
        nn = nn-9
    else:
        arr.append(nn)
        nn = nn-nn

#print(arr)

top = math.factorial(4)
bottom = 1
for i in range(0,4):
    exist = False
    for j in range(0,i):
        if(arr[i]==arr[j]):
            exist = True
    count = 0
    if(not(exist)):
        for j in arr:
            if(arr[i]==j):
                count += 1

        bottom = bottom * math.factorial(count)


print(str(int(top/bottom)))
print()

Python: lst=[0 for i in range(50)]
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: import sys
t = [0 for i in range(10000)]
c = 0
for i in range(10):
    for j in range(10):
        for k in range(10):
            for l in range(10):
                t[c] = i + j + k + l
                c += 1
for line in sys.stdin:
    n = int(line)
    print(t.count(n))

Python: while True:
    try:
        cnt = 0
        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 = cnt + 1

        print(str(cnt))
    except:
        break

Python: import sys

def count_combination(n):
    count = 0
    for i in range(10):
        for j in range(10):
            for k in range(10):
                l = n - (i + j + k)
                if l >= 0 and l < 10:
                    count += 1
    return count

for line in sys.stdin:
    n = int(line)
    print(count_combination(n))

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):
                if 0 <= int(line) - (a + b + c) <= 9:
                    count += 1
    print(count)

Python: #coding:utf-8

while True:
    try:
        count = 0
        n = input()

        for a in xrange(0, 10):
            for b in xrange(0, 10):
                for c in xrange(0, 10):
                    for d in xrange(0, 10):
                        if a + b + c + d == n:
                            count += 1
        print(count)
    except:
        break

Python: import sys
for e in sys.stdin:
 e=int(e);x=range(10)
 print(sum([1 for a in x for b in x for c in x for d in x if a+b+c+d==e]))

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

Python: n=int(input())
count=0
for a in range(1,10):
    for b in range(1,10):
        for c in range(1,10):
            if 50-a-b-c>=0 and 50-a-b-c<10:
                count+=1
print(count)

Python: a = []
while True:
    try:
        a.append(int(input()))
    except EOFError:
        break
for i in a:
    frag = 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 == i:
                        frag += 1
    print(frag)

Python: while True:
    try:
        n = int(input())
    except:
        exit()
    m = 9
    c = 0
    def loop(n,dep):
        l = n - m*(3-dep)
        u = n
        if (l < 0):l = 0
        if (m < u):u = 9
        return l,u+1

    il,iu= loop(n,0)
    for i in range(il,iu):
        jl,ju = loop(n-i,1)
        for j in range(jl,ju):
            ij = i+j
            kl,ku = loop(n-ij,2)
            for k in range(kl,ku):
                c += 1

    print(c)

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

Python: import sys

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

Python: import sys
def count(number) :
    result = 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 == 35 : result += 1
    return result

for make in sys.stdin.readlines():
    print(count(make))

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(1)
        continue
    if n > 36:
        print(0)
        continue
    cnt = 0
    cmbs = itertools.combinations_with_replacement(range(0,10), 4)
    for cmb in cmbs:
        if sum(cmb) == n:
            if len(set(cmb)) == 1:
                cnt += 1
            elif len(set(cmb)) == 2:
                cnt += math.factorial(2) * 2
            elif len(set(cmb)) == 3:
                cnt += math.factorial(3)
            elif len(set(cmb)) == 4:
                cnt += math.factorial(4)
    print(cnt)

Python: def rec(i,n):
    r=0
    if i==4:
        return 1 if n==0 else 0
    for m in range(10):
        r+=rec(i+1,n-m)
    return r
while True:
    try:
        n=int(input())
        print(rec(0,n))
    except:
        break

Python: #!/usr/bin/env python3
import itertools
import sys


def operation(n):
    count = 0
    for a, b, c, d in itertools.product(range(10), repeat=4):
        if a + b + c + d == n:
            count += 1
    print(count)


def main():
    for l in sys.stdin:
        n = int(l.strip())
        operation(n)


if __name__ == '__main__':
    main()