feat(content): hidden test cases
This commit is contained in:
@@ -9,6 +9,28 @@ categories:
|
||||
patterns:
|
||||
- binary-search
|
||||
|
||||
function_signature: "def my_pow(x: float, n: int) -> float:"
|
||||
|
||||
test_cases:
|
||||
visible:
|
||||
- input: { x: 2.0, n: 10 }
|
||||
expected: 1024.0
|
||||
- input: { x: 2.1, n: 3 }
|
||||
expected: 9.261
|
||||
- input: { x: 2.0, n: -2 }
|
||||
expected: 0.25
|
||||
hidden:
|
||||
- input: { x: 1.0, n: 0 }
|
||||
expected: 1.0
|
||||
- input: { x: 5.0, n: 0 }
|
||||
expected: 1.0
|
||||
- input: { x: 2.0, n: 1 }
|
||||
expected: 2.0
|
||||
- input: { x: 2.0, n: -1 }
|
||||
expected: 0.5
|
||||
- input: { x: 0.5, n: 2 }
|
||||
expected: 0.25
|
||||
|
||||
description: |
|
||||
Implement `pow(x, n)`, which calculates `x` raised to the power `n` (i.e., x<sup>n</sup>).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user