To evaluate the solution, use solution() >>> slow_solution(3) 120 >>> slow_solution(6) 18720 >>> slow_solution(7) 68720
(max_power: int = 9)
| 78 | |
| 79 | |
| 80 | def slow_solution(max_power: int = 9) -> int: |
| 81 | """ |
| 82 | To evaluate the solution, use solution() |
| 83 | >>> slow_solution(3) |
| 84 | 120 |
| 85 | >>> slow_solution(6) |
| 86 | 18720 |
| 87 | >>> slow_solution(7) |
| 88 | 68720 |
| 89 | """ |
| 90 | result = 0 |
| 91 | for length in range(1, max_power + 1): |
| 92 | result += slow_reversible_numbers(length, 0, [0] * length, length) |
| 93 | return result |
| 94 | |
| 95 | |
| 96 | def reversible_numbers( |
nothing calls this directly
no test coverage detected