java的水题,特判啊。。。依旧无法1Y。
import java.util.*;
import java.math.*; public class Main {
public static void main(String[] args) {
Scanner cin = new Scanner(System.in);
int prim[] = new int[100];
int i,j,n,num;
num = 0;
BigInteger ans,temp,t;
for(i = 2;;i ++)
{
for(j = 2;j < i;j ++)
{
if(i%j == 0)
break;
}
if(j == i)
prim[num++] = j;
if(num == 50) break;
}
n = cin.nextInt();
if(n == 2)
{
System.out.println("-1");
return ;
}
ans = BigInteger.valueOf(1);
for(i = 0;i < n;i ++)
{
temp = BigInteger.valueOf(prim[i]);
ans = ans.multiply(temp);
}
for(i = 0;i < n;i ++)
{
t = BigInteger.valueOf(prim[i]);
temp = ans.divide(t);
System.out.println(temp);
}
}
}