You are viewing a single comment's thread. Return to all comments →
Math.floor(Math.sqrt(B)) = Math.floor(Math.sqrt(70)) = 8 Math.ceil(Math.sqrt(A)) + 1) = Math.ceil(Math.sqrt(26)) = 6
Then do 8 - 6 + 1 = 3.
You had the parentheses in the incorrect place.
HackerRank solutions.
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 →
Math.floor(Math.sqrt(B)) = Math.floor(Math.sqrt(70)) = 8 Math.ceil(Math.sqrt(A)) + 1) = Math.ceil(Math.sqrt(26)) = 6
Then do 8 - 6 + 1 = 3.
You had the parentheses in the incorrect place.
HackerRank solutions.