大数求商和余数
代码:
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner(System.in);
BigInteger a = sc.nextBigInteger();
BigInteger b = sc.nextBigInteger();
BigInteger c = a.divide(b);//除法
BigInteger d = a.mod(b);//取余
System.out.println(c+" "+d);
}
}