나의 풀이class Solution { public long solution(long n) { long answer = 0; long i = 1; while (i while문을 사용해서 문제를 풀었다. 트러블슈팅while (i while문의 조건을 위와 같이 설정했더니 i가 1일 경우에는 동작하지 않게 되었다. 다른 사람의 풀이class Solution { public long solution(long n) { if (Math.pow((int)Math.sqrt(n), 2) == n) { return (long) Math.pow(Math.sqrt(n) + 1, 2); } return -1; }}깔끔하게 코드..