Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String args[]) {
- Scanner sc = new Scanner(System.in);
- int n, x, s;
- n = sc.nextInt();
- s = 0;
- for (int i = 0; i < n * n; i++) {
- x = sc.nextInt();
- s += x;
- }
- System.out.println(s / 2);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement