Question 7

A 122 digit number is obtained by writing the 2 digit numbers 39 to 99, i.e., $$39404142434445...96979899$$. You have to remove 61 digits from this number in such a way that the remaining digits in that order form the largest number possible.(For example in 15161718 if we  remove the four 1’s we get the number 5678, but if we remove 1, 5, 1 and the 1 after 6, we get 6718. This will be the largest number possible in this case.) What will be the first 10 digits of the largest number obtained?


Correct Answer: 9999777737

To maximize the remaining number, we greedily keep the largest possible digit at each position by removing digits that come before a larger digit further along. Working through the sequence from 39 up to 99, the digits 4, 0, 1, 5, 0, 5, 1, 6, 0, 6 and similar smaller digits get removed in favor of later 9s and 7s. This process yields the leading digits $$9999777737$$.

Was this solution helpful?

Get AI Help

50,000+ JEE Students Trusted Our Score Calculator

Predict your JEE Main percentile, rank & performance in seconds

Ask AI