optimal answers for https://www.codingame.com/ide/puzzle/the-descent-codesize
- User
optimal answers for https://www.codingame.com/ide/puzzle/the-descent-codesize
- Assistant
"The Descent" is a coding challenge on CodinGame where the objective is to shoot down the highest mountain in a sequence of eight mountains to prevent a spaceship from crashing. The "Code Golf" version of this challenge emphasizes writing the solution in the shortest possible code.
An optimal solution involves reading the heights of the eight mountains, identifying the index of the tallest one, and outputting that index. Here's a concise Python solution:
while 1: print(max(range(8), key=lambda i: int(input())))
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.