Python || Dynamic Programming || Simple solution
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\no(n * k)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\no(k)\n\n# Code\n```\nclass Solution:\n    def sumOfPower(self, nums: List[int], k: int) -> int:\n        dp = [0] * (k + 1)\n        dp[0] = 1\n        for i in range(len(nums) - 1, -1, -1):\n            temp = [0] * (k + 1)\n            temp[0] = (dp[0] * 2) % ((10 ** 9) + 7)\n            for j in range(1, k + 1):\n                temp[j] = (2 * dp[j]) % ((10 ** 9) + 7)\n                if j - nums[i] >= 0:temp[j] = (temp[j] + dp[j - nums[i]]) % ((10 ** 9) + 7)\n            dp = temp.copy()\n        return dp[-1]\n\n        \n```
['Array', 'Dynamic Programming', 'Python3']