我是wjl 2013-07-13 20:41:00
点我顶贴
收藏
删除
program t257;
var s:string;
n,i,num:longint;
procedure delmaxsubnum();
var i,ii:longint;
tmax:string;
begin
tmax:='0';
for i:=1 to length(s) do begin
if s[i]>tmax then begin ii:=i;tmax:=s[i];end;
end;
delete(s,ii,1);
end;
begin
readln(s);
readln(n);
for i:=1 to n do delmaxsubnum;
if s='' then write(0) else
begin val(s,num);write(num);end;
readln;readln;
end.