CT25456

Pia Counts the scrolls

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The council of the fox den of Rustwood pays by the answer, and Pia intends to earn it. First: the full register of scrolls. Task: Read n integers and print the 1-based index of the first occurrence of the maximum value. Input format: First line: n. Second line: n space-separated integers. Output format: Print the 1-based index of the first maximum. Constraints: 1 <= n <= 355; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 139 42 191 603 551 75 701 301 928 614 66 390 388 827 694 187 578 30 355 69 547 876 915 485 676 521 981 503 999 454 706 281 793 693 509 786 758 580 63 729 851 166 654 17 453 255 338 407 734 770 125 904 767 759 212 319 557 323 318 409 637 326 496 115 259 213 818 32 626 871 74 873 560 780 868 160 280 718 807 980 209 850 836 385 523 791 389 568 171 262 857 490 67 998 659 247 336 922 381 868 36 756 499 156 168 914 570 164 525 873 632 15 192 351 545 906 122 0 241 174 964 716 465 286 903 729 821 58 362 302 333 334 849 420 755 588 581 714 117 264
Output: 28

Example 2:

Input: 220 83 210 650 757 239 970 249 181 907 617 380 476 507 307 82 195 419 730 74 250 545 314 961 410 505 300 820 249 290 768 357 70 666 940 948 392 263 956 939 218 929 854 124 174 308 885 420 842 370 619 400 72 243 361 373 553 347 486 3 211 260 757 14 63 216 512 960 656 8 23 998 837 7 299 825 556 156 899 560 684 676 773 765 555 760 965 570 874 225 145 50 128 343 976 973 107 345 380 774 750 884 480 903 709 439 417 104 538 718 295 440 111 655 522 863 792 179 89 635 303 760 19 320 818 227 706 267 581 11 742 914 763 215 255 19 679 490 629 811 465 179 703 758 694 297 86 933 49 116 188 729 278 17 303 777 939 610 347 614 317 846 470 840 363 857 188 71 425 638 158 229 662 932 508 367 55 635 135 584 116 510 181 597 630 44 916 856 333 201 919 366 886 263 869 29 390 284 86 518 833 445 798 136 224 942 647…
Output: 71

Example 3:

Input: 211 480 238 630 959 517 93 602 396 273 880 572 830 501 417 253 778 746 741 187 986 796 72 681 294 828 462 712 251 795 270 640 601 184 118 25 322 158 508 585 686 185 439 449 433 426 228 829 16 797 903 876 0 952 350 988 303 882 87 355 159 332 353 689 493 906 420 413 836 537 539 69 145 101 159 734 449 557 947 755 101 261 241 618 636 458 82 563 12 23 847 979 192 484 27 962 785 716 258 20 890 220 882 52 581 730 972 789 392 287 874 829 683 194 79 209 447 144 611 949 988 914 850 525 23 533 647 642 438 464 312 214 212 277 934 912 428 305 926 310 68 540 100 612 510 523 956 904 968 766 588 940 641 234 4 541 783 219 983 225 488 707 480 488 870 528 286 148 11 310 387 0 782 343 678 640 437 14 972 83 208 896 318 264 970 494 385 989 172 425 128 586 207 52 925 80 252 456 68 689 537 187 209 815 64 722 727 …
Output: 187

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Pia Counts the scrolls - EASY Coding Problem | CodeTikki