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

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