I am confused in taking modulo in several questions. Generally it is %1000000007, but in some cases we take %1000000006 in between. When to take %1000000007 and %1000000006?
Can you give an example of where you’ve seen this?
if u calculate ab %m then simple but if u wanna calculate a^b^c %m then we have to calculate res = bc %(m-1) then calculate ares %m
thank you!!!
1 Like