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


  2. public class Big {
  3.     BigInteger x=new BigInteger("1999999999999999999999999999999999999999999999999");
  4.     BigInteger y=new BigInteger("1000000000000000000000000000000000000000000000001");
  5.     BigInteger i=new BigInteger("2100000000000000000000000000000000000000000000000");
  6.     BigInteger j=new BigInteger("1400000000000000000000000000000000000000000000000");
  7.     long a=1999999999999999999l;
  8.     long b=1000000000000000001l;
  9.         Big()
  10.         {
  11.                 System.out.println(a+b);
  12.                  System.out.println(x.add(y));
  13.          System.out.println(x.subtract(y));
  14.          System.out.println(x.multiply(BigInteger.valueOf(2)));
  15.          System.out.println(x.divide(y));
  16.          System.out.println(x.remainder(y));
  17.          System.out.println(i.gcd(j));
  18.          System.out.println(j.pow(2));
  19.         }
  20.         public static void main(String[] args){
  21.                 new Big();
  22.         }

  23. }
複製代碼

TOP

返回列表