CT997

Ulmar Counts the parcels

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Caravans arrive at the marble forum of Argentium with crates of parcels, and Ulmar the paymaster must account for every last one. 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 <= 39; -1000000 <= a[i],t <= 1000000.

Example 1:

Input: 21 828338 528707 -877831 -30226 266834 -860945 -844645 -10502 -636049 408697 399749 643582 -795690 -978547 640377 200215 826799 -519423 166077 543810 882684 -238601
Output: 1

Example 2:

Input: 8 520633 -127199 -919268 648503 822794 390000 534996 120696 352477
Output: 3

Example 3:

Input: 30 -353080 900646 713338 417508 -528796 495401 -362653 546740 -34589 -365998 669996 -934445 -161762 263913 9963 773083 277772 895789 -88432 -927391 246049 -686899 147352 -819966 -725807 -406256 -591688 574634 56341 -208775 32888
Output: 20

Constraints:

1 <= n <= 39; -1000000 <= a[i],t <= 1000000.

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