Submeter | Todas submissőes | Melhores | Voltar |
Problem hidden
PRIONPRI - Prime or not Prime! |
In this problem, your task is to determine if a given number is a prime number or a composite number.
Input
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows. Each test case consists of a single line containing a single integer « n » (2 ≤ n ≤ 109).
Output
For each test case, your program should output a single line containing « YES » (without quotes and spaces) if the given integer is prime or « NO » (without quotes and spaces) if the given integer is a composite number.
Example
Input: 6 16 127 256 513 2048 5097 Output: NO YES NO NO NO NO
Adicionado por: | mbk_live |
Data: | 2019-01-08 |
Tempo limite: | 1s |
Tamanho do fonte: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Linguagem permitida: | C-CLANG C NCSHARP C++ 4.3.2 CPP CPP14 CPP14-CLANG C99 JAVA JULIA PYTHON PYPY3 PYTHON3 SWIFT |