Simon has been hiding so-called “easter eggs” on his Discord server, i.e. hidden surprises that can be anything ranging from a character code to a math puzzle, for his friends to find. Most easter eggs were localized back in February, but the turquoise one – a math puzzle that he only hid later – turned out to be a tough one. Simon actually couldn’t find it himself! Today, Neva suggested they write a code to solve the puzzle and thus track down the mystery egg together.
To win the egg, one had to solve the following math problem, Neva explains:
24 is a very special number. It’s divisible by its smallest digit and divisible by its largest digit, and divisible by the sum of the digits, and by the product of the digits, and by the average of the digits and by the range between the digits. Can you find another number which has all of these properties?
Neva and Simon sat down and wrote this code (Neva writing the if statement and Simon the variables):

They found 19 numbers that match the description:

And now Neva’s got the super rare turquoise easter egg!! 🥚
