Domanda di colloquio di Siemens

one coding question some puzzles related to mathematics