CT28505

Last barrels of Brewer

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Brewer the auditor watches over the lakeside town of Mirrormere's stores of barrels. 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 <= 860; 0 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 686 5 3 0 10 4 10 3 10 7 8 6 9 9 10 5 0 1 3 7 8 8 2 10 8 7 3 4 9 1 8 4 2 9 7 2 2 7 2 4 0 2 3 1 10 10 5 5 7 3 0 6 3 2 5 7 2 4 0 7 3 6 2 0 9 10 7 4 9 8 6 8 7 3 3 10 2 8 4 5 8 1 0 2 8 0 3 9 10 8 3 6 6 7 9 10 2 1 9 6 0 0 0 1 10 8 5 1 4 3 7 0 2 9 3 10 10 10 1 1 4 2 10 0 1 3 6 0 10 4 7 8 10 9 7 8 9 3 3 3 6 3 5 3 7 1 10 1 1 4 10 2 0 9 6 9 3 9 3 9 4 9 5 1 5 0 7 0 4 8 9 4 9 0 8 6 3 8 5 8 8 4 2 5 7 3 5 6 5 3 5 9 5 4 7 1 9 1 6 5 0 3 7 9 8 7 10 4 9 3 9 10 10 4 5 4 8 5 0 10 6 3 3 3 4 9 0 2 7 2 5 9 9 2 2 9 1 3 3 0 0 4 2 10 7 2 2 2 9 7 3 3 5 6 5 3 5 0 5 0 7 1 10 10 3 7 1 6 10 3 9 8 2 6 5 7 10 1 7 0 10 3 4 2 7 5 5 3 6 7 0 5 0 1 5 6 7 0 2 9 5 10 9 10 8 9 10 3 3 4 9 10 1 4 6 6 8 8 7 0 2 3 8 6 6 1 10 3 8 10 7 9 7 1 7 7 3 1 5 3 8 5 3 1 6 0 6 6 9 4 1 3 4 0 5 10 3 8 2 5 2 1 6 10 7 6 10 9 4 1 1 8 5 1 1 6 4 8 7 4…
Output: 10

Example 2:

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

Example 3:

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

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Last barrels of Brewer - EASY Coding Problem | CodeTikki