Need help with Mod operator. I need to answer as a result of %(10^9+7). it is something like this a*b/GCD(b,a). what i did is z=((a%MAX)*(b%MAX))%MAX. then z/GCD(b,a) is this correct?

nopeā¦ **(a/b)%c != a%c/b** as what u r doing

@princerk then what would be the right approach to this??

how to get a*b/GCD(b,a) as a result of %10^9+7 as an answer?