Divisible Numbers (hard version)

Problem Name:
Divisible Numbers (hard version)
Site:CodeForces
Links:
Tags:
Problem setters: