当数据范围像上述题目中这么大时,不能用递归一层一层的去做,很容易堆栈溢出(个人教训及感觉)
import java.math.BigInteger;
import java.util.Scanner;
public class Main {
static String n,m;
static int k;
static BigInteger count=new BigInteger("0");
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
n=sc.nextLine();
m=sc.nextLine();
k=sc.nextInt();
BigInteger div=new BigInteger("999101");
BigInteger bn=new BigInteger(n);
BigInteger bm=new BigInteger(m);
BigInteger add=new BigInteger("0");