Solution1 数学方法

  • 时间复杂度 $O(logn)$

  • 空间复杂度 $O(1)$

如果能整数3则不断整除3,最后判断留下来的数是不是1。$3^{0} = 1$

Last updated