需要特别说明的就是BigInteger需要由String转化过来。如果是整数,直接toString就好了。
@Frosero import java.math.BigInteger; public class Main { static BigInteger a = new BigInteger("9876543210"); static BigInteger b = new BigInteger("27"); static BigInteger m = new BigInteger("1000000007"); public static void main(String[] args) { System.out.println(a.add(b)); // + System.out.println(a.subtract(b)); // - System.out.println(a.multiply(b)); // * System.out.println(a.divide(b)); // / System.out.println(a.mod(b)); // % System.out.println(a.compareTo(b)); // a > b : 1 ; a < b : -1 ; a == b : 0 ; System.out.println(a.equals(b)); // a == b : true ; System.out.println(a.isProbablePrime(1)); // probable : true ; System.out.println(a.gcd(b)); // gcd System.out.println(a.modPow(b, m)); // pow + % // max min or xor and ....... } }转载于:https://www.cnblogs.com/ScratchingBear/p/5345831.html
相关资源:DirectX修复工具V4.0增强版