CT27639

Curator's Ledger of lanterns

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

At the rook towers of Chessfield, Curator records each lanterns in a worn leather ledger. The guild wants answers, not guesses. 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 <= 707; -100 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 572 719 152 456 -81 563 795 679 541 463 581 752 884 190 801 119 254 828 218 385 53 383 718 665 635 897 763 832 450 488 747 439 103 55 -75 518 677 279 693 767 553 202 993 328 544 558 620 18 539 782 139 794 739 191 880 292 447 944 185 508 853 957 440 784 565 184 803 719 552 21 -70 886 741 -29 515 779 250 -21 849 16 188 867 546 998 473 568 -55 666 746 -40 23 658 887 31 383 313 357 482 823 397 424 838 577 781 602 171 460 890 425 391 156 71 134 252 132 202 640 399 -56 352 879 482 528 368 516 278 108 343 156 561 9 190 106 481 785 385 32 -92 324 635 932 947 24 992 789 433 918 -76 819 948 185 531 177 961 735 235 434 327 827 693 -98 809 210 808 340 164 174 572 488 -42 334 -84 218 151 86 70 59 301 -31 -9 -13 165 433 832 636 359 675 456 728 -10 80 768 -86 58 39 86 453 492 189 800 805 723 761 159 376 …
Output: 999

Example 2:

Input: 205 50 10 40 427 772 727 401 338 368 577 280 -56 884 -29 540 513 42 692 100 319 963 92 758 890 497 323 878 910 -18 761 326 995 355 11 975 408 -65 288 882 637 458 453 262 638 472 998 748 964 430 14 336 -5 868 444 -42 762 81 432 706 122 234 839 93 428 451 441 921 119 334 886 968 144 342 845 386 329 631 288 -8 713 558 288 -42 197 451 370 619 -3 801 716 348 210 654 318 419 197 177 627 -10 562 268 62 657 439 921 247 112 881 399 98 201 228 735 282 91 723 405 602 823 19 921 917 441 933 516 143 99 -12 175 864 -46 83 386 512 898 -95 336 595 855 718 475 34 929 213 308 812 582 795 597 512 491 390 997 991 58 690 100 174 443 132 803 356 916 984 44 450 933 681 738 893 308 717 850 856 -79 612 266 356 44 640 317 717 -26 735 419 32 612 991 957 923 299 110 754 477 151 968 488 323 565 -32 230 -29 480 -1 166
Output: 998

Example 3:

Input: 327 886 628 95 785 364 457 -23 364 372 770 -7 -73 999 811 121 29 30 123 -31 -5 518 364 79 896 521 959 947 248 111 350 681 463 416 390 433 -4 665 717 152 208 269 291 -38 386 302 530 356 930 499 968 578 -64 87 756 437 460 50 761 945 472 696 613 61 823 881 238 -50 422 570 700 189 250 603 145 859 703 124 105 175 369 39 2 223 955 685 -77 850 965 882 509 785 874 573 824 977 166 527 427 509 925 440 751 657 -33 369 265 217 193 145 390 710 270 961 483 577 994 542 850 152 -53 -9 624 872 687 319 71 723 631 668 281 539 330 264 680 124 814 208 64 795 -52 -22 95 745 503 480 539 424 909 378 998 589 602 551 942 167 882 662 859 217 341 266 523 418 979 268 867 146 680 853 373 710 455 538 878 798 438 709 541 99 -8 483 809 -14 381 367 305 767 44 613 523 532 129 529 49 235 481 535 458 511 306 335 897 195 266 7…
Output: 999

Constraints:

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

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