- import java.math.BigInteger;
- public class C2 {
- BigInteger a=new BigInteger("12345678987654321012345678987654321");
- BigInteger b=new BigInteger("98765432101234567898765432123456789");
- BigInteger c=new BigInteger("74102589636985201474102589636985201");
- BigInteger d=new BigInteger("98700000000000000000000000000000000");
- BigInteger e=new BigInteger("10239999999999999999999999999999999");
- BigInteger f=new BigInteger("55555555555555555555555555555555555");
- BigInteger g=new BigInteger("2177852000000000000000000000000000000000000000");
- long l=1999999999999999999l;
- long y=9223372030000000000l;
- C2()throws Exception
- {
- System.out.println(l+y);
- System.out.println(a.add(b));
- System.out.println(b.subtract(c));
- System.out.println(c.multiply(BigInteger.valueOf(2)));
- System.out.println(d.divide(e));
- System.out.println(e.remainder(f));
- System.out.println(f.gcd(g));
- System.out.println(g.pow(2));
- }
- public static void main(String[] args)throws Exception{
- new C2();
- }
- }
複製代碼 |