문제 링크
function solution(n) { const num = Math.sqrt(n); if (Math.floor(num) === num) { return 1; } else { return 2; } }
function solution(n) { return Number.isInteger(Math.sqrt(n)) ? 1 : 2; }