WEEB DOES PYTHON/C++
Python 3\n\n\tclass Solution:\n    def minSubarray(self, nums: List[int], p: int) -> int:\n        dp = defaultdict(int)\n        dp[0] = -1\n        target = s
**Python 3**\n\n\tclass Solution:\n    def minSubarray(self, nums: List[int], p: int) -> int:\n        dp = defaultdict(int)\n        dp[0] = -1\n        target = sum(nums) % p\n        curSum = 0\n        result = len(nums)\n        \n        if sum(nums) % p == 0: return 0\n        \n        for i in range(len(nums)):\n            curSum += nums[i]\n            \n            curMod = curSum % p\n            \n            temp = (curSum - target) % p\n            \n            if temp in dp:\n                if i - dp[temp] < result:\n                    result = i - dp[temp]\n            \n            dp[curMod] = i\n        \n        return result if result < len(nums) else -1\n\n**C++**\n\t\n\tclass Solution {\n\tpublic:\n\t\tint minSubarray(vector<int>& nums, int p) {\n\t\t\tunordered_map<int, int> dp;\n\t\t\tdp[0] = -1;\n\t\t\tint result = nums.size();\n\t\t\tlong long int curSum = 0;\n\t\t\tint target = 0;\n\t\t\tfor(auto el: nums) target = (target + el) % p;\n\n\t\t\tif(target == 0) return 0;\n\n\t\t\tfor (int i = 0; i < nums.size(); i++){\n\t\t\t\tcurSum += nums[i];\n\n\t\t\t\tint curMod = curSum % p;\n\n\t\t\t\tint temp = (curSum - target) % p;\n\n\t\t\t\tif (dp.find(temp) != dp.end()){\n\t\t\t\t\tif (i - dp[temp] < result){\n\t\t\t\t\t\tresult = i - dp[temp];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tdp[curMod] = i;\n\t\t\t}\n\n\t\t\tif (result == nums.size()) return -1;\n\n\t\t\treturn result; \n\t\t}\n\t};\n\nTake a break, watch some anime instead\nCheck out **\u3046\u3061\u306E\u5A18\u306E\u70BA\u306A\u3089\u3070\u3001\u4FFA\u306F\u3082\u3057\u304B\u3057\u305F\u3089\u9B54\u738B\u3082\u5012\u305B\u308B\u304B\u3082\u3057\u308C\u306A\u3044 (If It\'s for My Daughter, I\'d Even Defeat a Demon Lord)**\n\n**Episodes: 12\nGenres: Fantasy, Slice of Life**\n\nIts a really wholesome anime, go watch it \n
['C', 'Prefix Sum', 'Python', 'C++', 'Python3']