javascript
\nvar prefixesDivBy5 = function(A) {\n    // i => current binary number;\n    let cur = 0;\n    let res = [];\n    for(let i = 0 ; i < A.length; i++) {\n       
```\nvar prefixesDivBy5 = function(A) {\n    // i => current binary number;\n    let cur = 0;\n    let res = [];\n    for(let i = 0 ; i < A.length; i++) {\n        cur = cur << 1;\n        cur = cur % 5;\n        cur += A[i];\n        res.push(cur % 5 === 0);\n    }\n    return res;\n};\n```
[]