CT23015

The Peak of Thornveld

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the acacia flats of Thornveld, Silas studies rows of barrels entries. One clean number will settle the guild's oldest argument. 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 <= 968; -100 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 102 -1 -18 -84 -17 -48 6 -51 -46 9 -11 -93 -20 -9 8 3 -3 -2 -1 -96 -48 -63 -47 -52 -4 -95 8 -83 10 -79 -60 -71 -55 -9 -47 -40 -73 -70 -63 -87 -11 -41 -75 -78 1 -23 -79 -53 5 -72 -73 -27 -5 -28 -13 -16 -42 -87 -97 -63 -24 -78 -10 -75 9 -21 -42 -9 -85 -32 9 -71 -1 -89 -82 -63 -31 -28 -2 -25 -43 -53 -65 -74 -54 -53 5 -12 9 -22 -28 5 -77 -44 -37 -20 -75 -74 -32 -55 -45 -81 -37
Output: 10

Example 2:

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

Example 3:

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

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
The Peak of Thornveld - EASY Coding Problem | CodeTikki