fork(27) download
  1. // uniform_int_distribution
  2. #include <iostream>
  3. #include <random>
  4.  
  5. int main()
  6. {
  7. /* Seed */
  8. std::random_device rd;
  9.  
  10. /* Random number generator */
  11. std::default_random_engine generator(rd());
  12.  
  13. /* Distribution on which to apply the generator */
  14. std::uniform_int_distribution<long long unsigned> distribution(0,0xFFFFFFFFFFFFFFFF);
  15.  
  16. for (int i = 0; i < 10; i++) {
  17. std::cout << distribution(generator) << std::endl;
  18. }
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 3416KB
stdin
Standard input is empty
stdout
10685130152044466691
15979176311165253736
17239036947913582037
14881777281324482298
2455233544299494586
3700305268852315959
579304061425580164
8274629987083883996
1370990061432116035
6186255635275705543