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

Автор doubleMasalaMaggi, история, 33 часа назад, По-английски

1988C - Increasing Sequence with Fixed OR When I did this problem in cpp, it got stuck on the 101th case of test case 2 that was 10^18, but then I submitted the same logic in python, this worked, I was not able to figure out why this happened and this is not my first encounter when python worked with large number and cpp didn't. cpp submission -> 298635588 python submission- > 298635633. Please help me out why this happened.

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

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

replace 1 by 1LL

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

I changed the degrees, as well as $$$(1 « i)$$$ if written like this, it will contain a maximum of $$$int$$$. If you write like this $$$(1ll « i)$$$ then it will be $$$long$$$ $$$long$$$ here is the modified code

Code