奇安信0816笔试第一题AC——老板发奖金Python实现
class Solution: def CalulateMethodCount(self, num_money): # write code here if num_money<=0: return 0 A = [0 for i in range(num_money+1)] A[0]=1 for i in range(1, num_money+1, 1): for j in range(1, 4, 1): if i>=j: A[i] = A[i]+A[i-j] return A[num_money]
#笔试题目##奇安信#