Rewrite exercise to mix number types and simplify