1
# Runtime: 76 ms (Top 5.14%) | Memory: 13.9 MB (Top 11.51%)
2
class Solution:
3
def checkRecord(self, s: str) -> bool:
4
eligible = True
5

6
for i in range(0, len(s) - 2):
7
if s[i : i + 3] == "LLL":
8
eligible = False
9
absent = 0
10
for i in range(len(s)):
11
if s[i] == "A":
12
absent += 1
13

14
if absent >= 2:
15
eligible = False
16

17
return eligible

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0