LCM Challenge Range Query

78 Views Asked by At

I am trying to solve this question LCM Challenge.

How can modulo be used when values of LCM goes quite high or what is the best approach for the question ?