Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- #include <string>
- #include <vector>
- #include <random>
- using namespace std;
- int main()
- {
- int n;
- cin >> n;
- mt19937_64 random_gen;
- uint64_t sum = 0;
- /*for (int i = 0; i < n; ++i)
- {
- uint64_t x = random_gen();
- sum += x;
- }*/
- for (int i = 0; i < n; ++i)
- {
- auto x = new uint64_t;
- *x = random_gen();
- sum += *x;
- delete x;
- }
- cout << sum;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement