Primes 3
View as PDF        
            Submit solution
        
    
    
    
    
    
    
    
    
    
                    
                
        
            
        
        Points:
        
                15 (partial)        
    
    
        Time limit:
        1.0s
    
    
        Memory limit:
        16M
    
    
                        Author:
                        
                    
        
                    Problem type                
                
        
                Allowed languages
            
            
ALGOL 68, Assembly, Brain****, C, C++, COBOL, Forth, Fortran, Lua, Text, Turing            
        Given  
 positive integers, one per line, determine
whether each one is prime. The integers will be no greater than
.
The first line of input will be the integer . The next 
 lines each
contain a number to be tested.
For each of the  integers, you should output on a separate line
PRIME if the corresponding integer is prime, or NOT if it is
not prime.
Sample Input
5
1
2
6
11
1000000000000000000
Sample Output
NOT
PRIME
NOT
PRIME
NOT
Comments