Example:
Consider simpler case first 9+99+999 = (10-1) + (100-1) + (1000-1) = 1110 - 3 = 1107
Solution:
n = 9+99+999+...+9999...9 = (10-1) + (100-1) + (1000-1) +...+ (10000...0-1) =
10 + 100 + 1000 + 10000...0 - 1999 = {10000...0 consists 1999 digits of 0 }
1111...10 - 1999 = {1111...10 consists 1999 digits of 1 }
1111...100000 + 11110 - 1999 = {1111...100000 consists 1995 digits of 1 }
1111...100000 + 9111 {1111...100000 consists 1995 digits of 1 }
Number n consists of (1995 + 3) digits of 1.
Answer : Digit 1 appear in n 1998 times.
Comments
Dear Aravind, You are welcome. We are glad to be helpful. If you liked our service, please press a like-button beside the answer field. Thank you!
Great work thanks a lot
Leave a comment