CT359

The Peak of the Roving tickets

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Dino the tallyman watches over the alabaster quarry of Whitestone's stores of tickets. A careful computation stands between order and chaos. Task: Read n integers and print the largest value. Input format: First line: n. Second line: n space-separated integers. Output format: Print the maximum value. Constraints: 1 <= n <= 30; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 25 5 5 0 0 10 8 2 10 5 7 5 5 5 9 0 1 9 2 3 0 1 7 3 6 2
Output: 10

Example 2:

Input: 3 7 7 4
Output: 7

Example 3:

Input: 18 1 4 8 7 7 1 3 5 10 2 5 10 2 5 1 1 1 3
Output: 10

Constraints:

1 <= n <= 30; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.