Easy
007Power of Three
Return true if n is a positive power of three.
EXAMPLES
Example 1
Input
{
"n": 27
}
Output
trueFUNCTION SHAPE
n: int→boolReturn true if n is a positive power of three.
EXAMPLES
Input
{
"n": 27
}
Output
trueFUNCTION SHAPE
n: int→boolRuns solve(...) locally in a browser worker. SWE Playbook does not submit your code. Only run code you trust; Python code may access the network.