Solution in Python 3 (beats ~98%) (three lines) ( O(1) space )
```\nclass Solution:\n    def prefixesDivBy5(self, A: List[int]) -> List[bool]:\n    \tn = 0\n    \tfor i in range(len(A)): A[i], n = (2n + A[i]) % 5 == 0, (2n 
```\nclass Solution:\n    def prefixesDivBy5(self, A: List[int]) -> List[bool]:\n    \tn = 0\n    \tfor i in range(len(A)): A[i], n = (2*n + A[i]) % 5 == 0, (2*n + A[i]) % 5\n    \treturn A\n\t\t\n\t\t\n- Junaid Mansuri\n(LeetCode ID)@hotmail.com
['Python', 'Python3']