Solved P11 to P18 some with scala built in functions