fork download
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cstdlib>
  4. #include <set>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. set <unsigned long long> used;
  11.  
  12. for (unsigned q=0; q<100; ++q)
  13. {
  14. unsigned long long x;
  15. while (!used.insert(x = (((unsigned long long)rand() << 16 | rand()) << 16 | rand()) % 10000000000).second);
  16. cout << setfill('0') << setw(10) << x << endl;
  17. }
  18.  
  19. return 0;
  20. }
Success #stdin #stdout 0.01s 5428KB
stdin
Standard input is empty
stdout
2910360681
2513411327
4151374633
5476103083
7882398179
7698057922
7270736667
2236041101
7375003950
8857853855
8924262246
3228226487
6943965347
2246509917
3270683736
7452515540
6153946317
3710231220
8855946254
6663384641
5901473244
1321596393
8936775233
4619135847
8701929086
2497881820
7509698447
0439413290
6163912763
7556906159
0320651756
3881153628
8784731390
0595795706
1063668219
3164721126
8986560380
0415295448
4260889737
4523236027
7911140879
9436821995
1275730437
4652234496
1260345914
4088924171
3300548936
3425574589
3349765918
9763907195
0641403668
8894422725
7502762873
4251403120
4586859025
5099692508
2693943724
2361817360
5811663411
0115272016
0414449429
5804253551
5747526842
3883317749
8720704538
1687401763
6316152056
2217060115
6093890382
4119975474
6057386617
1570630196
0894634830
4203463627
6586607276
4333483563
4035916373
2996281456
2934321979
6497359315
7967907507
5179859184
3939219279
6991029577
9599200846
6547943536
0383396234
1436187464
5599365820
1681804824
1501633196
4935519118
0996512301
3534123842
3090670788
2547303117
4274758271
7028080852
7725136094
0292681196