CT24881

The Peak at Firewatch

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Theron runs the loft at the caldera rim of Firewatch. Today the books show a list of ingots, and the numbers must be worked out before sundown. 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 <= 290; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 202 892 963 12 708 155 522 96 441 744 53 722 150 715 725 145 241 217 283 796 492 116 35 248 332 994 507 654 229 12 785 193 433 285 243 484 920 0 415 784 457 851 575 699 986 803 140 414 460 521 384 329 390 304 497 794 846 703 37 44 76 153 421 985 846 384 922 841 770 142 584 714 702 114 935 812 129 138 688 995 601 821 480 707 733 562 779 620 392 377 459 729 708 446 677 220 196 918 62 357 97 216 333 605 982 42 639 729 557 480 971 750 835 411 555 785 383 168 434 782 604 244 146 961 143 910 846 553 757 160 683 320 617 776 508 735 649 150 194 253 516 725 192 512 738 991 392 317 662 673 422 446 980 350 475 998 582 70 497 120 594 417 474 183 701 357 771 392 766 162 181 269 873 283 56 882 417 868 996 594 585 988 772 246 460 202 174 59 874 501 971 535 807 449 321 76 561 598 348 571 21 84 184
Output: 998

Example 2:

Input: 123 104 217 674 540 264 128 342 482 478 146 574 847 83 90 672 46 930 130 643 661 993 68 77 473 238 763 789 131 749 500 981 467 929 813 267 130 758 346 332 341 860 322 183 569 910 340 523 394 978 978 18 862 804 806 431 787 918 426 192 683 95 493 971 698 103 788 575 765 774 394 983 219 511 319 35 189 361 876 435 336 498 350 599 898 815 904 578 604 364 648 229 851 249 28 504 218 871 861 399 435 653 828 955 928 705 921 430 72 8 738 409 273 740 640 49 934 11 70 116 612 378 653 105
Output: 993

Example 3:

Input: 146 488 846 587 871 21 111 324 794 394 912 815 876 739 770 514 707 606 926 516 599 55 652 746 564 744 482 70 50 141 992 440 67 620 471 89 564 877 126 761 731 410 670 205 134 908 85 655 449 735 437 94 726 373 56 286 467 973 78 447 166 656 844 452 214 332 282 547 703 433 732 238 936 490 985 453 950 321 214 632 743 822 285 736 955 24 709 963 916 158 358 685 719 35 802 862 197 421 954 709 471 260 670 242 610 428 435 828 628 351 332 909 146 575 547 98 868 433 5 446 754 860 648 82 974 257 902 492 625 886 431 667 298 813 400 716 120 847 27 329 543 115 684 78 9 389 500
Output: 992

Constraints:

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

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