java-solution
\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] A) {\n        int temp = 0;\n        List<Boolean> result = new ArrayList<Boolean>(A.length);\
```\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] A) {\n        int temp = 0;\n        List<Boolean> result = new ArrayList<Boolean>(A.length);\n        for (int i = 0; i < A.length; i++) {\n            temp = (temp * 2 + A[i]) % 5;\n            if (temp == 0)\n                result.add(i, Boolean.TRUE);\n            else result.add(i, Boolean.FALSE);\n        }\n        return result;\n    }\n}\n```
['Java']