You are viewing a single comment's thread. Return to all comments →
l = ceil(sqrt(k)); r = floor(sqrt(k));
This code is too simple and does not reflect the problem statement properly.
It is possible (but not necessary) to create a solution that does not compute r at all.
Encryption
You are viewing a single comment's thread. Return to all comments →
l = ceil(sqrt(k)); r = floor(sqrt(k));
This code is too simple and does not reflect the problem statement properly.
It is possible (but not necessary) to create a solution that does not compute r at all.