#include <iostream>
using namespace std;
int R, C;
int main() {
cin >> R >> C;
int sum = 0;
int temp;
for (int i = 0 ; i < R; i++) {
for (int j = 0 ; j < C; j++) {
cin >> temp;
if (temp < 0)
temp = (-1) * temp;
sum += temp;
}
}
cout << sum << endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Partially correct |
0 ms |
1672 KB |
Output is partially correct |
2 |
Partially correct |
0 ms |
1672 KB |
Output is partially correct |
3 |
Partially correct |
0 ms |
1672 KB |
Output is partially correct |
4 |
Incorrect |
0 ms |
1672 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |