Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设你有一个集合 E = {a,b},并且你有一个超集 E*,它由 E 中的 a 和 b 的所有可能组合组成。你如何构造一个字符串的表达式,它的 a 数可以被 3 整除?
尝试
/^(b*ab*ab*ab*)+$/
例子:
abbb => N bbb => N aaab => Y ababbbba => Y aaabba => N bbbaaaabbbabbbba => Y => N