See Brij, use the Euler's theorem or if that doesn't work, Break the divisor into number of coprimes (preferrably two) and use Chinese remainder theorem.
brij: what kinji@PG says is perfectly right.....only that u cannot use euler here as 1990(denominator) and 2( the number whose power is being raised) are not coprimes....so break 1990=199*10( product of coprimes)
here say 199=a that gives remainder 29 and 10=b that gives remainder 4 so chinese says: remainder of 2^1990/ 199*10 = a(4)x+b(29)y where ax+by=1 i.e 199x+10y=1, we get x=-1,y=20
substituting , we get remainder is 199(4)(-1)+10(29)(20) = 5004 but since 5004 in greater than 1990, we divide it by 1990 to get the remainder we get 1024.
when we divide 1024 by 1990,rem comes 1024.hence again 1024^196 divide by 1990 rem come 1024 (cycliccity concept)
hey Mr.Kool if possible can u explain in detail how do u get same remainder when 1024 and (1024)^196 divided by 1990.. Sorry i couldnt understand how to apply the cyclicity concept in this case.. :-(
hey Mr.Kool if possible can u explain in detail how do u get same remainder when 1024 and (1024)^196 divided by 1990.. Sorry i couldnt understand how to apply the cyclicity concept in this case.. :-(
I thiink it should be 1024^199
We know that (1024^199) = 1024(mod 199) ..Fermat's Little Theorem Also (1024^199) = 4(mod 10)
N = 10k + 4 = 199n + 1024 k = 19n + 102 + (9n/10), k is integer for n = 0, 10, 20, ,,, So, N is of form 1990m + 1024
The integers 1,2 ..... 40 are written on whiteboard. Following operation is repeated 39 times.. In each repetition,any two numbers, say 'A' and 'B', currently on whiteboard are erased and a new number A+B-1 is written. What will be the number left on the board at the end? 820 821 781 819 780
The integers 1,2 ..... 40 are written on whiteboard. Following operation is repeated 39 times.. In each repetition,any two numbers, say 'A' and 'B', currently on whiteboard are erased and a new number A+B-1 is written. What will be the number left on the board at the end? 820 821 781 819 780
Vikrant
In each operation the total sum reduces by 1, so in 39 operations thetotal sum will reduce by 39.
Number left on the board = (1 + 2 + 3 + .. + 40) - 39 = 40*41/2 - 39 = 781