CT23072

The Peak Beneath Scarlet Plain

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Before the gates of the poppy fields of Scarlet Plain close for winter, Farhan must finish the tickets ledger - one figure at a time. 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 <= 704; -1000000 <= a[i] <= 10; answers fit a signed 64-bit integer.

Example 1:

Input: 151 -716133 -453023 -248315 -163426 -48774 -744658 -675170 -530014 -940938 -909450 -578141 -625693 -736124 -550823 -863133 -710068 -969863 -574329 -947374 -757495 -836324 -515864 -18730 -218017 -717285 -610521 -218862 -303100 -981453 -377544 -782061 -291313 -33729 -458144 -849226 -46031 -591537 -660699 -744499 -8924 -413647 -411091 -196141 -772437 -270904 -234418 -653271 -37972 -516675 -550300 -91779 -337243 -925358 -934870 -268419 -224373 -166080 -183135 -942699 -73110 -30598 -103791 -153201 -421892 -942425 -344408 -113777 -320144 -385496 -536355 -400226 -812355 -614412 -245016 -117404 -60739 -304310 -961731 -171588 -500536 -232498 -190357 -458813 -430116 -922842 -676784 -849751 -91713 -963775 -501195 -505553 -414465 -720004 -507880 -549450 -309607 -345909 -344269 -991901 -160015 -926546 …
Output: -8924

Example 2:

Input: 533 -492120 -276734 -696082 -381379 -640184 -50370 -227942 -887745 -657569 -807363 -410669 -52587 -438451 -12611 -719441 -207155 -605185 -553774 -376560 -487514 -755817 -259662 -41700 -461013 -661712 -988145 -86178 -615535 -236560 -167448 -916159 -894496 -777197 -194848 -913027 -141847 -773804 -877004 -298600 -865240 -380725 -291977 -908571 -93088 -852231 -777295 -847313 -326933 -666165 -348355 -999723 -954869 -412893 -547290 -962683 -614904 -206972 -166684 -340542 -97935 -443870 -832855 -619277 -396461 -855430 -744610 -592945 -324495 -484285 -936929 -901170 -38489 -275291 -790975 -812611 -315070 -328305 -440450 -941115 -456706 -16509 -940753 -386221 -878870 -600671 -452623 -76722 -300236 -471669 -483777 -202417 -545682 -55535 -912789 -767728 -778781 -65119 -481811 -24459 -63427 -23624 -40…
Output: -161

Example 3:

Input: 434 -480841 -685663 -643645 -358773 -584289 -668268 -897773 -942499 -23246 -995240 -666014 -535203 -860858 -410989 -939382 -387085 -575957 -328387 -114251 -315257 -238939 -61792 -156308 -2832 -538736 -775585 -595632 -648267 -908378 -861808 -30346 -100385 -446873 -360738 -986076 -869327 -482273 -258025 -751679 -672683 -359414 -145274 -936775 -786824 -78181 -385602 -19162 -401708 -914351 -633012 -950919 -82111 -947004 -812751 -677142 -150605 -496129 -379766 -583439 -535874 -461134 -700117 -814961 -947006 -873479 -710653 -638738 -964468 -41265 -100708 -827586 -130478 -357657 -460119 -840085 -351152 -805583 -612954 -840183 -643726 -818774 -735845 -382776 -489893 -928928 -669253 -339474 -247213 -212758 -791626 -855169 -42204 -991932 -575218 -799871 -415551 -182126 -95879 -767546 -604319 -668717…
Output: -2832

Constraints:

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

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