Write code for, given a non-negative integer , where for some , printing a chess board of size , as shown in the examples.
The program must implement and use the CHESS-BOARD function, which can be iterative or recursive and is not allowed to perform input/output operations.
Make one submission with Python code and another submission with C++ code.
The input is an integer of the form for some .
The output is a chess board of size .
The size of a chess board is always of the form for some .
Author: Gabriel Valiente
Generation: 2026-01-25T16:02:14.812Z
© Jutge.org, 2006–2026.
https://jutge.org