D. Đếm phần tử âm


Submit solution

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

Problem type

Cho mảng n số nguyên, đếm số lượng phần tử nhỏ hơn 0.

Ràng buộc:

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

Input:

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

Output:

  • Số phần tử âm

Ví dụ:

Test Input Output
1 5
1 -2 3 -4 5
2
2 3
0 5 7
0

Comments

There are no comments at the moment.