Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
leap: Add years that refute some unusual factors (#1581)
leap 1.6.0 Some implementations unexpectedly pass the entire test suite: * Replacing 4 with 499, 998, or 1996 * Replacing 100 with 5, 10, or 20 * Replacing 100 with 3, 6, 12, 15, 30, 60, 75, 150, 300 * Replacing 400 with 125, 250, 500, 1000, or 2000 Adding these test cases would correctly point out that these solutions are incorrect. I think it's a bit unusual since no student is going to write such an implementation except a student deliberately trying to slip past the tests. Or maybe a student trying to micro-optimise? Maybe they are trying to test whether division by small numbers is faster than division by large numbers? But discussion participants have deemed that the cost of three tests is worth the benefit of reducing mental overhead of mentors, since such solutions have in fact been seen in the wild.
- Loading branch information