
367. Valid Perfect Square
·
Algorithm
Valid Perfect Square - 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 입력된 num이 완전 제곱수인지 판단해 반환하는 문제다. 단 내장 함수 중 sqrt()를 사용하지 말 것. 완전 제곱수의 조건은 임의의 양수 m에 대해서 m*m에 해당하는 값으로 1, 4, 9, 16, 25.... 등이 있다. 1. Brute Force class Solution: def isPerfectSquare(self, num: int) -> bool: if num =..