P725
projecteuler.net

Digit Sum Numbers

ℹ️Published on Saturday, 12th September 2020, 05:00 pm; Solved by 1231;
Difficulty rating: 10%

A number where one digit is the sum of the other digits is called a digit sum number or DS-number for short. For example, $352$, $3003$ and $32812$ are DS-numbers.

We define $S(n)$ to be the sum of all DS-numbers of $n$ digits or less.

You are given $S(3) = 63270$ and $S(7) = 85499991450$.

Find $S(2020)$. Give your answer modulo $10^{16}$.



Soluzione

Last modified: May 01, 2025. Website built with Franklin.jl and the lovely Julia programming language.