Matic interview question

Math puzzles, basic firmware questions