CT940

Alaric's Peak Ledger

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Alaric inherited the timber yard at the terraced vines of Grapehollow along with its curious bookkeeping system for parcels. Time to make sense of it. 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 <= 93; 0 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 65 561873 823347 269926 455129 2843 353513 205577 489529 845361 675582 65731 713904 462062 808358 321465 902881 891686 561012 823120 6343 600387 574399 805019 169239 84554 723266 546491 514951 815591 63444 462061 541488 976288 362689 848847 597152 904579 507483 556078 739513 96036 934630 778248 756384 341792 621155 134588 134609 638980 497336 150330 26401 989713 944685 148593 924243 343775 642376 218436 808443 133025 262077 776127 975539 75181
Output: 989713

Example 2:

Input: 33 993445 313323 10730 629205 136896 834130 530749 47650 835160 305733 705430 257036 409958 664994 907409 120101 566292 493537 941688 203585 938485 982730 122139 128243 77900 376293 815890 384441 979130 600058 793615 631074 211288
Output: 993445

Example 3:

Input: 42 690398 915495 292332 794226 263214 800677 801867 643969 147423 229404 960419 892440 44291 418522 492851 732064 391757 140223 473507 479685 86923 325829 797584 537535 211882 686663 548761 441038 470652 476779 341762 522835 16690 934379 923052 706948 462868 32187 10524 416343 537371 883198
Output: 960419

Constraints:

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

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