Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

Recover the mutated source code (for robbers)

This is the companion thread to the main Recover the mutated source code (link) challenge. If you have successfully cracked a cop's answer, post your solution as an answer to this question.

As a reminder, here are the robber rules from the main challenge again:

The robber will attempt to change the cop's program (which completes Task #1) into a program that completes Task #2 (not necessarily the original program written by the cop) in the edit distance specified by the cop.

An already-cracked submission cannot be cracked again (only the first robber who cracks a submission gets credit).

After cracking a submission, please do the following:

  • Post an answer to this challenge's accompanying question (link), providing the language, your solution, and a link to the original answer.
  • Leave a comment with the text "Cracked" that links to your posted answer.
  • Edit the cop's answer if you have edit privileges (if you do not, either wait until someone else with the required privileges does so for you or suggest an edit).

And scoring:

If a robber successfully cracks a cop's submission, the robber's score goes up by the edit distance of that submission. For example, a robber that cracks a submission with an edit distance of 3 and one with a distance of 5 earns 8 points. The robber with the highest score wins. In the event of a tie, the robber who earned the score first wins.

Leaderboard

There are no cracked submissions yet.

Answer*

Cancel
1
  • \$\begingroup\$ Yeah, I designed it from the wrong end (and posted it, until Sp3000 spotted it), so it looks a little weird. \$\endgroup\$ Commented Dec 29, 2014 at 19:15