[LeetCode 279] Perfect Squares [Java]