var
x, n:integer;
begin
write('x = ');
readln(x);
write('n = ');
readln(n);
while n > 0 do
begin
if n mod 10 = x then
begin
writeln('Yes');
readln;
Exit;
end;
n := n div 10;
end;
writeln('No');
readln;
end.
//Задание 2
var
a:array[1..100] of integer;
i, n:integer;
begin
randomize;
n := random(18 + 3);
writeln('n = ', n);
for i := 1 to n do
begin
a[i] := random(11) - 5;
while a[i] = 0 do
a[i] := random(11) - 5;
write('a[', i, '] = ', a[i], ' ');
end;
a[i + 1] := 0;
writeln;
i := 1;
while(a[i + 1] <> 0) do
begin
if (a[i] = a[i + 1]) then
begin
writeln('a[', i, '] = a[', i + 1, '] = ', a[i]);
readln;
exit;
end;
inc(i);
end;
writeln('Нет ни одной пары одиноковых соседних чисел');
readln;
end.