← All problemsSign in

Yet another SOD problem

CodeChefRating 1459Open on judge ↗

Ujan is a software developer. He is developing a software that takes two integers $L$ and $R$ and outputs the count of integers in the sequence $L,L+1,\ldots,R-1,R$ whose sum of digits (SOD) is divisible by $3$. He has developed the user interface (UI) quite easily. He is having a hard time finding the logic to solve the problem. As you are not only a good friend of Ujan but also a good problem

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