注意输入格式为 2 4def f(m,n): if n==1 or m==1 or m==0: return 1 elif m<0 or n<=0: return 0 else: return f(m-n,n)+f(m,n-1) if name=='main': while True: try: s= raw_input() s1= s.split(' ') # print m m = int(s1[0]) ...