svb:
"Do not you think that your post contained a serious clue? Any solution for N> 7, I get a few seconds, did not even suspect what simple sum obtained. What you said, said the use of the simple sum of the values in your algorithms. Or are you joking?"
Few seconds, congratulation, and it took more than 1 week to find and write a code. You know very little about algorithmic complexity/programming. Study:
http://www.spoj.pl/problems/PRIME1/ the top coder solved this in 0.00 sec. (my time is still very good 0.03 sec.), where is the last accepted user?
http://www.spoj.pl/ranks/PRIME1/start=20000 he/she has solved it in 6.00 sec. like eight other users (note that 6 second was the time limit). What is the ratio of their performance? Division by zero is not possible, so say that the ratio is at least 6.00/0.01=600. And they have got accepted, more than 40 percentage of the submission was out of time limit!
And the times are not in block, you see every kind of times, they use different programming languages (last column) and most probably different algorithms.
Just because you can't imagine such an algorithm that use the given prime sums, there could be such a method.
-- 21.11.2012, 12:35 --svb:
"Nataly-Mak Really bad, now I'm with dimkadimon Probably disqualify"
I don't think that anybody would be disqualified. There are no rules. But to see how a rule look like, maybe (so far) you haven't participated in such a serious contest:
"Each contestant is obliged to solve problems independently. Sharing solutions with other contestants and third parties before the submission deadline is strictly forbidden." ... "The Organizer reserves the right, at its discretion, to disqualify a contestant in the event that the contestant is found by the Organizer to have provided incorrect data, or to have registered for participation in the contest multiple times (i.e. using multiple user accounts), or to have attempted an attack on the system, including any form of denial-of-service attack, or to have violated the regulations of the system or these regulations, or to have violated copyright law" .. "Upon registration, the Contestant agrees to be bound by these terms and regulations."