Primes 3
Given T (1 ≤ T ≤ 100) positive integers, one per line, determine whether each one is prime. The integers will be no greater than 263−1.
The first line of input will be the integer T. The next T lines each contain a number to be tested.
For each of the T integers, you should output on a separate line PRIME
if the corresponding integer is prime, or NOT
if it is composite.
Sample Input
5 1 2 6 11 1000000000000000000
Sample Output
NOT PRIME NOT PRIME NOT
All Submissions
Best Solutions
Point Value: 20 (partial)
Time Limit: 2.00s
Memory Limit: 16M
Added: Jan 03, 2014
Author: Alex
Languages Allowed:
C++03, PAS, C, ASM, C++11
Comments (Search)