var n,k,i,j,d,tam:longint;
s,t:string;
a:array[1..7260] of byte;
begin
write('Nhap n,k:');readln(n,k);
for i:=1 to n do
begin
str(i,t);
for j:=1 to length(t) do
begin
inc(d);
val(t[j],a[d]);
end;
end;
for i:=1 to d-1 do
for j:=i+1 to d do
if a[i]>a[j] then
begin
tam:=a[i];
a[i]:=a[j];
a[j]:=tam;
end;
for i:=1 to d-k do
begin
str(a[i],t);
s:=s+t;
end;
write(s);
readln;
end.
vi so nho nhat nen minh lam nhu vay thoi