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]);
    }

}

 

相关文章:

  • 2022-12-23
  • 2021-05-30
  • 2022-01-09
  • 2022-02-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2021-04-01
  • 2022-12-23
相关资源
相似解决方案