Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
72877 | Py自测 | 求和比较 | Python3 | Accepted | 35 MS | 3768 KB | 233 | 2024-05-13 15:00:32 |
N, M = map(int, input().split()) ans = 0 def f(x, s1, s2): global ans if x > N: if s1 - s2 == M: ans += 1 return f(x + 1, s1 + x, s2) f(x + 1, s1, s2 + x) f(1, 0, 0) print(ans)