标签:imp mil code font print java bre next 多少
1
样例输出
2
1 import java.text.DecimalFormat; 2 import java.text.NumberFormat; 3 import java.util.ArrayList; 4 import java.util.Arrays; 5 import java.util.Collection; 6 import java.util.Collections; 7 import java.util.List; 8 import java.util.Scanner; 9 import java.util.Stack; 10 public class Main{ 11 public static void main(String[] args){ 12 Scanner input = new Scanner(System.in); 13 int n = input.nextInt(); 14 int i = 1; 15 int h = 0; 16 int j; 17 int ji = 1; 18 while(h!=n){ 19 i++; 20 for(j=2;j<=Math.sqrt(i);j++){ 21 if(i%j==0) 22 break; 23 } 24 if(j>Math.sqrt(i)){ 25 h++; 26 ji = ji*i%50000; 27 } 28 } 29 System.out.println(ji%50000); 30 31 } 32 }
标签:imp mil code font print java bre next 多少
原文地址:http://www.cnblogs.com/lolybj/p/6530378.html