Remove a Proper Divisor — Solution & Editorial
Grundy DP: g[n] = mex of reachable Grundy values; non-zero means the first player wins.
Complexity: O(max n · moves)
Grundy DP: g[n] = mex of reachable Grundy values; non-zero means the first player wins.
Complexity: O(max n · moves)