We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
i solved it using loops and if statements but the solution was not enough to execute the problem in less than the fixed time. So then only i came here to find the better solution and found this amazing formula and wondered how to think like this..lol
Cookie support is required to access HackerRank
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 →
i solved it using loops and if statements but the solution was not enough to execute the problem in less than the fixed time. So then only i came here to find the better solution and found this amazing formula and wondered how to think like this..lol