Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
77892 汤弘毅 求和比较 Python3 Accepted 37 MS 3764 KB 239 2024-06-15 17:01:23

Tests(4/4):


Code:

n,m = map(int,input().split()) cnt = 0 def cal(a,b,c): global cnt if c == n+1: if a-b == m: cnt+= 1 return cal(a + c, b, c + 1) cal(a, b + c, c + 1) cal(0,0,1) print(cnt)