program Project4;
{$APPTYPE CONSOLE}
uses SysUtils;
var
n,k,x,y,a,b:integer;
function digit(n,k:integer):integer;
begin
writeln('输入n,k的值:');
Readln(n,k);
while k>0 do
begin
x:=n mod 10;
y:=n div 10;
n:=y;
k:=k-1
end;
Writeln('回送的值为:',x);
Readln(x);
end;
begin
a:=0;b:=0;
digit(n,k);
readln;
end.
var n,k:integer;
function digital(a,b:integer):integer;
var s:string;
begin str(a,s); val(s[k],digital);
end;
begin readln(n,k); writeln(digital(n,k));
end.