标签:visible span false pen turn int tco return ret
class Solution: def prefixesDivBy5(self, A: List[int]) -> List[bool]: ans,t = [],0 for a in A: t = (t * 2 + a)%5 ans.append(False if t else True) return ans
Leetcode 1018. Binary Prefix Divisible By 5
标签:visible span false pen turn int tco return ret
原文地址:https://www.cnblogs.com/zywscq/p/10739388.html