题解(Python)
2024-11-02 18:01:43
发布于:广东
0阅读
0回复
0点赞
def count_sequences(n):
dp = [0] * (n + 1)
dp[1] = 1
for i in range(2, n + 1):
dp[i] = 1
for j in range(1, i // 2 + 1):
dp[i] += dp[j]
return dp[n]
n = int(input().strip())
print(count_sequences(n))
这里空空如也
有帮助,赞一个