-
Notifications
You must be signed in to change notification settings - Fork 2
easiest
bradendubois edited this page Nov 11, 2021
·
8 revisions
ID: easiest
Difficulty: 1.6
CPU Time: 1 second
Memory: 1024 MB
For this problem, one can sum the digits in N, and then begin a loop with a p value initialized at 11. Get the sum of the digits of N * p, and if it's equal to the sum for just N, output p and continue to the next number, otherwise increment p and go again.