You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int n;
|
|
cin >> n;
|
|
int a = 0, b = 0, c = 0;
|
|
for (int i = 0; i < n; i++) {
|
|
int a1, b1, c1;
|
|
cin >> a1 >> b1 >> c1;
|
|
a += a1;
|
|
b += b1;
|
|
c += c1;
|
|
}
|
|
cout << a << " " << b << " " << c << " " << a + b + c << endl;
|
|
return 0;
|
|
}
|