2018 焦作E java 高精度暴力
https://vjudge.net/problem/Gym-102028E
暴力,线性递推分母
//package acm;
import java.math.BigInteger;
import java.util.Scanner;
import com.sun.org.apache.bcel.internal.generic.SWAP;
import com.sun.org.apache.bcel.internal.generic.StackConsumer;
import sun.management.GcInfoCompositeData;
public class Main{
public static final int maxn=1000,maxm=200000;
public static BigInteger gcd(BigInteger a,BigInteger b) {
if(b.compareTo(BigInteger.ZERO)==0)return a;
else return gcd(b, a.remainder(b));
}
public static void main(String[] argc){
int[]a=new int[maxn];
for(int i=2;i