why are we doin modulo 10^9+7 in this questions

Contest Page | CodeChef

Try to look at the constraints of L and R. They are quite Large 10^18 hence the pairs formed will be much greater than that hence we using modulo 10^9 + 7.this is a trick that we generally use while dealing with large numbers above 10^18

1 Like

got it thank you for this:)

Sure no problem