#include #include using namespace std; using i64 = long long; i64 calc(i64 d) { return i64((-1 + sqrt(1 + 4*d)) / 2.0); } bool is_correct(i64 t, i64 d) { return t*t + t <= d && d < (t+1)*(t+1) + (t+1); } int main(void) { const i64 MAX_VALUE = i64(pow(10, 18)); const int N = 100000; for(i64 k=i64(sqrt(MAX_VALUE)), cnt=0; cnt