1 2 3 4 5 6 7 8 9 10 | nalezy( X,[X|_] ). nalezy( X,[H|T] ) :- nalezy( X,T ). usun(X,[X|Reszta],Reszta). usun(X,[Y|Ogon],[Y|Reszta]) :- usun(X,Ogon,Reszta). sprawdz([H|T]):- nalezy(H,T)->usun(H,H|T,T). powt(A):- sprawdz(A), writeln(A). |
bmFsZXp5KCBYLFtYfF9dICkuCm5hbGV6eSggWCxbSHxUXSApIDotIG5hbGV6eSggWCxUICkuCgp1c3VuKFgsW1h8UmVzenRhXSxSZXN6dGEpLgp1c3VuKFgsW1l8T2dvbl0sW1l8UmVzenRhXSkgOi0KCXVzdW4oWCxPZ29uLFJlc3p0YSkuCgpzcHJhd2R6KFtIfFRdKTotIG5hbGV6eShILFQpLT51c3VuKEgsSHxULFQpLgoKcG93dChBKTotIHNwcmF3ZHooQSksIHdyaXRlbG4oQSku
-
upload with new input
-
result: Success time: 0.02s memory: 6204 kB returned value: 0
usun(1,[1,2,3,4,5,6],[2,3,4,5,6]).
Warning: /home/e8YxgB/prog.pl:2: Singleton variables: [H] true EOF: halt
-
result: Success time: 0.02s memory: 6204 kB returned value: 0
usun(3,[1,2,3,4,5,6],10).
Warning: /home/P2x7OX/prog.pl:2: Singleton variables: [H] false.
-
result: Success time: 0.03s memory: 6204 kB returned value: 0
Warning: /home/ohZ28Q/prog.pl:2: Singleton variables: [H]



