function main(input) { let [N] = getIntegers(input, " "); if(N <= 1) { console.log(N); } else if(isSosu(N)) { console.log("Sosu!"); } else if(isHeiho(N)) { console.log("Heihosu!"); } else if(isRipo(N)) { console.log("Ripposu!"); } else if(isKan(N)) { console.log("Kanzensu!"); } else { console.log(N); } } function isSosu(n) { if(n == 2) return true; for(let i=2; i<=Math.sqrt(n); i++) { if(n % i == 0) return false; } return true; } function isHeiho(n) { let tmp = Math.floor(Math.pow(n, 1/2)); return Math.pow(tmp, 2) == n; } function isRipo(n) { let tmp = Math.floor(Math.pow(n, 1/3)); return Math.pow(tmp, 3) == n; } function isKan(n) { let sum = 0; for(let i=1; i 1) { let x = Math.floor((r + l) / 2); this[x] > V ? r = x : l = x; } return r; }; Array.prototype.lessThen = function(V, l=0, r=this.length) { l--; while(r - l > 1) { let x = Math.floor((r + l) / 2); this[x] >= V ? r = x : l = x; } return r; }; Array.prototype.orHigher = function(V, l, r) { return this.length - this.lessThen(V, l, r); }; Array.prototype.greaterThan = function(V, l, r) { return this.length - this.orLess(V, l, r); }; Array.prototype.deepCopy = function(list) { let retList = []; for(let i=0; i