Apple Interview Question

Team related coding question with maths formula.