Return the smallest integer that can be written as the sum of primes in over m unique ways. >>> solution(4) 10 >>> solution(500) 45 >>> solution(1000) 53
(number_unique_partitions: int = 5000)
| 62 | |
| 63 | |
| 64 | def solution(number_unique_partitions: int = 5000) -> int | None: |
| 65 | """ |
| 66 | Return the smallest integer that can be written as the sum of primes in over |
| 67 | m unique ways. |
| 68 | >>> solution(4) |
| 69 | 10 |
| 70 | >>> solution(500) |
| 71 | 45 |
| 72 | >>> solution(1000) |
| 73 | 53 |
| 74 | """ |
| 75 | for number_to_partition in range(1, NUM_PRIMES): |
| 76 | if len(partition(number_to_partition)) > number_unique_partitions: |
| 77 | return number_to_partition |
| 78 | return None |
| 79 | |
| 80 | |
| 81 | if __name__ == "__main__": |