summaryrefslogtreecommitdiff
path: root/prolog/problems/trees/numberbt_2/common.py
blob: a7499c226ceead1a74f9b449d1a528d03c44ecab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# coding=utf-8

id = 139
group = 'trees'
number = 44
visible = True
facts = None

solution = '''\
numberBT(nil, 0).
numberBT(b(L, _, R), N) :-
  numberBT(L, LN),
  numberBT(R, RN),
  N is LN + RN + 1.
'''