ответ:
{l-левая половинка числа, r - правая}
var count,k,m,r,l: longint;
begin
count: =0; writeln('введите k'); readln(k);
for l: =1 to k do
r: =0; m: =l;
while m> 0 do
r: =r*10+m mod 10;
m: =m div 10;
end;
if r=l then count: =count+1;
writeln(count);
ответ:
{l-левая половинка числа, r - правая}
var count,k,m,r,l: longint;
begin
count: =0; writeln('введите k'); readln(k);
for l: =1 to k do
begin
r: =0; m: =l;
while m> 0 do
begin
r: =r*10+m mod 10;
m: =m div 10;
end;
if r=l then count: =count+1;
end;
writeln(count);