# Author:vayen
# 2024.4.28
from collections import Counter
import random
def Gen_mult_set(n,m,w): # n为集合长度,m为元素最大值,w为每个元素出现的最大次数
a = []
for i in range(0,n):
s = random.randint(1,m)
key = Counter(a)
while (key[s] >= w):
s = random.randint(1,m)
a.append(s)
return a
set_a = Gen_mult_set(30, 10, 4)
print(set_a)