09/06/16 21:50:36
>>193
% Prolog
193 :-
t193_1([0,0,0,0,1],[1,0,0,0,0]).
t193_1(L1,L2) :-
L1=[1|_],
★を表示(L1,L2),!.
t193_1(L1,L2) :-
★を表示(L1,L2),
append([A],R1,L1),
append(R1,[A],L3),
append(L4,[B],L2),
t_193_1(L3,[B|L4]).
★を表示([],[]) :- nl.
★を表示([A|R1],[B|R2]) :-
or(A,B,1),
write(★),
★を表示(R1,R2).
★を表示([A|R1],[B|R2]) :-
or(A,B,0),
write(' '),
★を表示(R1,R2).