Zuora Interview Question

How would you test this particular algorithm?