1 条题解
-
0
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; long long d; cin >> n >> d; long long sum = 0, x; for (int i = 0; i < n; i++) { cin >> x; sum += x; } long long ans = (sum + d - 1) / d - 1; if (ans < 0) ans = 0; cout << ans << '\n'; return 0; }
- 1
信息
- ID
- 243
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- (无)
- 递交数
- 125
- 已通过
- 32
- 上传者