#include #include using namespace std; typedef long long ll; ll calc(ll d) { return (ll)((-1 + sqrt(1 + 4*d)) / 2.0); } ll correct(ll d) { return (ll)((-1 + sqrt(1+4*(long double)d)) / 2.0); } int main(void) { const ll MAX_VALUE = ll(pow(10, 18)); const int N = 1000000; for(ll k=82345678LL, cnt=0; cnt