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
@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
-
Project Euler: Problem 6, Natural numbers, squares and sums.
2321 Solvers
-
Project Euler: Problem 7, Nth prime
1565 Solvers
-
Convert a numerical matrix into a cell array of strings
2065 Solvers
-
Determine Whether an array is empty
783 Solvers
-
956 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!