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

id = 139
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.
'''