Problem 3550 · Easy

Smallest Index With Digit Sum Equal to Index

Scan the indices in order and return the first one whose value has a digit sum equal to that index.

Open the interactive visualisation