fork download
  1. #include <iostream>
  2. #include <utility>
  3. using namespace std;
  4.  
  5. int main() {
  6. std::hash<void*> h{};
  7. for (int i = 1; i <= 10; ++i) {
  8. cout << i << " -> " << h((void*)(i * 4096)) << endl;
  9. }
  10. // your code goes here
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 5444KB
stdin
Standard input is empty
stdout
1 -> 4096
2 -> 8192
3 -> 12288
4 -> 16384
5 -> 20480
6 -> 24576
7 -> 28672
8 -> 32768
9 -> 36864
10 -> 40960