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

id = 127
group = 'other'
number = 34
visible = False
facts = None

solution = '''\
genlist([], 0, _, _).
genlist([H|T], N, Min, Max):-
  N > 0,
  N1 is N - 1,
  genlist(T, N1, Min, Max),
  random(Min, Max, H).
'''