summaryrefslogtreecommitdiff
path: root/prolog/problems/other/genlist_4/common.py
blob: 388c0417572d18420f150d69948a57852064ed86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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).
'''