Skip to content
bradendubois edited this page Sep 9, 2021 · 7 revisions

Pet

ID: pet

Difficulty: 1.4

CPU Time: 1 second

Memory: 1024 MB

Solution

Pretty straightforward approach, just read the lines from i = 1-5, and total that line, and if the total is the best seen so far, update the best seen to this total, and the contestant for this row to i, and at the end, output i and the best seen value.

Clone this wiki locally