Пожалуйста, подпишитесь на официальный канал Codeforces в Telegram по ссылке https://t.me/codeforces_official. ×

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

Автор sanjaysingh23_, история, 4 года назад, По-английски

Hi all, I am sure that all who code in java are familiar with bigIntegers their advantages and disadvantages they come with. However u may know that while using BigIntegers we cannot use normal mathematical operations. We have to implicitly write all the names of the methods like .add(), .multiply() etc.

So do u have any other thing in mind or which u use apart from BigIntegers to store extremly large numbers in java? or is there any shortcut to use BigIntegers?

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

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

If you are looking for the purpose of competitive programming then no and no. Java is not C++ or python. It does not support operator overloading. Even if you had something other than BigInteger you would still have to write complete names similar to .add() or .multiply(). If you are trying to find something because you dont like the syntax then look no more cause you wont find anything that lets you use * in place of .multiply(). If you are looking for better performance then you can check this