CT23547

Sahil's barrels Peak

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Sahil runs the timber yard at the old quarter of Brasshaven. Today the books show a list of barrels, and the numbers must be worked out before sundown. 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 <= 714; -100 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 28 -8 3 -34 -44 -4 6 -76 -5 -12 -69 -44 -6 -67 -33 -27 -96 -12 -27 -98 -68 -62 -43 9 -91 0 -79 -98 -27
Output: 9

Example 2:

Input: 412 -11 -64 -78 -29 -41 -18 8 -71 -18 -86 -31 -39 -28 -91 -47 -38 -24 3 4 -47 -66 -19 -81 -73 -65 -66 -1 -83 -64 -57 -54 -15 -39 -77 -38 -82 -48 -31 -17 -34 -23 -13 -1 -13 -31 -35 -9 3 -65 -22 -42 -99 -63 -83 -8 3 1 -20 -98 -48 3 9 -22 3 -70 -41 -11 -10 -12 -52 5 -16 -31 -12 -31 -30 -1 -67 -96 -66 -7 7 -54 -79 -20 -37 -24 -32 1 -97 9 -60 -43 -75 1 -65 -39 -47 -64 -32 -55 -97 -77 -14 -23 -96 -49 -77 -41 -23 -4 -82 7 -22 -14 -75 -52 -97 5 -41 3 -2 1 -22 -8 -54 -3 -17 -11 -68 -72 -96 -32 -49 -61 -63 -91 -85 -55 -83 -17 -44 -13 -48 -89 -18 -88 -22 -38 -6 -37 -21 3 -95 5 -94 -12 0 8 8 -50 -3 -55 -13 -18 -88 -10 -61 -69 -94 -85 -12 -66 -2 -40 -16 -3 -37 -97 -62 -45 -48 -25 -52 -40 -93 1 -50 -42 -25 -15 9 -3 -80 -47 -83 -2 -83 -26 -29 -77 0 -92 -94 -5 -65 -51 -56 -48 10 -100 -5 -79 -93 -34 -42 -43 -59 -88 -79 -81 -75 -77 -40 -75 -100 -21 -43 -52 -100 -45 -91 -75 -95 -95 2 -19 -46 -51 -95 5 10 9 -79 -19 -19 -79 -100 -95 -92 -93 -83 -94 7 4 -4 -16 -60 -5 -86 -50 -11 -40 -15 -15 -47 -31 -6 -68 -55 -75 -55 -30 -98 -65 -38 -2 -60 -38 -46 -90 -51 -71 -59 -1 -34 -45 2 -36 -4 -67 -45 -43 -16 -40 -88 -1 -56 -2 -27 -7 -99 -14 -55 -92 -89 -77 -58 -97 -40 -48 -56 -17 -43 -40 -25 -43 -13 -69 -12 -59 -19 -82 -10 -26 -94 2 -17 -100 -83 -94 -95 -56 -17 -73 -93 -61 2 -18 -5 -31 -43 -42 -14 -35 -98 -3 -28 -81 -82 -51 0 -81 -16 -23 -83 -30 -52 -55 -91 -39 -10 -61 -45 -52 -17 -72 -6 -21 -59 -54 -78 -41 -90 -4 -25 -61 -6 10 -34 -86 6 7 5 -92 -41 -89 -64 -48 -40 -46 -43 -93 -47 -11 -35 -11 -44 -51 -93 -12 -64 -15 -74 -13 -55 -74 -56 -83 -24 -21 -62
Output: 10

Example 3:

Input: 227 -10 -5 -49 -21 -38 -15 -79 -59 -64 -34 -2 -67 -82 -86 -62 -48 -69 -38 6 -49 -51 -39 -69 -89 6 -71 -91 7 -6 -41 -67 -79 -54 0 -87 -78 -33 -64 -50 -48 -12 -17 5 4 -30 -85 7 -84 -39 -33 -98 -93 -84 -74 -54 1 -55 -80 -45 4 -84 -70 -91 9 -85 -60 -66 -54 -94 -35 -94 -13 -58 -91 -95 -17 -2 -49 -92 -80 -21 -49 -53 -33 -58 -53 -1 -14 -36 -93 -13 -83 -80 -79 -80 -43 -1 -20 -54 -7 -1 -1 -73 -7 -10 -53 -74 3 -74 10 -9 -42 -16 -46 -68 -2 -48 -12 -79 -55 -85 -99 9 -11 1 -59 6 -66 -31 -46 0 -54 -20 -97 -19 -72 -97 -70 -1 -67 -51 -34 -48 -12 -60 -10 -42 -77 -32 -32 -45 -67 -56 -12 -62 -16 -30 -14 -69 -94 -24 -88 -32 -91 -74 5 -2 -31 -29 -10 -34 -15 -94 -68 -27 -23 -27 -13 -96 -70 -40 -59 -4 -29 7 -55 -90 -72 -95 -58 -40 -4 -93 -25 8 -82 -16 -65 -74 -50 -42 -86 -51 -47 -55 -87 -13 -70 -95 -16 -32 -88 -37 -44 -45 -42 -7 -55 -9 -34 -14 -9 -83 -64 -31 -53 -71
Output: 10

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Sahil's barrels Peak - EASY Coding Problem | CodeTikki