← All problemsSign in

Interior Designer Bob

Bob wants to change the tiles of his room’s flooring which has dimensions m x m sq. m. Dimensions of the tiles used are n x n sq. m. All the tiles are red except diagonal tiles which are black. Now Bob wants to replace some red tiles by black tiles to form an alternate black and red pattern. Your task is simple, you have to find how many tiles should be removed to form an alternate pattern Input

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