Given three integers A,B,C, how to find number of positive integral solutions of $a*b>c^2$ with a,b,c having upper bounds A,B,C resp.

50 Views Asked by At

A and B can be as large as $10^9$. However, $C$ is given to be within 5k types.

I tried writing a code, but it's in $O(A*C)$ and it's taking a huge time when $A, C$ exceeds say $5k$.