← All problemsSign in

False Number

CodeChefRating 1286Open on judge ↗

One day, Chef's friend gave him a wrong number $W$ containing $N + 1$ digits and said that the actual number $A$ is the **largest** possible number that can be obtained from deleting exactly one digit of $W$. Chef was able to find $A$ but forgot $W$. Given $A$, find the **smallest** possible number $W$ of length $N + 1$ without leading $0$'s that is consistent with the story above. We can show t

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