当我们遇到long不行的时候就要考虑这个BinInteger了,因为这是只要你内存够大,就能输入很大的数,用这个处理高精度问题,是很容易的一件事,对于我这刚学java的萌新来说,长见识了,确实比C方便
BigInteger 任意大的整数,原则上是,只要你的计算机的内存足够大,可以有无限位的
强制类型转换int---BigInteger
BigInteger.valueOf(k);
valueOf:赋初值
add:+ a.add(b);
subtract:-
multiply:*
divide:/
remainder:this % val
divideAndRemainder:a[0]=this / val; a[1]=this % val
pow:a.pow(b)=a^b
gcd,abs:公约数,绝对值
negate:取负数
signum:符号函数
mod:a.mod(b)=a%b;
abs()  //返回其值是此BigInteger的绝对值的BigInteger。
   add(BigInteger val)  //返回其值为(this+val)的BigInteger。
   subtract(BigInteger val)  //返回其值为(this-val)的BigInteger。
   multiply(BigInteger val)  // 返回其值为(this*val)的BigInteger。
   divide(BigInteger val)  //返回其值为(this/val)的BigInteger。
   remainder(BigInteger val)  //返回其值为(this%val)的BigInteger。
   compareTo(BigInteger val)  //将此BigInteger与指定的BigInteger进行比较。返回值1、0、-1分别表示大于、等于、小于
   pow(int exponent)  //返回当前大数的exponent次幂。
   toString()  //返回此BigInteger的十进制字符串表示形式。
   toString(int radix)  //返回此BigInteger的给定基数(radix进制)的字符串表示形式。
资源参考:https://www.cnblogs.com/jin-nuo/p/5313205.html