主题:prime test 素数问题
Time Limit: 5000ms, Special Time Limit:10000ms, Memory Limit:65536KB
Total submit users: 328, Accepted users: 37
Problem 10007 : No special judgement
Problem description
Given a big integer number, you are required to find out whether it's a prime number.
Input
The first line contains the number of test cases T (1 <= T <= 20 ), then the following T lines each contains an integer number N (2 <= N < 254).
Output
For each test case, if N is a prime number, output a line containing the word "Prime", otherwise, output a line containing the smallest prime factor of N.
Sample Input
2
5
10
Sample Output
Prime
2
Problem Source
POJ Monthly
哪位高手能帮帮菜鸟啊? 谢谢了!
Total submit users: 328, Accepted users: 37
Problem 10007 : No special judgement
Problem description
Given a big integer number, you are required to find out whether it's a prime number.
Input
The first line contains the number of test cases T (1 <= T <= 20 ), then the following T lines each contains an integer number N (2 <= N < 254).
Output
For each test case, if N is a prime number, output a line containing the word "Prime", otherwise, output a line containing the smallest prime factor of N.
Sample Input
2
5
10
Sample Output
Prime
2
Problem Source
POJ Monthly
哪位高手能帮帮菜鸟啊? 谢谢了!