1.

In This Question A^b Means A Raised To The Power Of B Start With The Integers From 1 To 10^2012. Replace Each Of Them By The Sum Of Its Digits To Get A String Of 10^2012 Numbers. Keep Doing This Until You Get 10^2012 Single Digit Numbers. Let M Be The Number Of 1's And N Be The Number Of 2's. Then M - N?

Answer»

We divide all the numbers into groups of 9. (1 to 9), (10 to 18).....

Now when we divide each term in the first group by 9, we get 1, 2, 3 ..0 as remainders. Now digit sum is nothing but finding REMAINDER when a number is divided by 9. 

So the last term, 10^2012 gives remainder 1 when divided by 9. So there is one "1" extra than 2's.

We divide all the numbers into groups of 9. (1 to 9), (10 to 18).....

Now when we divide each term in the first group by 9, we get 1, 2, 3 ..0 as remainders. Now digit sum is nothing but finding remainder when a number is divided by 9. 

So the last term, 10^2012 gives remainder 1 when divided by 9. So there is one "1" extra than 2's.



Discussion

No Comment Found

Related InterviewSolutions