49,443
社区成员




#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
int ans = 4;
ans += 19;
ans += 20 * 21;
cout << ans;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
long long a, b, n;
cin >> a >> b >> n;
long long ans = (n / (a * 5 + b * 2)) * 7;
n %= (a * 5 + b * 2);
if(n <= a * 5) ans += (n + a - 1) / a;
else ans += 5 + (n - (5 * a) + b - 1) / b;
cout << ans;
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int n, a[10005];
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
cin >> n;
if(n == 1) cout << 1;
else
{
int t = (n - 1) * 2;
int l = 1, r = n;
while(l <= r)
{
a[l ++ ] = t;
a[r -- ] = t;
t -= 2;
}
for(int i = 1; i <= n; i ++ )
cout << a[i] << "\n";
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
long long n, k, res;
cin >> n >> k;
long long a[n + 1] = {0}, cnt[n + 1] = {1};
for(int i = 1; i <= n; i ++ )
{
cin >> a[i];
a[i] += a[i - 1];
res += cnt[a[i] % k];
cnt[a[i] % k] ++;
}
cout << res;
return 0;
}