Nezuco wants to win
CodeChefOpen on judge ↗
Nezuko-chan has a bookshelf of N rows and M columns in her room. She wants to transfer those books to her new house, she wants to empty the bookshelf however, her friend Zenitsu challenges her to remove the books from the bookshelf with the least amount of operations such that for each operation -Remove X columns or X rows of books from the shelf where X is the Greatest Common Divisor of curr
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.
Sign in to chat with the tutor and save your progress.
Sign in to start