#include<iostream>
using namespace std;
long long count1[1000009] = {0};
int main()
{
int n, k; cin >> n >> k;
long long ans = 0,sum=0;
for (int i = 0; i < n; i++)
{
long long temp = 0;
scanf("%lld", &temp);
sum = (sum + temp) % k;
count1[sum]++;
}
// 单一前缀和为k的倍数(特判)
ans += (count1[0] * (count1[0] + 1) / 2);
for (int i = 1; i < k; i++)
// 单一前缀和不为k的倍数
ans += (count1[i] * (count1[i] - 1) / 2);
cout << ans;
return 0;
}
报错 页面的图标也显示不出来,如下
解决: 在build->utils.js文件里面加上publicPath: ../../,再打包发布一下就可以了 // Extract CSS when that option is specified// (which is the case during production build)if (options.extrac…