Under construction

Still being built. Things may change

Count Value

Interview

Time limit1sMemory limit256 MB

Summary
Count how many times the integer v appears among the N given integers.
Level

Easy1 of 10

Topics
Array
Solved
No attempts yet

Problem

총 N개의 정수가 주어졌을 때, 정수 v가 몇 개인지 구하는 프로그램을 작성하시오.

Input

첫째 줄에 정수 N이 주어진다. 둘째 줄에는 N개의 정수가 공백으로 구분되어 주어진다. 셋째 줄에는 정수 v가 주어진다.

Output

v가 등장한 횟수를 출력한다.

Examples4

  1. Example 1

    Input
    11
    1 4 1 2 4 2 4 2 3 4 4
    2
    
    Expected output
    3
    
  2. Example 2

    Input
    11
    1 4 1 2 4 2 4 2 3 4 4
    5
    
    Expected output
    0
    
  3. Example 3

    Input
    1
    7
    7
    
    Expected output
    1
    
  4. Example 4

    Input
    5
    1 1 1 1 1
    1
    
    Expected output
    5