CT22936

Ojas and the Above Threshold

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Ojas runs the mint at the jade shrine of Serpentis. Today the books show a list of barrels, and the numbers must be worked out before sundown. Task: Read n integers and a threshold t; print how many exceed t. Input format: First line: n and t. Second line: n space-separated integers. Output format: Print the count of values strictly greater than t. Constraints: 1 <= n <= 276; 0 <= a[i],t <= 1000.

Example 1:

Input: 267 41 407 797 306 957 450 86 554 345 972 835 1 243 121 545 822 835 243 744 524 580 121 809 757 339 468 784 492 820 152 193 205 805 36 713 807 631 137 255 963 327 133 917 136 607 221 700 525 827 584 119 808 214 981 496 699 403 918 582 236 512 838 111 635 670 538 326 262 941 491 691 863 575 373 539 721 435 460 300 398 247 453 47 152 526 442 944 899 394 599 342 476 99 158 921 37 999 949 26 52 176 351 332 171 576 655 324 276 766 713 71 418 821 401 29 33 17 778 841 62 73 464 525 28 755 980 136 475 740 917 288 738 506 63 891 913 523 176 164 528 191 380 285 438 716 781 742 210 551 816 770 790 987 199 992 331 750 982 589 73 347 469 793 84 596 205 740 46 479 102 649 90 160 206 17 181 527 823 180 884 286 824 423 550 858 281 268 878 135 696 161 715 350 472 9 200 889 297 62 351 145 537 735 78 572 554…
Output: 257

Example 2:

Input: 151 435 594 662 831 726 122 453 425 609 698 152 425 756 185 868 881 639 454 44 957 965 635 377 192 424 247 589 208 826 129 874 979 614 850 496 331 511 830 777 715 172 505 824 961 96 15 489 759 702 311 775 363 304 209 409 575 628 785 302 627 325 513 608 196 364 857 480 453 919 537 653 608 939 482 765 694 1000 888 75 981 156 319 937 391 437 189 36 725 169 622 993 483 957 45 284 352 57 870 845 657 328 732 625 229 79 389 497 349 243 145 374 458 410 623 200 384 576 355 547 744 92 15 996 628 901 225 832 692 687 926 899 492 488 175 145 149 5 193 786 789 222 737 331 821 604 808 261 260 108 883 847 357
Output: 89

Example 3:

Input: 210 47 196 600 985 298 783 627 491 624 999 632 534 397 464 412 669 735 642 611 310 23 45 523 556 150 221 490 98 515 875 670 453 150 194 512 728 756 699 996 23 782 90 102 903 692 258 604 833 477 946 611 51 379 122 334 372 604 450 250 329 565 344 826 939 735 577 460 768 154 654 664 507 278 347 144 782 101 903 587 530 210 787 255 485 260 116 972 452 70 720 877 880 982 191 879 797 957 608 685 629 614 120 677 831 118 699 913 51 97 968 483 942 744 339 106 500 128 557 935 85 229 742 723 903 596 90 222 252 569 490 934 400 367 844 998 817 765 933 611 404 946 502 569 325 221 874 347 911 899 506 820 748 331 909 707 106 906 802 648 127 922 601 989 887 940 25 342 719 333 956 577 859 663 657 73 102 540 502 466 116 111 921 412 272 120 431 397 78 8 615 620 592 945 956 539 82 891 917 1000 986 272 792 182 3…
Output: 204

Constraints:

1 <= n <= 276; 0 <= a[i],t <= 1000.

Loading...
Test Cases:No test cases
No test cases available.
Ojas and the Above Threshold - EASY Coding Problem | CodeTikki