Solution for arithmetic suite challenge