20
This is the robbers' thread. The cops' thread goes here.
In the cops thread, the task was to write a program/function that takes a positive (or non-negative) integer and outputs/returns another number (not necessarily integer). The robbers task is to unscramble the code the cops used to produce this output.
The cracked code doesn't have to be identical, as long as it has the same length and any revealed characters are in the correct positions. The language must also be the same (version numbers can be different). The output must of course be identical.
No-ops can be used in robber's solution.
The winner of the robbers thread will be the user who has cracked the most submissions by May 7th 2016. If there's a tie, the user who has cracked submissions with the longest combined code will win.
The submission should be formatted like this:
Language, nn characters (including link to answer), Cop's username
Code:
function a(n)
if n<2 then
return n
else
return a(n-1) + a(n-2)
end
end
Output
a(0) returns 0
a(3) returns 2
Optional explanation and comments.
These rules here are different from the cops thred, where it says: However, any proposed source code that produces the same set of output also counts as valid, as long as it is also found in OEIS. – flawr – 2016-04-09T18:52:41.790
What happens if the examples match multiple OEIS series ? This Just happened with Adnan and me – FliiFe – 2016-04-10T20:06:57.267
@FliiFe Under the current rules, any code which matches the cop's code and outputs an OEIS sequence whose values coincide with the cop's examples is a valid crack. – Mego – 2016-04-11T20:22:33.437
Has this finished? Is there a winner? – Andrew Savinykh – 2016-05-16T02:38:26.580