Блог пользователя r3gz3n

Автор r3gz3n, 12 лет назад, По-английски

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.

Теги bug
  • Проголосовать: нравится
  • -16
  • Проголосовать: не нравится

»
12 лет назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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??

»
12 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
12 лет назад, скрыть # |
 
Проголосовать: нравится +1 Проголосовать: не нравится

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