第一题100: from collections import defaultdict if __name__ == '__main__&(688)#39;: dd = defaultdict(int) s = input() for c in s: dd[c] += 1 mod = 20210101 result = 1 for k, v in dd.items(): result *= (v + 1) result %= mod print(result) 第二题100: if __name__ == '__main__&(688)#39;: n = int(input()) j = set() w = set() for _ in range(n): t, x = list(map(int, input().split())) if t == 0: w.add(x) else: j.add(x) if len(j) > 0: print(2 * len(j) * (len(w) + 1)) else: print(1 * (len(w) + 1))