2
devlajf
8y

Had a list of integers: 0,2,1,0,1,2,2,0. Needed to add a variable number of integers and stay as close as possible the current average.
Used their percentage to solve this. Didnt work. After a few hours I realised it is just to pick a random in the list as many times that I need to add integers.

Say I have 32 integers and need 36, just pick 4 by random, problem solved. Fuck I will never get those hours back... :(

Comments
Add Comment