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

id = 145
group = 'license_plates'
number = 52
visible = True
facts = None

solution = '''\
joindigits([X], [X]).
joindigits([X,Y|T], NT) :-
  XY is 10*X + Y,
  joindigits([XY|T], NT).
joindigits([X,Y|T], [X|NT]) :-
  joindigits([Y|T], NT).
'''