Hello,
though I enjoyed this task very much I think n up to 10**6 is overkill. I believe 10**3 or 10**4 would be fine and it take less time to evaluate. Regardless fact the server wont be loaded so much.
IMHO there is no need for 10**6 because performance is not objective of the task. My solution is very very slow :)
Thank you, Bryukh. I really like the challenging spirit of this task :)
Pavel
Created at: 2014/06/20 19:10; Updated at: 2014/06/24 13:31