var
a: array[0..20] of Integer =(1,2,3,5,6,7,11,12,15,18,19,20,26,31,35,39,40,52,55,56,57);
procedure TForm1.Button1Click(Sender: TObject);
var
b:TStrings;
i,c:Integer ;
s:string ;
begin
Randomize ;
b := TStringList .Create;
try
for i := 0 to 20 do b.Add(IntToStr(a[i]));
for i := 0 to 7 do
//这个选8个数
begin
c:= Random(21-i);
s:=s+b[c]+'
';
b.Delete(c);
end;
mmo1.Lines.Add(s);
finally
b.Free;
end;
end;