CT26566

The Gleaming First Peak Index

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Legend says the vault under the mulberry rows of Silkmead opens only for a perfect tally of coins. Quade means to find out. 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 <= 378; -1000000 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Example 1:

Input: 319 937271477 114219796 71298678 40521561 541195561 379698221 690933855 142096447 680409569 48467629 584603520 361387709 859840644 45104941 890187098 699250872 450922189 885569020 502450742 406212020 645018377 561901747 486204430 337201712 617384043 687908928 624358363 252341800 988431276 789575918 746560935 816029825 875002403 499600357 806210816 67487403 510040609 808599090 260445200 518549162 670239598 291092857 540853688 42787487 680701192 832495523 472509357 559324647 184299608 993944799 629688633 819037985 390065885 37322138 495843862 751173225 293910831 719015272 945397548 389952911 611591179 508966231 958846807 888989327 641325647 673553512 198876327 742971847 582040978 692410614 928978658 782136950 384370291 411368329 944985855 352937718 636135890 274326264 279857479 655095866 302…
Output: 128

Example 2:

Input: 366 746226508 277124652 265573074 126511147 580951771 518501546 285258926 287369026 450453651 955444721 304037786 775530555 106750650 680271789 61019511 290125597 276367404 911454984 446760108 522679103 491216583 546859839 19737511 884608754 934110241 50742842 278371216 288938808 936305024 841588745 378407937 150684952 930066178 423552390 72248387 766232058 695801502 462221256 248976193 34420551 28506797 509188251 78147483 222575048 176930538 333782439 116459112 874324152 6672567 567538372 979593362 488896154 402831892 193641517 785608426 952240786 617484260 186153864 499578332 430035268 428346361 257203718 257218973 86178331 799452801 174581304 277029374 423194788 171070561 611889740 829536303 698303576 395931605 379527316 658127112 719792846 818250126 696894799 974705925 143915829 318675…
Output: 142

Example 3:

Input: 312 962223496 309073607 524333038 168976868 39359200 759223334 657793096 3120952 905070199 105160063 396596665 808379499 702917369 372891273 568650954 40199682 266984334 452084381 493762073 166942130 836162412 608231078 991083301 100893895 157707563 114484805 261248698 583432918 705256521 773034722 748985736 27777772 661691964 692926873 808810294 130407383 951602400 23356699 946154043 141961050 87230077 354394394 549565226 353125663 14466092 819003219 688359511 790659511 668302786 688934455 238753334 785440208 595142479 330702083 947038152 698181078 7789751 459039979 471196568 359035339 458836171 652516773 761912361 717024340 523063256 522781670 996734666 709151764 658862857 471117927 697873179 307089955 17417907 788922709 337393928 89040180 411115372 506553053 96498960 194672043 230151426…
Output: 67

Constraints:

1 <= n <= 378; -1000000 <= a[i] <= 1000000000; answers fit a signed 64-bit integer.

Loading...
Test Cases:No test cases
No test cases available.
The Gleaming First Peak Index - EASY Coding Problem | CodeTikki