- 奥运奖牌计数
终于做出来了!
- @ 2026-9-21 20:36:32
#include <bits/stdc++.h> using namespace std; int main() { int n, a, b, c, d, e, f, ans; ans = 0; a = 0; b = 0; c = 0; cin >> n; for (int i = 1; i <= n; i++) { cin >> d >> e >> f; a += d; b += e; c += f; ans = ans + (d + e + f); } cout << a << " " << b << " " << c <<" " << ans << "\n";
return 0;
}
1 条评论
-
刘沛宸 liupeichen(LPC C++) LV 9 @ 2026-9-21 22:17:00能不能用 ```cpp
- 1
信息
- ID
- 284
- 时间
- ms
- 内存
- MiB
- 难度
- 显示难度暂无评定
- 标签
- (无)
- 递交数
- 244
- 已通过
- 145
- 上传者