326. Power of Three
·
Algorithm
Power of Three - LeetCode Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 1. Iteration class Solution: def isPowerOfThree(self, n: int) -> bool: cur = 0 while True: temp=pow(3,cur) if temp>n: return False if temp==n: return True cur+=1 입력받은 수가 3의 N승의 숫자인지 찾는 문제다. 그냥 3의 N승을 모두 구해서 매칭 되면 반환하게..