Prime Number Check
Easy
math
algorithm
Prime Number Check
Determine whether a given number is prime.
A prime number is a natural number greater than 1 that has no positive divisors other than 1 and itself.
Example 1
Input: 7
Output: True
Example 2
Input: 10
Output: False
Constraints
- 2 ≤ n ≤ 10000
示例测试用例
示例 1
输入:
2
预期输出:
True
示例 2
输入:
7
预期输出:
True
示例 3
输入:
10
预期输出:
False
快捷键:
- • Ctrl/Cmd + Enter 提交
📈 统计
提交次数
0
通过次数
0