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.
Could I get clarification?
I implemented a code and found the cost lower than the one in the example for a new matrix.
For the given matrix:
4 8 2
4 5 7
6 1 6
The matrix below solves it at a lower cost (this is what my code found):
[4, 8, 2]
[4, 4, 6] = cost is 2
[6, 2, 6] = cost is 1
The magic constant is 14 and The cost is 3
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Forming a Magic Square
You are viewing a single comment's thread. Return to all comments →
Could I get clarification? I implemented a code and found the cost lower than the one in the example for a new matrix. For the given matrix:
4 8 2
4 5 7
6 1 6
The matrix below solves it at a lower cost (this is what my code found):
[4, 8, 2]
[4, 4, 6] = cost is 2
[6, 2, 6] = cost is 1
The magic constant is 14 and The cost is 3