kevinkowa's blog

By kevinkowa, history, 9 years ago, In English

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?

  • Vote: I like it
  • -6
  • Vote: I do not like it

| Write comment?
»
9 years ago, # |
  Vote: I like it +1 Vote: I do not like it

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.