Đếm số

View as PDF




Problem type
Points: 100 (p) Time limit: 1.0s Memory limit: 256M Input: stdin Output: stdout

Cho một dãy gồm \(n\) số nguyên dương \(A_1,A_2,…,A_n\). (\(N\leq 10^5\),\(A_i\leq 10^9\)) và số \(x\).

Yêu cầu: Hãy đếm số lần xuất hiện của giá trị \(x\) trong mảng \(A\).

Input

  • Dòng đầu chứa số \(n\)\(x\).
  • Dòng thứ hai chứa \(n\) số nguyên dương \(A_1,A_2,…,A_n\).

Output

  • Số lần xuất hiện số \(x\) trong mảng \(A\).

Example

Test 1

Input
6 451
91 451 43 3 451 54
Output
2

Comments

There are no comments at the moment.