CT24586

Polished barrels Peak

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the lakeside town of Mirrormere. Ivan spreads the barrels records across the table and picks up a sharp pencil. 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 <= 278; -100 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 222 -2 -51 -26 -15 -19 -40 -32 -91 -68 -45 -19 -32 -69 -59 -32 -77 -52 -88 -84 -74 -97 -40 -5 -99 -44 -34 -40 -10 0 -94 -43 -87 -4 -76 9 -22 -100 -81 -60 -29 -80 -74 -83 -93 -65 -26 -16 9 -32 -49 -8 -81 -53 -30 -63 -65 -48 -17 -34 -28 -10 -72 -1 -53 -65 -70 -84 -28 -4 -48 -43 6 -74 -9 -36 1 -59 -62 -67 -81 -17 -52 -29 -100 -49 -58 -20 -21 -39 4 -38 -88 -46 -74 -94 -49 -58 -94 -95 -52 -62 -69 -75 -34 -7 -74 -91 -60 7 -92 -6 -99 -59 -17 -33 -98 -9 -26 9 -65 -23 -49 -96 -25 -83 4 7 -46 -36 -55 -65 -4 -42 -32 -9 -22 -14 -31 -69 1 -64 -39 -46 -22 -85 -23 10 -76 -84 -31 3 -50 -93 -39 -94 -22 -65 -36 -55 -68 -7 -33 -91 -7 -52 -97 -50 -28 -47 -77 -99 -45 -43 -35 -55 -8 -12 -10 -39 -36 -86 -80 -78 -12 -17 -71 -96 -75 -78 -80 -36 -91 9 -47 -29 -51 -16 -25 -67 -70 -56 -84 -85 -44 -56 -42 -11 -93 9 -9…
Output: 10

Example 2:

Input: 247 -33 4 -27 -2 -61 -23 -62 -44 -37 -53 -48 -91 -8 -57 -14 -38 -66 5 -37 -99 -12 -49 -68 -45 -63 -58 -4 -93 -86 -76 -2 -63 -66 -56 -22 -8 -4 -94 -5 -31 -49 -75 -94 -65 -18 -97 -87 -54 5 -43 -1 -25 -90 -3 -90 -26 -10 -83 1 10 -6 -45 -73 -24 -88 -59 -47 -48 -55 -46 -57 -57 -97 -100 -90 -6 -69 -78 -80 -37 9 -45 -29 -14 -46 -3 -78 -38 -50 -78 -14 -13 -75 -47 -97 -38 -91 -34 -47 -24 -63 -11 -70 3 -75 -72 -52 -34 -78 -40 -100 -72 -9 -33 -26 -8 -45 -21 -20 -36 -25 7 2 -84 -82 -27 1 -27 -41 -38 -33 -16 2 -75 -82 -7 -83 -80 6 -37 -22 -90 -64 -17 -54 -33 -26 -81 -50 -26 8 -1 0 -22 -6 1 -56 -49 -75 -42 -97 -86 -67 -78 -39 -84 -61 -16 -74 -84 -89 10 -76 -93 -66 -10 -4 -97 -74 -65 -63 -27 -45 7 1 -40 -43 -98 -25 -10 -59 -86 -12 -100 -65 -90 -78 -4 -77 -49 -31 -53 8 -93 -93 -70 -82 -70 -64 9 3 -100 -61…
Output: 10

Example 3:

Input: 56 -77 -40 -33 -45 -19 -58 -25 -30 -85 -4 -100 1 -95 0 -70 -53 -77 -1 -75 -80 -6 -36 -93 -24 -96 -79 -100 -24 -88 -52 -46 -97 -69 -70 -18 -37 -90 -41 -24 -99 -14 -28 10 4 -11 -24 -57 -25 -28 -21 -79 -31 -92 -92 -32 -91
Output: 10

Constraints:

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

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