#include "hack.h"
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
map<ll, ll> m;
vector<ll> v;
ll sim(ll b, ll n){
if (n <= b) return 0;
ll q = n/b, r = n%b;
return b * ((q * (q-1)) >> 1) + q * r;
}
int hack(){
if (m.empty()){
for (int b = 2; b <= 1e6; b++) m[sim(b, 1e6)] = b;
for (int i = 1; i <= 1e6; i++) v.push_back(i);
}
return m[collisions(v)];
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |