Enigmath Machine (enigmath)

23 teams scored 1400 points on this task, for a maximum score of 100, an average score of 61 and a median score of 60.

Highlights

  1. Galileo Galilei, Trento is the institute with the most points (210).
  2. Friuli-Venezia Giulia is the region with the most points (360).

Statement

Giorgio has to send a new task proposal to William for the next round of the OIS. Since he needs to be extra careful to avoid information leaks, he decided to use cryptography to protect the transfer of information. Inspired by the Enigma machine, popular during World War II, he decided to build his own version: the Enigmath machine! To start, he has already decided the encoding algorithm. Starting with a number N (e.g., N=29), he computes the sum s(N) of the digits of N (e.g., s(29) = 2+9 = 11), and then the sum s(s(N)) of the digits of the sum of the digits of N (s(s(29)) = s(11) = 1+1 = 2), and so on until he obtains a single digit. The encoded number E is then the sum of all the numbers generated this way: E = N + s(N) + s(s(N)) + … For example, if N=29, then E = 29 + 11 + 2 = 42. Of course, for the encoding to be useful, it is necessary to design a corresponding decoding algorithm...