Given an integer input_value, return True if input_value is a power of three, i.e., there exists an integer exponent such that input_value == 3 ** exponent. Otherwise, return False.
Example 1
Input: input_value = 81
Output: True
Explanation: 81 = 3^4
Example 2
Input: input_value = 10
Output: False
Explanation: 10 is not a power of three
Example 3
Input: input_value = 1
Output: True
Explanation: 1 = 3^0
Example 4
Input: input_value = -27
Output: False
Explanation: Negative numbers are not powers of three
Example 5
Input: input_value = 243
Output: True
Explanation: 243 = 3^5
Constraints
Case 1
Input: input_value = 729
Expected: True
Case 2
Input: input_value = 2
Expected: False
Case 3
Input: input_value = 9
Expected: True
Case 4
Input: input_value = -3
Expected: False
Case 5
Input: input_value = 0
Expected: False