omkar21_pro's blog

By omkar21_pro, history, 4 months ago, In English

In recent codeforces div 4 round In Problem E triple operations my code is giving different output than what is on local machine

Here is my submission 275029038

I do not understand why is that so myoutput

codeforces output

  • Vote: I like it
  • +1
  • Vote: I do not like it

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Don't use log function. It works with doubles, that's why you are getting WA. Write yours own LOG function

»
4 months ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I recommend writing your own logarit function, because the built-in one only works with double. Btw, about the problem, I suggest you this 275041318, Precalculate the number of operations needed for each number.