All tasks
Easyarraysloopsconditions

Elements Greater Than k

Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0

Statement

The first line contains n, the second line contains n integers, the third line contains k. Print how many array elements are strictly greater than k.

Examples

Example 1
Input
5
1 5 2 8 3
2
Output
3
Example 2
Input
4
1 2 3 4
10
Output
0

Constraints

  • 1 ≤ n ≤ 10^5
  • -10^9 ≤ a_i, k ≤ 10^9
Solve this task to unlock the editorial.

AI tutor

Stuck? Get a nudge — the tutor explains the idea, it never hands you the solution.