CT664

Vera's lanterns Reckoning

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Caravans arrive at the spice bazaar of Saffronia with crates of lanterns, and Vera the assayer 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 <= 82; -100 <= a[i],t <= 10.

Example 1:

Input: 47 -56 -13 -23 -54 -59 1 7 -35 -78 -16 -86 10 -68 -80 -35 -51 -97 -42 -81 3 -55 -77 -94 -70 3 -56 -100 -25 -72 -21 -24 -63 -74 -24 -22 -14 -28 -36 -14 -55 -62 6 -72 -37 -54 -2 -2 -89
Output: 29

Example 2:

Input: 45 -18 -5 -96 -52 -47 -51 -52 -4 -3 -26 -40 7 -97 -72 -66 -26 10 7 -15 7 -57 -8 -77 -42 -54 -99 -49 -37 -64 -29 -87 -3 -72 -13 -74 -51 -1 -24 2 -90 -60 -66 -49 -3 2 -51
Output: 15

Example 3:

Input: 63 -67 -26 -66 -33 -60 -53 -43 -28 -62 -23 -70 -59 -24 -43 -57 -56 -89 -30 7 8 -47 -56 2 -11 -72 -11 -85 -99 -52 -81 -54 -4 -25 -45 -4 -85 -91 -14 10 -45 -38 5 -63 -13 -58 -18 -66 -11 -7 3 -50 -6 -62 -90 -4 -31 -79 2 -73 -91 -40 -29 -9 -20
Output: 51

Constraints:

1 <= n <= 82; -100 <= a[i],t <= 10.

Loading...
Test Cases:No test cases
No test cases available.