solved problem 15 using Pascal's triangle