This is also a nice approach for FizzBuzz in leetcode interviews.
Moreover, interviewers will be smitten by the hand-optimized assembly code.