n=int(input()) num=0 sum=0 for i in range(n): dic=eval(input()) for j in dic: temp=dic[j] for key in temp: num+=1 sum+=temp[key] print("{:d} {:d} {:d}".format(n,num,sum))
标签:总结,temp,sum,dic,num,key,input,今日 From: https://www.cnblogs.com/zhaoyueheng/p/17208923.html