Ramsey Solutions interview question

fairly straight forward.