fork(2) download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Ideone {
  6. public static void main (String[] args) throws java.lang.Exception {
  7. Set<Integer> set = new HashSet<>();
  8.  
  9. for(int i=0; i<100; i++) {
  10. set.add((int)Math.ceil(Math.random()*1000000));
  11. }
  12.  
  13. System.out.print(set);
  14. }
  15. }
Success #stdin #stdout 0.06s 32720KB
stdin
Standard input is empty
stdout
[558089, 631818, 60937, 127496, 483853, 500234, 737048, 580891, 146452, 253461, 609311, 404767, 766225, 198942, 66078, 611113, 383016, 594489, 174643, 233527, 663858, 758578, 966196, 524597, 295233, 377922, 107337, 123468, 28761, 87643, 685652, 338277, 69729, 620136, 523621, 358246, 619114, 365665, 346722, 380527, 145773, 954751, 635515, 996988, 127355, 813682, 198275, 937358, 938893, 517007, 648323, 801670, 880512, 1166, 102286, 679064, 812952, 351634, 516253, 303770, 66463, 361882, 264098, 529071, 327086, 796322, 366773, 230066, 144305, 834489, 776126, 558258, 407226, 648884, 819634, 553654, 35774, 646604, 135112, 865472, 242125, 519880, 130769, 668635, 943324, 756696, 805592, 570576, 124632, 255967, 671956, 386267, 125159, 405742, 735968, 345579, 829177, 930552, 554228, 234748]