feat(content): more test cases

This commit is contained in:
2025-07-13 19:25:39 +01:00
parent 98ebb1600f
commit 16b02451d0
94 changed files with 1840 additions and 0 deletions

View File

@@ -10,6 +10,32 @@ patterns:
- dynamic-programming
- greedy
function_signature: "def integer_break(n: int) -> int:"
test_cases:
visible:
- input: { n: 2 }
expected: 1
- input: { n: 10 }
expected: 36
hidden:
- input: { n: 3 }
expected: 2
- input: { n: 4 }
expected: 4
- input: { n: 5 }
expected: 6
- input: { n: 6 }
expected: 9
- input: { n: 7 }
expected: 12
- input: { n: 8 }
expected: 18
- input: { n: 11 }
expected: 54
- input: { n: 58 }
expected: 1549681956
description: |
Given an integer `n`, break it into the sum of `k` **positive integers**, where `k >= 2`, and maximize the product of those integers.