My point was that maybe their test wasn't what it appears to be. The bug could have been anything - the test may have been to see if applicants are comfortable using a debugger.
Yes, I'm sure it was exactly that. My point is that it's a failure, because it's an insult to the test-taker's intelligence. "Here's a trivial problem to solve, now I want to see you solve it in the most inefficient manner possible."