解题思路
这题还是相对比较简单,可以先开一个长度为L的数组Count,然后在每次输入一行的时候,出现了哪些数字,就对相应位置下的数组Count自增1;最后数组Count就是我们想要的最终结果 : )
满分题解
n,m,L = map(int, input().split())
count = [0]*L
for i in range(n):
A = list(map(int, input().split()))
for j in range(m):
count[A[j]] += 1
for i in range(L):
print(count[i],end=' ')