Problem 2825. pay it forward

You will pass this problem if you are the second person to choose that same number

Good luck!

How it works

Your function should simply return the number you have chosen. Your solution will always get a score equal to the number you choose (independently of whether the solution passes the test or fails). Your solution will pass the test iff:

1. there is one (and only one) other solution that has obtained the same score as yours

and 2. this previous solution had been created by a different Cody player (it was not crafted by yourself)

Typically this previous solution (from someone else) would be a failed submission (and that is perfectly fine), since at that time it would have been the first solution submitted to get that score. See the testsuite for details.

Notes

Typically you will need to cooperate with other Cody players, or depend on their kindness, to be able to solve this problem.

If you prefer to go the 'solo' route any number of hacking solutions would also work (but they are not the intended focus of this particular problem)

Sorry for the discontinuity. This problem is working again (changes in Cody were interfering with our old way of assigning not-size-based scores to solutions). Let me know if you still run into any issues.

Solution Comments

I did not expect that this Solution would pass. . . . Solution 556171 was submitted on 12 Jan 2015 with Size = 65535 by unknown Player (first instance, so marked as incorrect).
Solution 557603 was submitted on 14 Jan 2015 with Size = 65535 by Michael C. (second instance, so marked as correct).
Solution 828081 was submitted on 15 Feb 2016 with Size = 65535 by unknown Player (third instance, so marked as incorrect). . . . So this here would be the fourth instance, no?

Is this Test still working? I submitted a problem of size 100, and also returned the number 100 from the function, and AFAIK there was only one other solution with this score previously submitted (and which wasn't submitted by me), namely https://www.mathworks.com/matlabcentral/cody/problems/2825-pay-it-forward/solutions/556177 . Admittedly that supposedly needs rescoring, but I didn't think that should affect anything.

I just got the heads up that my original solution to this problem had been nullified when this problem showed up on my "not solved" listing. Out of curiosity, I entered 100 as my entry, and it told me that there were two other entries with that number. If I understand the suite correctly, and it's still working as it should, your "100" solution should probably have worked, David.

Hi, James. Actually, this Solution (my "100" Solution) was initially marked as 'incorrect', but a while after my Comment was posted the Solution was remarked to 'correct'. I surmise that Alfonso Nieto-Castanon updated the Test Suite to account for some changes to how Cody works. Although he has not made a Comment to that effect, besides the changed scoring of my Solution it is notable that A. N.-C. also submitted a (correct) Solution on 30 Oct 2017, which I would interpret as a validation exercise by the Problem's creator. So it seems a glitch arose some time after the Problem's inception, and that glitch was fixed in mid/late October 2017. —DIV