Digit Counts(LintCode 3):

Problem