Python (Simple DP)
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)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution:\n    def sumOfPower(self, nums, k):\n        n, mod = len(nums), 10**9+7  \n\n        @lru_cache(None)\n        def dfs(i,length,total):\n            if total == k:\n                return pow(2,n-length,mod)\n\n            if i >= n or total > k:\n                return 0 \n\n            return (dfs(i+1,length+1,total+nums[i])%mod + dfs(i+1,length,total)%mod)%mod\n\n        return dfs(0,0,0)%mod\n```
['Python3']