返回列表 發帖
  1. import java.math.BigDecimal;
  2. import java.math.BigInteger;


  3. public class Ch01 {

  4.         Ch01()
  5.         {
  6.                 BigInteger a=new BigInteger("45000000000000000000000000000000000000000");
  7.                 BigInteger b=new BigInteger("4567683213245657895453612354679545666666666665555553");
  8.                 BigInteger c=new BigInteger("55000000000000000000000000000000000000000");
  9.                
  10.                 long x=12000000000l;
  11.                 long y=53000000000l;
  12.                
  13.                 System.out.println(x+y);
  14.                 System.out.println(a.add(b));
  15.                 System.out.println(a.subtract(b));
  16.                 System.out.println(a.multiply(b));
  17.                 System.out.println(a.divide(b));
  18.                 System.out.println(a.remainder(b));
  19.                 System.out.println(a.gcd(b));
  20.                 System.out.println(a.pow(20));
  21.         }
  22.         public static void main(String[] args) {
  23.                 new Ch01();
  24.         }

  25. }
複製代碼

TOP

返回列表