fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <random>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. random_device rd;
  10. mt19937 gen(rd());
  11. uniform_int_distribution<> dis(100000, 1000000);
  12.  
  13. for (int n = 0; n < 50; ++n)
  14. cout << dis(gen) << '\n';
  15. }
  16.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
116035
358476
207402
207608
653360
871744
515472
699719
789782
160470
661841
185096
147305
390718
541059
417477
616783
122012
806875
840868
616750
703530
161797
446565
699247
784635
568337
929139
871357
932057
995415
637000
760244
651506
666360
970455
240617
970904
893191
797835
425044
210242
742327
259913
639785
232275
408372
312375
908394
432892