Java Solution
\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] A) {\n        int n = 0;\n        List<Boolean> ans = new ArrayList<>();\n        \n        fo
```\nclass Solution {\n    public List<Boolean> prefixesDivBy5(int[] A) {\n        int n = 0;\n        List<Boolean> ans = new ArrayList<>();\n        \n        for(int num : A){\n            n += num;\n            ans.add(n%5 == 0);\n            n = n*2;\n            n = n%5;\n        }\n        \n        return ans;\n        \n    }\n}\n```
[]