C++  and Python simple solution
C++ :\n\n\nclass Solution {\npublic:\n    vector<bool> prefixesDivBy5(vector<int>& nums) {\n        \n        vector<bool> res;\n        int num;\n        \n   
**C++ :**\n\n```\nclass Solution {\npublic:\n    vector<bool> prefixesDivBy5(vector<int>& nums) {\n        \n        vector<bool> res;\n        int num;\n        \n        for(int i = 0; i < nums.size(); ++i)\n        {\n            num = (num * 2 + nums[i]) % 5;\n            res.push_back(num == 0);\n        }\n        \n        return res;\n    }\n};\n```\n\n**Python :**\n\n```\nclass Solution:\n    def prefixesDivBy5(self, nums: List[int]) -> List[bool]:\n        res = []\n        num = 0\n        \n        for n in nums:\n            num = (num * 2 + n) % 5\n            res.append(num == 0)\n            \n        return res\n```\n\n**Like it? please upvote**
['C', 'Python', 'C++', 'Python3']