摘要:
n=int(input()) num=0 sum=0 for i in range(n): dic=eval(input()) for j in dic: temp=dic[j] num+=len(temp) for key in temp: sum+=temp[key] # print(" ") 阅读全文
摘要:
法1: a = input() b = input() sum = 0 for i in set(a): if i in set(b): sum += 1 print(sum) 法2:使用dict 正确代码; a=input() b=input() mp1={} mp2={} for i in a: 阅读全文
摘要:
这里的“X”是大写 mp = {} for i in range(3, 11): mp[i] = chr(48 + 12 - i) mp[0] = "1" mp[1] = "0" mp[2] = "X" judge = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10 阅读全文