Returns the sum of squarefrees for a given Pascal's Triangle of depth n. >>> solution(1) 1 >>> solution(8) 105 >>> solution(9) 175
(n: int = 51)
| 98 | |
| 99 | |
| 100 | def solution(n: int = 51) -> int: |
| 101 | """ |
| 102 | Returns the sum of squarefrees for a given Pascal's Triangle of depth n. |
| 103 | |
| 104 | >>> solution(1) |
| 105 | 1 |
| 106 | >>> solution(8) |
| 107 | 105 |
| 108 | >>> solution(9) |
| 109 | 175 |
| 110 | """ |
| 111 | unique_coefficients = get_pascal_triangle_unique_coefficients(n) |
| 112 | squarefrees = get_squarefrees(unique_coefficients) |
| 113 | return sum(squarefrees) |
| 114 | |
| 115 | |
| 116 | if __name__ == "__main__": |
no test coverage detected