Returns the number of possible prize strings for a particular number of days, using a simple recursive function with caching to speed it up. >>> solution() 1918080160 >>> solution(4) 43
(days: int = 30)
| 87 | |
| 88 | |
| 89 | def solution(days: int = 30) -> int: |
| 90 | """ |
| 91 | Returns the number of possible prize strings for a particular number |
| 92 | of days, using a simple recursive function with caching to speed it up. |
| 93 | |
| 94 | >>> solution() |
| 95 | 1918080160 |
| 96 | >>> solution(4) |
| 97 | 43 |
| 98 | """ |
| 99 | |
| 100 | return _calculate(days, absent=0, late=0) |
| 101 | |
| 102 | |
| 103 | if __name__ == "__main__": |