Problem 2825. pay it forward
Choose a number (integer between 0 and 65535)
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)
Solution Stats
Problem Comments

9 Comments
If you are the first player to attempt this problem, I left number 42 open for you. Cheers!
Very creative problem! Took me a while to understand the test code and then realized I had the golden opportunity. And "paid it forward" too
Whoever you are, I have always depended on the kindness of strangers.
Sorry for the discontinuity. This problem is working again (changes in Cody were interfering with our old way of assigning notsizebased scores to solutions). Let me know if you still run into any issues.
note: as a side effect of the glitch solutions submitted between May and June 2015 had been incorrectly scored so please disregard those
It is possible to solve this problem without relying on the kindness of strangers or hacking. Just think...
@Rafael: thanks for you comment, and I guess you are right and kindness is in the eye of the beholder, but for example I see your solution using y=10 relying on Jonathan's kindness (as he submitted that 10 before you did), and similarly I see your failed but kind! y=50382 solution hopefully helping some other player solve this problem in the future, effectively paying that kindness forward (thanks!). That said, perhaps Jonathan, or you, were not really trying to be kind to others with their failed solution attempts and were instead just trying out some random solutions, but hey, I like my interpretation better :)
Everyone is entitled to an opinion, Alfonso :), but I went with Benford's Law and code analysis.
and i went with Alfonsos kind lengthy comment :)
Solution Comments
Show commentsProblem Recent Solvers34
Suggested Problems

Find the longest sequence of 1's in a binary sequence.
5852 Solvers

340 Solvers

640 Solvers

Back to basics 8  Matrix Diagonals
910 Solvers

482 Solvers
More from this Author38
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!