r3gz3n's blog

By r3gz3n, 10 years ago, In English

I tried to run this code on my machine and is giving correct answer for the 21st test case. Please check why its giving wrong answer on codeforces compiler.

Tags bug
  • Vote: I like it
  • -16
  • Vote: I do not like it

| Write comment?
»
10 years ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

8603498 u need use long long , sorry for duplicate ur code :D

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It happened to me too(I havent seen you code, but talking generally).. Sometimes my IDE (Dev C++ 5.7.1) on my laptop gives different output for test cases than the codeforces compiler!! I thought it might be because of the use of different version of compiler by Codeforces!! I dont know!! Can anyone answer this please??

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

My bad. I got it. x will overflow. Thanks :)

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

Do not use long. It's machine-dependent. It's 64-bit on x86-64 but 32-bit on x86. Codeforces Judge is x86.