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,T);sprawdz(T). powt(A):- sprawdz(A), writeln(A). |
bmFsZXp5KCBYLFtYfF9dICkuCm5hbGV6eSggWCxbSHxUXSApIDotIG5hbGV6eSggWCxUICkuCgp1c3VuKFgsW1h8UmVzenRhXSxSZXN6dGEpLgp1c3VuKFgsW1l8T2dvbl0sW1l8UmVzenRhXSkgOi0KCXVzdW4oWCxPZ29uLFJlc3p0YSkuCgpzcHJhd2R6KFtIfFRdKTotIG5hbGV6eShILFQpLT51c3VuKEgsVCk7c3ByYXdkeihUKS4KCnBvd3QoQSk6LSBzcHJhd2R6KEEpLCB3cml0ZWxuKEEpLg==
-
upload with new input
-
結果: Success time: 0.03s 記憶體: 6204 kB 回傳值: 0
powt([1,1,3,4]).
Warning: /home/ghrLYJ/prog.pl:2: Singleton variables: [H] ERROR: sprawdz/1: Undefined procedure: usun/2 ERROR: However, there are definitions for: ERROR: usun/3
-
結果: Success time: 0.02s 記憶體: 6204 kB 回傳值: 0
powt([1,2,3,4]).
Warning: /home/LPPf5l/prog.pl:2: Singleton variables: [H] false.
-
結果: Success time: 0.02s 記憶體: 6204 kB 回傳值: 0
Warning: /home/NWyJVy/prog.pl:2: Singleton variables: [H]



