09/06/26 17:14:14
>>293
% Prolog 最後6の表示が間違ってるが。
t293(N) :-
length(L,N),
append(L1,L2,L),
not(L2=[]),
all(L1,' '),
all(L2,'*'),
length(L1,N),
N2 is N + 1,
concat_atom(L,S),
write_formatted('%t %t\n',[N2,S]),
fail;
true.
all([],_).
all([A|R],A) :- all(R,A).