nums以大于1的数字开头的情况下:nums = [2, 1, 3, 1]res = [2]思路:遍历nums, 每次向res里面添加res[i]个nums[i]i= 0, res[0] = 2, nums[0] = 2, res = [2, 2, 2]注意:因为之前赋值的时候赋值了一个2,这次又重复计算了,所以这一块要给人还回去,所以这里的res = [2, 2]i=1, res[1] = 2, nums[1] = 1, res=[2, 2, 1, 1]i=2, res[2] = 1, nums[2] = 3, res=[2,2,1,1,3]i=3, res[3] = 1, nums[3] ...