Count Value
InterviewTime limit1sMemory limit256 MB
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가 등장한 횟수를 출력한다.