Codeforces и Polygon могут быть недоступны в период с 23 мая, 7:00 (МСК) по 23 мая, 11:00 (МСК) в связи с проведением технических работ. ×

Блог пользователя abba5

Автор abba5, история, 6 лет назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

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

  • »
    »
    6 лет назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    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 лет назад, # |
Rev. 9   Проголосовать: нравится +8 Проголосовать: не нравится

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