CT1439

Last readings of Kavi

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

The cartographer Kavi has been asked to document the rare sighting. On the desk lies a long table of readings 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 <= 76; -100 <= a[i] <= 1000000; answers fit a signed 64-bit integer.

Example 1:

Input: 51 787156 590785 191554 199676 71174 297004 150313 466358 540870 689496 24037 529049 89038 658606 982610 299005 394185 57425 253078 833819 484014 309949 402098 722614 58666 300079 88635 667721 879161 359502 165847 536119 491309 729490 86325 232422 531853 241370 674849 840544 753822 814331 363522 844993 572411 429045 84730 119571 662980 738601 414147
Output: 982610

Example 2:

Input: 44 248497 790786 923396 127589 130284 556970 226459 953014 254591 113569 138137 222407 601186 206900 863448 657523 433474 773087 404257 19053 562498 523440 912559 970004 618759 705831 388821 627503 521800 778138 418150 735802 399681 390913 833964 724221 869845 865263 862453 995417 509529 153969 562851 325120
Output: 995417

Example 3:

Input: 14 182646 214964 188245 305294 398949 634132 66236 781345 788582 343350 845492 716542 814023 332910
Output: 845492

Constraints:

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

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