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

  2. public class C2 {

  3.         BigInteger a=new BigInteger("12345678987654321012345678987654321");
  4.         BigInteger b=new BigInteger("98765432101234567898765432123456789");
  5.         BigInteger c=new BigInteger("74102589636985201474102589636985201");
  6.         BigInteger d=new BigInteger("98700000000000000000000000000000000");
  7.         BigInteger e=new BigInteger("10239999999999999999999999999999999");
  8.         BigInteger f=new BigInteger("55555555555555555555555555555555555");
  9.         BigInteger g=new BigInteger("2177852000000000000000000000000000000000000000");
  10.         long l=1999999999999999999l;
  11.         long y=9223372030000000000l;
  12.         C2()throws Exception
  13.         {
  14.                 System.out.println(l+y);
  15.                 System.out.println(a.add(b));
  16.                 System.out.println(b.subtract(c));
  17.                 System.out.println(c.multiply(BigInteger.valueOf(2)));
  18.                 System.out.println(d.divide(e));
  19.                 System.out.println(e.remainder(f));
  20.                 System.out.println(f.gcd(g));
  21.                 System.out.println(g.pow(2));
  22.         }

  23.         public static void main(String[] args)throws Exception{
  24.                 new C2();
  25.         }
  26. }
複製代碼

TOP

返回列表