Đoạn con chia hết


Submit solution

Points: 1
Time limit: 1.0s
Memory limit: 1G

Problem type

Cho dãy $a_1,a_2,...,a_N$. Hãy đếm số dãy con có tổng chia hết cho $N$.

Dữ liệu

  • Dòng đầu tiên chứa số nguyên $N \ (0<N\le2\times10^5)$;
  • Dòng tiếp theo chứa $N$ số nguyên $a_i \ (|a_i| \le 10^9)$.

Kết quả

  • Kết quả bài toán.

Ví dụ

Ví dụ 1

input

5
3 1 2 7 4

output

1

Comments

There are no comments at the moment.