解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
long n=scanner.nextLong();
long count=1;
long count1=2;
long sum=2;
long i;
while(count!=n) {
int t=0;
count1++;
for(i=2;i*i<=count1;i++)
if(count1%i==0) {
t=1;
break;}
if(t==0) {
sum=(sum*count1%50000)%50000;
count++;
}
}
System.out.print(sum);
}
}
0.0分
0 人评分