Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Get for each press its key and amount of time taken.
Iterate on the presses, maintaining the answer so far.
The current press will change the answer if and only if its amount of time taken is longer than that of the previous answer, or they are equal but the key is larger than that of the previous answer.