← All problemsSign in

Multiple of 9

CodeChefRating 1904Open on judge ↗

You are given an $N$-digit integer with some unknown digits (marked with $?$). Count the number of ways to fill in each $?$ with a digit ($0$ to $9$) such that the resulting integer is **positive** and a multiple of $9$. The integer cannot have leading zeroes. Two ways are different if, for some $?$, the chosen digit is different. Even though the number of ways can be very large, you should 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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start