← All problemsSign in

Jenga Night

CodeChefRating 613Open on judge ↗

Chef hosts a party for his birthday. There are $N$ people at the party. All these $N$ people decide to play Jenga. There are $X$ Jenga tiles available. In one round, all the players pick $1$ tile each and place it in the tower. The game is *valid* if: - All the players have a tile in each round; - All the tiles are used at the end. Given $N$ and $X$, find whether the game is *valid*. ### Inpu

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