Swapping Marks Digits
Alice scored $A$ marks and Bob scored $B$ marks in an exam. Both $A$ and $B$ are two-digit numbers that don't contain the digit $0$. Alice wants her marks to display higher than Bob's. For this, she can reverse her score and/or Bob's score. Is there a way for her score to display higher than Bob's? For example, if $A = 37$ and $B = 83$, Alice can reverse her score to make it $73$, and also re
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