Problem Statement
定义“稀疏阶乘函数” F(x)= (x-0^2)*(x-1^2)*...*(x-k^2),其中k=sqrt(x-1),
求在[lo, hi]中有多少个正整数 x 满足 F(x) 是 m 的倍数。
数据范围:1 <= lo <= hi <= 10^12, 2 <= m <= 10^6
For an integer n, let F(n) = (n - 0^2) * (n - 1^2) * (n - 2^2) * (n - 3^2) * ... * (n - k^2), where k is the largest integer such that n - k^2 > 0.
You are given three longs lo, hi and divisor.
Compute and return the number of integers n between lo and hi, inclusive, such that F(n) is divisible by divisor.