← All problemsSign in

Number game

David and Sam are playing a number game. The game is played in the following way: The player with the current turn rolls two dice(with maximum 6 on each dice) and notes their sum N. And now the player has to fill a N*N matrix according to the following condition: - If N is odd, the matrix is filled with odd series of numbers starting with the first row. - If N is even, the matrix is filled with

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start