E. Đếm số lần xuất hiện của số x


Submit solution

Points: 50
Time limit: 1.0s
Memory limit: 256M

Problem type

Cho mảng n phần tử và số nguyên x, đếm số lần xuất hiện của x.

Ràng buộc:

  • 1 ≤ n ≤ 1000
  • -10^6 ≤ a[i], x ≤ 10^6

Input:

  • Dòng 1: Số nguyên n
  • Dòng 2: n số nguyên
  • Dòng 3: Số nguyên x

Output:

  • Số lần xuất hiện của x

Ví dụ:

Test Input Output
1 5
1 2 3 2 4
2
2
2 4
5 6 7 8
9
0

Comments

There are no comments at the moment.