function solution(n) { let answer = 0; Number.isInteger(Math.sqrt(n)) == false ? answer = -1 : answer = Math.pow(Math.sqrt(n) + 1, 2) return answer; }
성공