← All problemsSign in

Game of Factors

Appu and her friend want to play a game - Game of Factors. Initially, they have a group of n positive integers. In a move, a player can take one of the integers Ai from the array and convert it into two integers x and y such that x*y = Ai (Here x or y cannot be 1). Notice that after a successful move, the size of the array increases by 1. The player who cannot make a successful move loses. Howev

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