3^99 can be re-written as (4-1)^99 Let’s call 4 as x,and -1as y.
When we do the binomial expansion of (x+y)^99, and temporarily omit the coefficient, we obtain, X^99+x^98*y+x^97*y^2+x^96*y^3.......x*y^98+y^99.
We know that 4 raised to any natural number grater than one,will divide 8 completely (4^2=16=8*2, and therefore every subsequent power of 4 can be rewritten in the form of 8k, where k is a natural number.)
The last two terms of this binomial expansion are, (99 c 98) *x*y^98 + y^99.....(x C y represents x “choose” y) 99 C 98 is nothing but 99 ....... ( by using the n C r formula ) So the last two terms will be, 99*4*1+(-1) =396-1=395 395 mod 8= (392 mod 8) + (3 mod 8) = 0+3=3 So our required answer has been obtained: 3