Altium Limited Interview Question

On-site programming task, with a math question and follow-up discussion.