[Community Puzzle] Embedded Chessboards

Coding Games and Programming Challenges to Code Better

Send your feedback or ask for help here!

Created by @java_coffee_cup,validated by @Rafarafa,@AnteCristo and @papyjo.
If you have any issues, feel free to ping them.

O(n^2) will timeout on validator 4. Single loop O(n) will pass validators. O(1) if u can work out the math. Thanks for the puzzle! No skill tags though?

No tag by intention, for not causing a prejudice in selection of an approach.
There are too many possibilities that can work, except by brute force O(n^2).

“Strive for simplicity” should be a good tag :wink:

Formulas = headache. (I had to derive these formulas in my head)