fork download
  1. import std.algorithm, std.array, std.random, std.stdio;
  2.  
  3. void main ()
  4. {
  5. rndGen.seed (12345);
  6. bool [int] a;
  7. while (a.length < 10)
  8. {
  9. a[uniform !("[]") (11, 201)] = true;
  10. }
  11. a.byKey ().array ().sort ().writeln ();
  12. }
  13.  
Success #stdin #stdout 0s 2684KB
stdin
Standard input is empty
stdout
[16, 55, 85, 97, 101, 134, 158, 182, 184, 188]