summaryrefslogtreecommitdiffstats
path: root/Main/Python/2012/S1.py
blob: 2a76b58ddd4f348ff955f30d59072a6ea7c79bde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from queue import Queue


J = int(input())

q = Queue()
q.put([J])

output = 0

while not q.empty():
    current = q.get()

    if len(current) == 4:
        output += 1
        continue

    for i in range(1,current[-1]):
        q.put(current + [i])

print(output)