⁕7-3 sdut-图的字典表示

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("----------")
print(n,num,sum)
posted @ 2022-05-30 10:14  kingwzun  阅读(91)  评论(0编辑  收藏  举报