Digit Sum Parities
For a positive integer $M$, MoEngage defines $\texttt{digitSum(M)}$ as the sum of digits of the number $M$ (when written in decimal). For example, $\texttt{digitSum(1023)} = 1 + 0 + 2 + 3 = 6$. Given a positive integer $N$, find the **smallest** integer $X$ **strictly greater** than $N$ such that: - $\texttt{digitSum(N)}$ and $\texttt{digitSum(X)}$ have different [parity](https://en.wikipedia.o
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