You are viewing a single comment's thread. Return to all comments →
My JavaScript Solution function squares(a, b) { const start = Math.ceil(Math.sqrt(a)); const end = Math.floor(Math.sqrt(b)); return end - start + 1 > 0 ? end - start + 1 : 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Sherlock and Squares
You are viewing a single comment's thread. Return to all comments →
My JavaScript Solution function squares(a, b) { const start = Math.ceil(Math.sqrt(a)); const end = Math.floor(Math.sqrt(b));
return end - start + 1 > 0 ? end - start + 1 : 0; }