You are viewing a single comment's thread. Return to all comments →
Easiest Javascript solution without any loop:
function squares(a, b) { let sqrtA=Math.ceil(Math.sqrt(a)); let sqrtB=Math.floor(Math.sqrt(b)); return (sqrtB-sqrtA)+1; }
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 →
Easiest Javascript solution without any loop: