Consider a square chess board with rows and columns, where every square contains a number of coins. Write a program such that, given a chess board, computes the total number of coins on the diagonals. The first square in the board (top left) is always white.
The input is a natural number , followed by rows, each with non-negative integers, separated by whitespaces.
The ouput is the total number of coins in the board diagonals.
Author: Lluís Padró
Generation: 2026-01-25T17:05:11.658Z
© Jutge.org, 2006–2026.
https://jutge.org