题目描述
Given a positive integer n. Find whether a number is a semiprime or not.
Note: A semiprime is a natural number that is a product of two prime numbers .
Example 1:
Input:
N=35
Output:
1
Explanation:
35=7x5.So 35 is a semi-prime.
Example 2:
Input:
8
Output:
0
Explanation:
8 is not a semi prime.
Your Task:
You don't need to read input or print anything.Your Task is to complete the function checkSemiprime() which takes a number N as input parameter and returns 1 if it is a semi prime number.Otherwise, it returns 0.
Expected Time Complexity:O(Sqrt(N))
Expected Auxillary Space:O(1)
Constraints:
1<=N<=10^{9}
输入格式
见题面
输出格式
见题面
样例输入
N=35
样例输出
1