Special Pens
CodeChefOpen on judge ↗
Ravi just started a factory of fountain pens. Every pen has a production number on it. He considers a pen as lucky if the difference between the sum of digits at even place and sum of digits at odd place of the production number of pen is a positive multiple of 3 or 5 or 7. (indexing starts from the unit's place, with unit's place location being 1, ten's place as 2, hundred's place as 3 and so on)
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