Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- const int N = 105;
- int n;
- int a[N][N];
- int main(){
- cin >> n;
- int cnt = 0;
- for (int i = 1; i <= n; i++) {
- for (int j = 1; j <= n; j++) {
- cin >> a[i][j];
- cnt = cnt + a[i][j];
- }
- }
- cout << cnt / 2 << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement