Simple C++ Solution
\nclass Solution {\npublic:\n    vector<bool> prefixesDivBy5(vector<int>& nums) {\n        vector<bool>ans;\n        int dec=0;\n        for(int i=0;i<nums.size
```\nclass Solution {\npublic:\n    vector<bool> prefixesDivBy5(vector<int>& nums) {\n        vector<bool>ans;\n        int dec=0;\n        for(int i=0;i<nums.size();i++){\n            dec = dec * 2 + nums[i];\n            if(dec%5==0){\n                ans.push_back(true);\n            }\n            else{\n                ans.push_back(false);\n            }\n            dec= dec%5;\n        }\n        return ans;\n    }\n};\n```
['C', 'C++']