ý tưởng: kiểm tra từng phần tử của s1 có trong s2 hay không, nếu có,in ra vị trí phần tử s1 trong s2
var
s1,s2:string;
i,j,n1,n2:integer;
begin
write('s1:');readln(s1);
write('s2:');readln(s2);
n1:=length(s1);n2:=length(s2);
for i:=1 to n1 do
for j:=1 to n2 do if s1=s2[j] then write(j,' ');
readln;
end.