解题思路
“A”的数量小于2,"LLL"在s中不存在即可
代码
class Solution:
def checkRecord(self, s: str) -> bool:
return s.count("A") < 2 and "LLL" not in s
微信扫一扫
“A”的数量小于2,"LLL"在s中不存在即可
class Solution:
def checkRecord(self, s: str) -> bool:
return s.count("A") < 2 and "LLL" not in s
相关推荐