You are given an integer num.
A number num is called a Complete Prime Number if every prefix and every suffix of num is prime.
Return true if num is a Complete Prime Number, otherwise return false.
Note:
k digits of the number.k digits of the number.
Example 1:
Input: num = 23
Output: true
Explanation:
num = 23 are 2 and 23, both are prime.num = 23 are 3 and 23, both are prime.true.Example 2:
Input: num = 39
Output: false
Explanation:
num = 39 are 3 and 39. 3 is prime, but 39 is not prime.num = 39 are 9 and 39. Both 9 and 39 are not prime.false.Example 3:
Input: num = 7
Output: true
Explanation:
true.
Constraints:
1 <= num <= 109