include [HTML_REMOVED]
using namespace std;
const int N = 100010;
typedef long long LL;
int a[N], s[N], cnt[N];
int main()
{
// 请在此输入您的代码
int n, k;
scanf(“%d %d”, &n, &k);
LL res = 0;
for(int i = 1; i <= n; i)
{
scanf(“%d”, &a[i]);
s[i] = s[i - 1] + a[i];
s[i] %= k;
res += cnt[s[i]];
cnt[s[i]];
}
printf(“%lld”, res + cnt[0]);
return 0;
}