题解 | #字符串字符匹配#
字符串字符匹配
https://www.nowcoder.com/practice/22fdeb9610ef426f9505e3ab60164c93
while True: try: s1 = input() s2 = input() s = "abcdefghijklmnopqrstuvwxyz" sig = 'true' for s_i in s: if s_i in s1 and s_i not in s2: sig = 'false' break print(sig) except: break
时间复杂度:O(1)
空间复杂度:O(n)