yohei #4332(2007/11/22 09:30 GMT) [ Prolog ] Rating0/0=0.00
1 2 3 4 5
partNum(N, 1, [N]). partNum(N, M, [J|L]) :- M > 1, M1 is M - 1, between(0, N, I), J is N - I, partNum(I, M1, L). :- forall((partNum(5, 3, L), concat_atom(L, ', ', X)), writeln(X)).
Rating0/0=0.00-0+
[ reply ]
yohei
#4332()
[
Prolog
]
Rating0/0=0.00
partNum(N, 1, [N]). partNum(N, M, [J|L]) :- M > 1, M1 is M - 1, between(0, N, I), J is N - I, partNum(I, M1, L). :- forall((partNum(5, 3, L), concat_atom(L, ', ', X)), writeln(X)).Rating0/0=0.00-0+
[ reply ]