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.
Yes. For some L the constraint can't be met. 8 is one example: sqrt(8) ~= 2.8, so a 3x3 grid violates the constraint, and 2x3 which meets it is too small for 8 elements.
Another test where L = 3 has the same problem.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Encryption
You are viewing a single comment's thread. Return to all comments →
Yes. For some L the constraint can't be met. 8 is one example: sqrt(8) ~= 2.8, so a 3x3 grid violates the constraint, and 2x3 which meets it is too small for 8 elements.
Another test where L = 3 has the same problem.