70. Count the Votes

Acceptance — 0 accepted 0 submissions

Easy
Arrays
No companies listed
In the class monitor election, each vote is the candidate's number. Count how many votes candidate x received.

Input Format
The first line has n, the number of votes.
The second line has n integers.
The third line has x.

Output Format
Print the number of votes x received.

Constraints
• 1 ≤ n ≤ 1000
• 1 ≤ vote, x ≤ 100

Example 1

Input
7
1 2 1 3 1 2 1
1
Output
4

Explanation Candidate 1 appears 4 times.

Example 2

Input
5
4 4 5 5 6
7
Output
0

Explanation Nobody voted for 7.

Example 3

Input
3
9 9 9
9
Output
3

Explanation All three votes went to 9.

Acceptance —
Accepted 0
Submissions 0
Auto-save
Saved Ln 1, Col 1
Submit a solution to see its status here.
Input
Expected Output
4
No results yet
Run your code to test it against the sample cases.
Problem List