To evaluate the solution, use solution() >>> solution(3) 120 >>> solution(6) 18720 >>> solution(7) 68720
(max_power: int = 9)
| 114 | |
| 115 | |
| 116 | def solution(max_power: int = 9) -> int: |
| 117 | """ |
| 118 | To evaluate the solution, use solution() |
| 119 | >>> solution(3) |
| 120 | 120 |
| 121 | >>> solution(6) |
| 122 | 18720 |
| 123 | >>> solution(7) |
| 124 | 68720 |
| 125 | """ |
| 126 | result = 0 |
| 127 | for length in range(1, max_power + 1): |
| 128 | result += reversible_numbers(length, 0, [0] * length, length) |
| 129 | return result |
| 130 | |
| 131 | |
| 132 | def benchmark() -> None: |
no test coverage detected