Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
2sdfghkl
function PosLast(substr,s :string):integer; var i,j,k,n:integer; begin k:=0; j:=1; n:=0; for i:=1 to length(s) do begin if (s[i] = substr[j]) then begin if (j=1) then k:=i; j:=j+1; if (j=length(substr)+1) then n:=n+1; end else j:=1; end; if (n<>0) then PosLast:=k else PosLast:=0; end; var s:string; begin writeln(PosLast('pos', 'pokoposkopos')); writeln(PosLast('mama','papapapapapapapapapapapapapapa')); end.
run
|
edit
|
history
|
help
0
pares entre a y b
Бассейн-7
Vector Addition
zadanye 3 a
exRecords
JONES AKPOTU
practica 7 ejercicio B6
practica 5 ejercicio 6
Calculatrice 1.0
Random