Rearranging digits to get a multiple of 5
Given a positive integer $N$, MoEngage wants you to determine if it is possible to rearrange the digits of $N$ (in decimal representation) and obtain a [multiple](https://en.wikipedia.org/wiki/Multiple_(mathematics)) of $5$. For example, when $N = 108$, we can rearrange its digits to construct $180 = 36 \cdot 5$ which is a multiple of $5$. ### Input - The first line contains an integer $T$, the
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