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.
Sign doesn't matter because each element in the sum is first squared. But the value to maximize is the remainder from the division of that sum and the input variable, M. The largest value in the numerator will not necessarily yield the largest remainder. Hope this helps.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Maximize It!
You are viewing a single comment's thread. Return to all comments →
Sign doesn't matter because each element in the sum is first squared. But the value to maximize is the remainder from the division of that sum and the input variable, M. The largest value in the numerator will not necessarily yield the largest remainder. Hope this helps.