1 条题解
-
0
自动搬运
来自洛谷,原作者为

Moon_Lighter
If I can be with you, I'd rather let all the stars in the sky fall, because your eyes are the brightest light in my life搬运于
2025-08-24 21:03:05,当前版本为作者最后更新于2021-07-05 09:13:53,作者可能在搬运后再次修改,您可在原文处查看最新版自动搬运只会搬运当前题目点赞数最高的题解,您可前往洛谷题解查看更多
以下是正文
然后再将其加入对应的奖牌数内,即:
最后输出 就行了。
代码:
#include<bits/stdc++.h> using namespace std; int main() { int a,c,d,b,e=0,f=0,g=0;//e,f,g分别是金银铜牌总数,a为天数 cin>>a; for(int i=0;i<a;++i) { cin>>c>>d>>b;//输入:金银铜牌数量 e+=c; f+=d; g+=b; } cout<<e<<' '<<f<<' '<<g<<' '<<e+f+g;//金、银、铜牌总数及总奖牌数 return 0; }
- 1
信息
- ID
- 6915
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- 递交数
- 3
- 已通过
- 2
- 上传者