Lead package: Import java.math.*;
You can use the constructor method: Public BigInteger (String val), such as:
BigInteger a=New BigInteger ("123456789123456789123456789");
can also be read directly, such as:
Scanner reader=New Scanner (system.in); BigInteger a=reader.nextbiginteger ();
Public BigInteger Add (BigInteger val)
Public BigInteger Subtract (BigInteger val)
Public BigInteger Multiply (BigInteger val)
Public BigInteger Divide (BigInteger val)
Public BigInteger ABS () returns the absolute value of the current large integer object
Public BigInteger pow (int a) returns a power to the current large integer object
public string toString () returns the string representation of the current large integer object in decimal
public string toString (int p) returns the string representation of the current large integer object P-Binary
Never afraid of high precision
Algorithm note--java BigInteger class