Misha and Nice Sets
Misha calls a non-empty set of positive integers *nice* if it has the following properties: - Each element of the set is between $l$ and $r$ (inclusive). - The greatest positive integer which divides each element of the set is exactly $g$. Misha likes nice sets, so she wants to find the size of the largest nice set. Help her solve the problem. ### Input - The first line of the input conta
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