We need to find all numbers between [i,j] (inclusive) which have 'D' as it's lowest common divisor(LCD).
Constraints : 1<=i<=j<=2*10^9; 1<=D<=2*10^9;
If the constraints hadn't been that much large, it can be trivially solved using sieve of Eratosthenes.
Any solution to this problem is appreciated.