C++ 12ms 100% Fast
\nvector<bool> prefixesDivBy5(vector<int>& A) \n    {\n        int size = A.size();\n        vector<bool> B(size);\n        for (auto i = 1; i < size; i++)\n   
```\nvector<bool> prefixesDivBy5(vector<int>& A) \n    {\n        int size = A.size();\n        vector<bool> B(size);\n        for (auto i = 1; i < size; i++)\n        {\n            A[i] = (A[i] + A[i-1] * 2) % 10;\n            if (A[i] % 5)\n                B[i] = 0;\n            else\n                B[i] = 1;\n        }\n        if (A[0] == 0)\n            B[0] = 1;\n        return B;\n    }\n```
[]