abba5's blog

By abba5, history, 6 years ago, In English

Question was asked in this contest !!! [IEMATICS](https://www.codechef.com/IEMATICS

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
6 years ago, # |
  Vote: I like it +14 Vote: I do not like it

What about 90,90,90,90,90,90,90,90,90,90,442.

  • »
    »
    6 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    People talk about conspiracy theories where Hitler is still alive. But after this comment they'll be talking about theories where Einstein's still alive.

»
6 years ago, # |
Rev. 9   Vote: I like it +8 Vote: I do not like it

Since the maximum sum of digits of a k-digit decimal number representation is 9k, the minimum number of digits of the decimal representation of N and 2N should be 13 digits and 14 digits, respectively.

UPDATE: It turns out that it is sufficient to concatenate two instances of the number M = 1,994,999 whose sum of digits is 50, and whose double 2 M = 3,989,998 has sum of digits equal to 55. The concatenation leads to doubling the sum of digits as the most significant digit in M is less than 5, and no carry operation is performed between the two instances when M is doubled.

Therefore, the 14-digit decimal number N = 19,949,991,994,999 is a possible solution of the problem.

The following is the simple DP-based solution that generated such number.

https://ideone.com/LuMF89