第二题求教大佬为啥0%问题在哪?谢谢 import functools s1 = input() n = int(input()) word_list = [] for i in range(n): word_list.append(input()) @functools.lru_cache(None) def dfs(s): # s 剩余字符串 res = 0 if s == "": return 1 else: for i in word_list: if s.startswith(i): res += dfs(s[len(i):]) return res % 835672545 print(dfs(s1))