i want an algorithm that will help me generate random multiples for given result , for example :
let say i have result = 20500
i also have X = 500, Y= 1250, and Z = 8754
the equation is : (X * R1 ) + (Y * R2 ) + ( Z * R3 ) = 20500
i need a math equation or algorithm to get r1, r2 and r3, also i need to make sure these random are below certain number.