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: #!/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
    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: if __name__ == '__main__':
    while True:
        try:
            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)
        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))
                                        ans.add("{},{},{},{}".format(b,c,d,a))
                                        ans.add("{},{},{},{}".format(c,d,a,b))
                                        ans.add("{},{},{},{}".format(d,a,b,c))
        print(len(ans))
    except EOFError:
        break

Python: while True :
    try :
        n = int(input())
    except EOFError :
        break
    
    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
a=[0]*51
for i in range(19):a[i]=a[36-i]=(i+3)*-~-~i*-~i//6-a[i-10]*4*(i>9)
for e in sys.stdin:print(a[int(e)])

Python: import sys
values = []
for line in sys.stdin:
    values.append(int(line))
    
for v in values:
    ans = [1 for i in range(10) for j in range(10) for k in range(10) for l in range(10) if v == i + j + k + l]
    print(ans.count(1))

Python: import sys

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

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

Python: import sys

p = [0] * 51
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)*(i+3)//6 - 2*(i-9)*(i-8)*(i-7)//3

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

Python: import sys
import itertools

def countcombi(n):
    r = 0
    p = list(itertools.product(range(0,10),repeat = 4))
    for tmp in p:
        if sum(tmp) == n:
            r += 1
    return r


if __name__ == '__main__':
    for line in sys.stdin:
        n = (int)(line)
        print(countcombi(n))

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

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