import java.math.*;
public class 大整数的加减乘除 {
public static void main(String[] args) {
BigInteger b = new BigInteger("4");
BigInteger b2 = new BigInteger("2");
BigInteger b3 = new BigInteger("3");
System.out.println("加法:" + b.add(b2));
System.out.println("减法:" + b.subtract(b2));
System.out.println("乘法:" + b.multiply(b2));
System.out.println("除法:" + b.divide(b2));
System.out.println("取商:" + b.divideAndRemainder(b3)[0]);
System.out.println("取余:" + b.divideAndRemainder(b3)[1]);
System.out.println("2次方:" + b.pow(2));
System.out.println("相反数:" + b.negate());
}
}