Skip to content

Instantly share code, notes, and snippets.

@mt-xing
mt-xing / stars.js
Created July 3, 2020 21:40
538's Riddler
for(let i = 52; true; i += 2) {
if(isGood(i)) {
console.log(i);
break;
}
}
function isGood(i) {
let sq = i / 2;
if(!Number.isInteger(Math.sqrt(sq))){