Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
77887 吴梓玄 求和比较 Python3 Accepted 32 MS 3760 KB 199 2024-06-15 16:57:46

Tests(4/4):


Code:

def cal(a,b,c): global s if c==N+1: if a-b==M: s+=1 return cal(a+c,b,c+1) cal(a,b+c,c+1) N,M=map(int,input().split(" ")) s=0 cal(0,0,1) print(s)