CT22961

Axel's Radiant Ledger

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The store warden Axel has been asked to track the breeding season. On the desk lies a long table of crates readings. 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 <= 293; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 30 189 326 852 459 613 5 91 683 36 274 888 803 754 14 811 995 765 117 438 745 37 312 301 492 335 320 659 605 526 141
Output: 16

Example 2:

Input: 51 146 701 147 553 232 411 432 76 446 360 812 856 764 792 620 826 815 123 767 628 123 328 805 914 488 12 134 633 964 392 935 263 389 774 274 957 246 26 434 529 50 824 100 389 171 723 564 329 479 753 293
Output: 29

Example 3:

Input: 116 48 235 334 910 471 219 180 192 77 615 833 810 223 515 570 274 604 819 882 309 808 281 844 821 893 507 942 346 558 600 643 486 111 607 366 501 951 360 530 136 739 965 235 770 538 628 880 891 949 275 369 972 498 143 311 733 190 174 177 418 653 423 739 426 916 435 498 439 669 308 54 275 338 511 902 235 837 306 88 144 42 788 98 979 617 565 573 235 518 36 52 403 341 586 87 541 949 646 745 12 149 485 958 820 80 638 408 196 433 512 893 1000 805 412 17 144
Output: 112

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Axel's Radiant Ledger - EASY Coding Problem | CodeTikki