CT25485

Ravi's ingots Peak

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

It is audit day at the willow walks of Reedmarsh. Ravi spreads the ingots records across the table and picks up a sharp pencil. 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 <= 209; -100 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 131 108 -3 337 549 803 998 501 229 778 932 19 183 53 216 216 809 533 559 413 636 750 433 454 628 214 169 954 256 -77 684 834 691 691 99 707 89 248 176 367 955 722 423 481 328 372 604 141 758 778 479 215 -16 503 958 519 852 66 758 846 79 215 612 919 648 175 333 419 430 -33 735 910 758 775 665 836 795 837 665 111 798 573 -7 491 742 -57 -40 332 945 938 574 521 494 456 -45 278 345 380 445 713 185 206 541 919 903 238 637 977 953 757 616 -7 1 87 411 79 678 597 655 332 531 -35 870 493 786 324 580 665 604 160 -8 873
Output: 998

Example 2:

Input: 151 509 876 711 368 150 188 710 186 468 578 568 146 310 563 947 71 692 778 706 290 983 147 111 338 981 874 622 427 311 664 932 -19 970 19 -14 113 -28 197 719 184 128 695 12 156 146 510 93 259 519 -88 899 432 250 531 656 222 363 23 -72 -61 209 -62 708 826 946 778 632 205 923 982 329 237 716 529 570 389 -76 835 358 456 376 887 634 -13 906 773 263 398 759 80 312 202 132 350 -49 702 173 -2 431 716 138 892 522 39 24 490 -95 -82 934 254 -40 705 -63 711 551 904 477 20 153 126 450 5 753 887 697 363 717 -92 209 679 339 770 155 979 221 930 662 -74 715 596 622 663 298 954 745 76 886 -71 874 97 47
Output: 983

Example 3:

Input: 34 489 942 290 234 728 -59 779 521 971 646 751 568 -40 496 888 497 -10 45 535 753 320 2 494 49 818 649 339 217 817 -91 750 46 169 133
Output: 971

Constraints:

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

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