cmonsuckitbitch's blog

By cmonsuckitbitch, 12 years ago, In English

Hi! Please see this code==>3375812.the output of the test case should be 1800.compile it and test it.The output of this code for n=5 is 1800.But in codeforces judging the output was 1799.Why??????????????????

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

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

I think the problem is because of double type in c++, pow(x, y) returns double number.

»
12 years ago, # |
  Vote: I like it +2 Vote: I do not like it

Anyway, your solution is totally incorrect)