peaceful_warrior's blog

By peaceful_warrior, 11 years ago, In English

I am getting wrong answer for Test Case 4(Problem C) : http://mirror.codeforces.com/contest/546/submission/11226594

But When I run the same Code in Ideone and My Linux Machine I am getting the correct output.

MY code (same as submission Link above): http://ideone.com/NmWgjc

Don't Know why Such Weird Problem is happening. Any Help Will be Appreciated.

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

| Write comment?
»
11 years ago, hide # |
 
Vote: I like it +6 Vote: I do not like it

Try to submit your code again but without using pow function

»
11 years ago, hide # |
 
Vote: I like it +1 Vote: I do not like it

11230498 got AC. If the result of pow should be an integer,you can add it by 0.5 before casting it,so things like 7.99999 will become 8.49999 and then become 8.