Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- N = int(input())
- def natural(n, filter_level) -> int:
- print(f"N-{n}")
- if n == 0:
- return 1
- s = 0
- for i in range(1, min(n // 2, filter_level) + 1):
- print(f"{n} : {n - i} + {i} fl:{filter_level}")
- s += natural(n - i, i) + 1
- return s
- print(natural(N, N))
Advertisement
Add Comment
Please, Sign In to add comment