lundi 15 février 2021

generate random integers without replacement to obtain a fixed sum using n unique integers (Python)

As stated in the title, how do I generate random integers without replacement (each integer needs to be unique) to obtain a sum 1400 using 20 unique integers? but one constraint applied at the same time?
constraint: the range of each unique integer should be 1<= integer <=100




Aucun commentaire:

Enregistrer un commentaire