java大数取余:
类方法:BigInteger.divideAndRemainder()
返回一个数组,key = 0为商key = 1为余数
import java.util.*; import java.math.*; public class Main{ public static void main(String[] args) { BigInteger num=BigInteger.valueOf(13); BigInteger num1[] = //remermber num.divideAndRemainder((BigInteger.valueOf(7))); System.out.println(num1[1]); } }