When the electricity went out

This has to tell if a given number has 3s in it, what's the sum of it's
digits and are there same digits.