Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×

sanjaysingh23_'s blog

By sanjaysingh23_, history, 4 years ago, In English

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?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it +8 Vote: I do not like it

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