problem 9

the better solution to this has crazy math involved!!! dang