CT1618

Marble crates Peak

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The registry keeper Kian has been asked to chart the migration season. On the desk lies a long table of crates readings. 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 <= 73; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 72 -945684 -731498 -441340 -570094 -201499 -538163 -966944 -985525 -395191 -24472 -736047 -503759 -18619 -559232 -390491 -16804 -233466 -413379 -264287 -40668 -461404 -898977 -507682 -389236 -763349 -283698 -54284 -685789 -675256 -121218 -463050 -287913 -184008 -652672 -994569 -720017 -848733 -14943 -491823 -874951 -141439 -187573 -223552 -123657 -63976 -273881 -581843 -933332 -127035 -528042 -733132 -947084 -713663 -124306 -21656 -336878 -58994 -270351 -928869 -781068 -451334 -692555 -443464 -330666 -634872 -759701 -413598 -946808 -813828 -556111 -518669 -749962
Output: -14943

Example 2:

Input: 40 -845749 -910280 -177861 -973421 -966594 -922143 -31422 -434777 -432346 -118925 -959318 -825728 -909663 -248840 -37048 -601705 -8248 -225318 -789512 -129791 -18949 -875791 -253743 -388278 -259880 -496669 -462017 -955392 -331236 -320305 -465989 -791879 -966450 -385403 -914685 -245383 -781201 -387962 -23255 -214015
Output: -8248

Example 3:

Input: 62 -737824 -324669 -696620 -776844 -566136 -532823 -786246 -97995 -426816 -361181 -771033 -443485 -33164 -935419 -329229 -120192 -956273 -943481 -839136 -493991 -119930 -962397 -355807 -686364 -654083 -215983 -570529 -528796 -820892 -498433 -691566 -612519 -749278 -689901 -978610 -772708 -671862 -249374 -819858 -125546 -241252 -740362 -646144 -62397 -646073 -245931 -403596 -814256 -845082 -991726 -232601 -324299 -310004 -749673 -148328 -589312 -839945 -946758 -218992 -389106 -195835 -331996
Output: -33164

Constraints:

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

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