Maximum Sum in a Proper-Divisor Removal Game

Problem

Initially, the available set is A = {1, 2, …, n}. On each turn, you may select an available integer x only if at least one proper divisor of x is still available.

A proper divisor i...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: