The Pontiac Bandit
CodeChefOpen on judge ↗
The Pontiac Bandit wants to open the lock of the treasure box. In order to do so, he guesses a positive integer $N$. His guess is correct if $N$ is *divisible* by each and every digit present in it. No number is divisible by $0$. Print a single line containing the string "YES" if his guess is correct or "NO" if it is not (without quotes). Note that the output should be in UPPERCASE only.
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