F - Number Game
CodeChefOpen on judge ↗
During the lockdown, Vedant got curious. He started playing a game. He chose an integer $n$ and performed the following process on it. He took a **contiguous** subpart of $n$ and named it $x$. He then does **any one** of the following two operations on $x$ taking care that at no point will $n$ exceed $10^{5}$: - He may multiply $x$ by $k$ and add $1$ to it. - If $x$ is even, He may divide $x$ by
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