Pocket Gems interview question

mathematical questions