DISCLAIMER: This problem statement contains NO spoilers to the film Avengers: Endgame and is in no way, shape, or form affiliated to Marvel Entertainment. Uses of characters, settings, and scenes are parodical only.
After missing Thanos' head, Thor has been trying to find Thanos. Wallowing in his sadness, Thor has found distinctive purple papayas on each planet (Thanos seems to have a knack for agriculture).
He decides to consult Iron Man, and together, they convince residents of planets to conduct a thorough census of the number of Purple Papayas on these planets.
Once he had received the numbers, Iron Man has discovered something interesting about the results.
You, as the head programmer of the Avengers, are tasked with decoding the information to find out where Thanos is.
The process is as follows, in Iron Man's words: "To crack the code, you must multiply the number of Purple Papayas on each planet with the one following it. Then, you must find the remainder of when you divide the number by 26 and match it to a letter. For example, 0 is A, 1 is B… 25 is Z."
It is your task to find out where Thanos is so that Thor can defeat him!
Line 1: 1 integer
Next lines: A sequence of integers in the sequence , representing the number of Purple Papayas per planet.
A string starting with
Thanos is on Planet: and then the planet Thanos is on.
5 55 23 498 12 45
Thanos is on Planet: ROWU
is , meaning that there are survey results.
The first numbers, and , are multiplied together to give . The remainder of dividing by is . corresponds to
The same is done with the next two numbers, and . . The remainder of dividing by is and corresponds to
The next two numbers are and . . The remainder of dividing by is and corresponds to
The next two numbers are and . . The remainder of diving by is and corresponds to