Python O(n) use <<= to solve
\ndef prefixesDivBy5(self, A: List[int]) -> List[bool]:\n       \n        cum = 0\n        ans = []\n        \n        for i in range(len(A)):\n            cum 
```\ndef prefixesDivBy5(self, A: List[int]) -> List[bool]:\n       \n        cum = 0\n        ans = []\n        \n        for i in range(len(A)):\n            cum <<= 1    # based on binary\n            cum += (A[i])\n            if cum % 5 == 0:\n                ans.append(True)\n            else:\n                ans.append(False)\n        return ans\n```
['Python3']