← Complete problem index

PROJECT EULER · #0377

Sum of Digits - Experience #13

Statement only · SolvedOriginal problem ↗

There are 16 positive integers that do not have a zero in their digits and that have a digital sum equal to 5, namely:
5, 14, 23, 32, 41, 113, 122, 131, 212, 221, 311, 1112, 1121, 1211, 2111 and 11111.
Their sum is 17891.

Let f(n) be the sum of all positive integers that do not have a zero in their digits and have a digital sum equal to n.

Find i=117f(13i).
Give the last 9 digits as your answer.

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.