原问题:题目大意:问你当n取何值时,该二元二次不定方程的解的数量超过400万个。
数学算法部分:
代码部分:
void serch1(ll x,ll v,double vv) {
if (x > 15)return;
if (v > 7999999) {
double vvv = sqrt(vv);
if(vvv<ans2){
ans2 = vvv;
printf("%lld\n", ans2);
return;
}
}
if (sqrt(vv) > ans2)return;
ll i, j, l;
for (i = 2; i <= 24; i=i+2) {
double v1 = pow(prime[x], i);
if (sqrt(v1 * vv) > ans2)return;
serch1(x + 1, v * (i + 1), vv * v1);
}
return;
}
void solve() {
ll i, j, k, p, q, r, t;
double a1, a2 = 0;
ll NN = 1000000;
double a = 0, b = 0;
t = 0;
ans1 = 0;
get_prime(100);
p = 1;
i = 1; a = 1;
ans2 = 614889782588491392;
serch1(1, 1, 1);
printf("%lld\n", ans2);
}