General solution, not test-gaming
Prevent solutions that only satisfy the test cases.
Official basis Don't focus on passing tests or hard-coding — solve the general case. docs ↗
The prompt
Fix <function> so it works correctly for all valid inputs. Implement the real logic that generalizes — do not hard-code values or special-case the tests just to make them pass. Why it works
Under pressure to go green, a model can quietly special-case the exact test inputs. The docs warn against this explicitly; naming it up front keeps the implementation honest and genuinely correct.
Fill in
<function>— the code that must generalize.
Follow-ups
- “Add a test with inputs not in the original suite and confirm it still passes.”