Smith Numbers
Details
A Smith number is a composite number whose digit sum is equal to the sum of the digits of its prime factors.
One example of a Smith number is the number 666 = 2 × 3 × 3 × 37, since 6 + 6 + 6 = 2 + 3 + 3 + (3 + 7) = 18.
Print all the Smith numbers from 0 to 10,000 inclusive, each on their own line.
0 bytes, 0 chars
Restore solution
Compiled from
AT&T syntax to x86-64 Linux. Use
syscalls to write output.
ctrl + enter or