N =int(input())
M =int(input())
arr =sorted(list(map(int,input().split(' '))))
res =0
tmp =0for each in arr:
res +=1if each + tmp > N:
tmp -= N - each
else:
tmp =0
res +=(tmp +1)// N
print(res)
https://blog.csdn.net/weixin_47243236/article/details/122775971#comments_21461297Python解法N = int(input())M = int(input())arr = sorted(list(map(int, input().split(' '))))res = 0tmp = 0for each in arr: res += 1 if each + tmp > N: t