CT25995

Wynne's Ledger of lanterns

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Every season at the ember dunes of Ashfall, someone must track down a clerical error. This year the task falls to Wynne, armed only with the lanterns register. 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 <= 768; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 191 215 878 342 50 294 821 484 968 698 470 236 466 406 837 110 433 726 419 296 933 871 895 169 294 826 932 543 858 962 962 198 222 502 189 690 297 746 222 388 230 699 747 411 205 162 112 896 736 953 804 42 318 671 211 812 695 721 293 125 539 434 679 874 197 926 764 659 812 755 623 969 172 627 765 877 102 431 128 654 743 523 5 16 831 581 264 836 240 918 98 697 464 944 601 192 503 95 484 243 918 643 696 237 491 994 190 49 25 9 243 814 886 465 426 997 615 827 161 601 368 362 99 75 803 392 130 710 913 40 28 739 365 250 191 272 894 608 121 719 215 910 973 576 631 866 204 448 72 265 133 165 104 912 807 815 203 331 199 665 869 444 367 604 252 739 185 245 368 155 323 741 583 26 460 884 309 60 792 151 138 815 944 417 410 454 379 87 29 743 746 451
Output: 997

Example 2:

Input: 115 823 914 258 534 935 994 62 946 530 105 13 42 512 237 37 222 416 176 472 777 139 663 344 72 162 367 662 332 772 666 534 601 85 90 893 779 78 471 69 893 587 440 84 557 733 922 153 283 615 474 919 215 449 123 81 283 490 490 291 776 822 800 863 120 925 684 1 982 949 382 897 421 140 459 165 444 959 328 621 93 658 357 995 124 792 335 626 252 785 209 188 952 971 670 407 416 675 217 676 488 148 954 946 56 61 927 799 49 173 359 873 721 463 741 201
Output: 995

Example 3:

Input: 316 595 704 918 112 234 870 861 110 485 563 150 575 214 521 497 831 625 394 152 359 215 751 615 763 128 148 198 200 806 468 755 122 217 966 47 529 387 744 767 756 437 968 732 54 149 540 945 996 59 964 792 882 778 326 643 952 301 741 883 474 778 5 532 933 512 820 521 104 168 95 931 13 747 688 46 316 946 674 103 469 438 508 655 336 566 462 416 89 265 45 463 969 10 928 461 181 53 857 408 231 536 972 898 98 534 979 10 953 692 546 829 420 111 681 804 885 87 308 504 659 860 747 980 903 55 294 575 112 125 453 778 581 143 0 873 161 760 980 681 540 367 332 747 566 535 421 393 516 269 746 671 744 136 190 586 85 765 103 576 73 215 818 988 179 935 491 87 840 277 440 782 878 987 21 992 933 725 69 597 739 927 772 800 151 166 126 473 127 817 338 989 898 562 821 285 616 986 243 823 491 953 305 699 806 906…
Output: 996

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Wynne's Ledger of lanterns - EASY Coding Problem | CodeTikki