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

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

I used BigInteger for this problem, just in case if the output had to be a large number, but I got a Time limit exceeded on pretest 10. If you used java, can you tell me what you used to solve it?

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

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

The problem time limit is only 0.5 seconds so that you wouldn't solve it using big integer. you should find the non beautiful number and add zeros to its right equal to zeros in all numbers. If all numbers are beautiful then you can consider any number as the starting number.