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
powt([1,1,3]).
Warning: /home/rqrZrl/prog.pl:2: Singleton variables: [H] false.
-
result: Success time: 0.02s memory: 6204 kB returned value: 0
powt([1,2,3]).
Warning: /home/08Ip2B/prog.pl:2: Singleton variables: [H] false.
-
result: Success time: 0.02s memory: 6204 kB returned value: 0
Warning: /home/W7DTXV/prog.pl:2: Singleton variables: [H]



