CT28291

Lothar's stamps Reckoning

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Morning light hits the cinnabar mines of Vermilion as Lothar unrolls the day's manifest of stamps. The tally will decide the next shipment. Task: Read n integers and print how many of the elements after the first are strictly greater than the first element. Input format: First line: n. Second line: n space-separated integers. Output format: Print the count of elements a[2..n] greater than a[1]. Constraints: 1 <= n <= 803; 0 <= a[i] <= 1000; answers fit a signed 64-bit integer.

Example 1:

Input: 396 446 117 179 650 4 240 672 506 872 994 535 818 189 624 493 29 364 420 723 689 240 788 921 391 88 431 740 263 2 277 0 449 705 463 230 758 30 729 170 838 103 459 269 212 614 512 977 227 14 702 234 741 531 531 570 367 572 870 693 114 503 35 112 265 986 47 793 321 766 577 714 281 689 229 856 23 66 943 11 298 731 198 958 535 368 424 394 143 137 328 833 839 701 531 729 417 548 308 893 832 677 83 209 527 847 517 12 63 201 697 127 955 498 307 547 154 190 160 588 219 196 14 124 37 91 392 922 846 305 791 257 755 930 324 113 891 321 502 151 798 39 611 709 369 478 980 80 789 176 893 138 60 502 13 540 315 919 43 930 84 426 464 923 875 211 816 433 355 590 556 152 598 441 699 630 302 869 737 826 756 47 433 875 595 310 252 316 327 194 112 112 694 864 254 293 38 172 877 960 477 711 607 940 649 65 629 96…
Output: 208

Example 2:

Input: 100 266 597 418 864 969 667 681 743 152 212 973 546 861 522 721 370 440 24 321 514 106 744 707 52 514 895 912 358 935 614 464 731 624 171 873 878 907 277 118 278 176 560 594 683 730 48 354 788 883 645 972 890 714 100 910 271 873 123 770 484 400 448 898 872 904 62 783 790 876 263 365 625 560 18 839 214 158 601 93 856 854 779 98 55 26 61 450 772 590 21 692 630 590 724 769 547 357 711 86 736
Output: 76

Example 3:

Input: 262 563 522 498 87 234 697 347 79 545 696 55 131 65 794 828 63 94 36 719 829 202 358 851 355 466 175 3 801 868 335 76 177 55 293 371 417 904 761 672 956 580 88 893 928 728 78 899 598 691 289 139 122 604 862 991 477 387 577 821 808 316 795 722 24 327 954 186 581 904 315 226 903 944 695 195 761 900 562 878 449 578 448 609 954 592 624 554 642 217 48 376 944 252 320 393 549 56 818 395 570 391 856 820 586 250 286 108 267 607 28 898 606 955 290 583 163 864 666 158 41 952 633 599 248 988 402 90 571 305 137 659 188 878 701 139 248 314 754 385 656 196 104 527 712 636 724 383 13 528 193 480 40 718 938 484 745 317 641 458 798 299 158 766 457 983 859 263 952 10 787 814 406 136 374 94 254 86 98 323 475 855 697 502 79 200 233 721 147 488 70 328 406 690 368 602 203 598 461 738 195 897 305 513 830 929 608…
Output: 112

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Lothar's stamps Reckoning - EASY Coding Problem | CodeTikki