- 奥运奖牌计数
奥运奖牌计数错解
- 2023-12-13 16:53:04 @
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,a,j,yp,t,zs;
cin >> n ;
while(n--)
{
int x, y, z;
cin >> x >> y >> z;
j=j+x;
yp=yp+y;
t=t+z;
zs=j+yp+t;
}
cout<<j<<" "<<yp<<" "<<t<<" "<<zs<<endl;
return 0;
}
除了缩进以外错哪了,蹲指点
2 comments
-
经开一中2026届11班关泽瑞 LV 6 @ 2023-12-13 17:40:55
有什么实力,这题,直接给我做细啊
-
2023-12-13 17:40:01@
#include <bits/stdc++.h> using namespace std; int a, b, c; int main() { int n; cin >> n; while (n -- ) { int x, y, z; cin >> x >> y >> z; a += x, b += y, c += z; } cout << a << ' ' << b << ' ' << c << ' ' << a + b + c << endl; return 0; }
- 1
Information
- ID
- 573
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 3
- Tags
- (None)
- # Submissions
- 291
- Accepted
- 164
- Uploaded By