Add solution to 'Digit statistics'