코딩 테스트/프로그래머스 level1
정수 제곱근 판별
fullfish
2022. 9. 7. 18:37
코드
function solution(n) {
return Number.isInteger(Math.sqrt(n)) ? Math.pow(Math.sqrt(n) + 1, 2) : -1;
}