Smallest Beautiful Number
Let's call a positive integer $M$ a *beautiful number* if the following conditions are satisfied: - The decimal representation of $M$ (without leading zeros) does not contain any zeros. - The sum of squares of all decimal digits of $M$ is a perfect square. For example, $1$, $4$ and $221$ are beautiful, but $10$ and $333$ are not. You are given a positive integer $N$. Find the smallest $N$-
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